	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function convert_r16g16_snorm
_convert_r16g16_snorm:                  ## @convert_r16g16_snorm
	.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
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, -48(%rbp)                 ## 4-byte Spill
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movl	32(%rbp), %ecx
	testl	%ecx, %ecx
	je	LBB0_12
## %bb.1:
	movl	16(%rbp), %eax
	movl	%ecx, %ecx
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movl	24(%rbp), %ebx
	movl	%eax, %ecx
	andl	$-2, %ecx
	xorl	%r15d, %r15d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	incq	%r15
	cmpq	-72(%rbp), %r15                 ## 8-byte Folded Reload
	je	LBB0_12
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
                                        ##       Child Loop BB0_7 Depth 3
	cmpl	$0, 24(%rbp)
	je	LBB0_11
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%r15d, %esi
	imull	-44(%rbp), %esi                 ## 4-byte Folded Reload
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	leaq	(%rdi,%rsi,4), %r12
	movl	%r15d, %esi
	imull	-48(%rbp), %esi                 ## 4-byte Folded Reload
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	leaq	(%rdi,%rsi,4), %r13
	xorl	%r10d, %r10d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_4 Depth=2
	incq	%r10
	cmpq	%rbx, %r10
	je	LBB0_11
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_7 Depth 3
	testl	%eax, %eax
	je	LBB0_10
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=2
	movl	%r10d, %esi
	imull	%r8d, %esi
	movl	%r10d, %edi
	imull	%edx, %edi
	leaq	(,%rsi,4), %r11
	addq	%r13, %r11
	leaq	(%r12,%rdi,4), %r9
	cmpl	$1, %eax
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=2
	movl	%ecx, %r14d
	.p2align	4, 0x90
LBB0_7:                                 ##   Parent Loop BB0_2 Depth=1
                                        ##     Parent Loop BB0_4 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movl	(%r9), %esi
	movw	$-1, (%r11)
	movl	%esi, %edi
	shrl	$16, %edi
	xorl	$32768, %edi                    ## imm = 0x8000
	movw	%di, 2(%r11)
	xorl	$32768, %esi                    ## imm = 0x8000
	movw	%si, 4(%r11)
	movl	4(%r9), %esi
	addq	$8, %r9
	movw	$-1, 6(%r11)
	movl	%esi, %edi
	shrl	$16, %edi
	xorl	$32768, %edi                    ## imm = 0x8000
	movw	%di, 8(%r11)
	xorl	$32768, %esi                    ## imm = 0x8000
	movw	%si, 10(%r11)
	addq	$12, %r11
	addl	$-2, %r14d
	jne	LBB0_7
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=2
	testb	$1, %al
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=2
	movl	(%r9), %esi
	movw	$-1, (%r11)
	movl	%esi, %edi
	shrl	$16, %edi
	xorl	$32768, %edi                    ## imm = 0x8000
	movw	%di, 2(%r11)
	xorl	$32768, %esi                    ## imm = 0x8000
	movw	%si, 4(%r11)
	jmp	LBB0_10
LBB0_12:
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_convert_r16g16_snorm
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function convert_r16g16_snorm
_convert_r16g16_snorm:                  ; @convert_r16g16_snorm
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	str	w7, [sp, #44]                   ; 4-byte Folded Spill
	stp	x0, x1, [sp, #24]               ; 16-byte Folded Spill
	ldr	w7, [sp, #144]
	cbz	w7, LBB0_14
; %bb.1:
	mov	w13, #0
	mov	w15, #0
	mov	x9, #0
	ldr	w8, [sp, #44]                   ; 4-byte Folded Reload
	mov	w10, w8
	sub	w11, w6, #1
	add	x12, x11, #1
	and	x8, x12, #0x1fffffff0
	add	x14, x8, x8, lsl #1
	ldr	x16, [sp, #32]                  ; 8-byte Folded Reload
	add	x17, x16, #48
	ldr	x16, [sp, #24]                  ; 8-byte Folded Reload
	add	x16, x16, #32
	stp	x16, x17, [sp, #8]              ; 16-byte Folded Spill
	mov	w17, #65535
	movi.4h	v0, #128, lsl #8
	movi.2d	v1, #0xffffffffffffffff
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x9, x9, #1
	add	w15, w19, w5
	add	w13, w20, w3
	cmp	x9, x7
	b.eq	LBB0_14
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
                                        ;       Child Loop BB0_10 Depth 3
                                        ;       Child Loop BB0_13 Depth 3
	mov	w19, w15
	mov	w20, w13
	ldr	w13, [sp, #44]                  ; 4-byte Folded Reload
	cbz	w13, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w21, #0
	mov	w22, #0
	mov	x23, #0
	mul	w13, w9, w3
	ldr	x15, [sp, #24]                  ; 8-byte Folded Reload
	add	x24, x15, w13, uxtw #2
	mul	w13, w9, w5
	ldr	x15, [sp, #32]                  ; 8-byte Folded Reload
	add	x25, x15, w13, uxtw #2
	ldr	x13, [sp, #16]                  ; 8-byte Folded Reload
	add	x26, x13, x19, lsl #2
	ldr	x13, [sp, #8]                   ; 8-byte Folded Reload
	add	x27, x13, x20, lsl #2
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=2
	add	x23, x23, #1
	add	w22, w22, w4
	add	w21, w21, w2
	cmp	x23, x10
	b.eq	LBB0_2
LBB0_6:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_10 Depth 3
                                        ;       Child Loop BB0_13 Depth 3
	cbz	w6, LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	mul	w13, w23, w4
	add	x28, x25, w13, uxtw #2
	mul	w13, w23, w2
	add	x30, x24, w13, uxtw #2
	cmp	w11, #15
	b.hs	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=2
	mov	w13, #0
	b	LBB0_12
LBB0_9:                                 ;   in Loop: Header=BB0_6 Depth=2
	add	x16, x26, w22, uxtw #2
	add	x15, x27, w21, uxtw #2
	add	x28, x28, x14, lsl #1
	mov	x13, x8
	add	x30, x30, x8, lsl #2
LBB0_10:                                ;   Parent Loop BB0_3 Depth=1
                                        ;     Parent Loop BB0_6 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldp	q4, q5, [x15, #-32]
	ldp	q6, q7, [x15], #64
	shrn.4h	v16, v4, #16
	shrn.4h	v17, v5, #16
	shrn.4h	v18, v6, #16
	shrn.4h	v19, v7, #16
	eor.8b	v21, v16, v0
	eor.8b	v24, v17, v0
	eor.8b	v17, v18, v0
	eor.8b	v2, v19, v0
	xtn.4h	v4, v4
	xtn.4h	v5, v5
	xtn.4h	v6, v6
	xtn.4h	v7, v7
	eor.8b	v22, v4, v0
	eor.8b	v25, v5, v0
	eor.8b	v18, v6, v0
	eor.8b	v3, v7, v0
	sub	x1, x16, #48
	sub	x0, x16, #24
	fmov	d20, d1
	st3.4h	{ v20, v21, v22 }, [x1]
	fmov	d16, d1
	fmov	d23, d1
	st3.4h	{ v23, v24, v25 }, [x0]
	add	x0, x16, #96
	st3.4h	{ v16, v17, v18 }, [x16], #24
	st3.4h	{ v1, v2, v3 }, [x16]
	mov	x16, x0
	subs	x13, x13, #16
	b.ne	LBB0_10
; %bb.11:                               ;   in Loop: Header=BB0_6 Depth=2
	mov	x13, x8
	cmp	x12, x8
	b.eq	LBB0_5
LBB0_12:                                ;   in Loop: Header=BB0_6 Depth=2
	sub	w13, w6, w13
LBB0_13:                                ;   Parent Loop BB0_3 Depth=1
                                        ;     Parent Loop BB0_6 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldr	w15, [x30], #4
	strh	w17, [x28]
	lsr	w16, w15, #16
	eor	w16, w16, #0x8000
	strh	w16, [x28, #2]
	eor	w15, w15, #0x8000
	strh	w15, [x28, #4]
	add	x28, x28, #6
	subs	w13, w13, #1
	b.ne	LBB0_13
	b	LBB0_5
LBB0_14:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_convert_r16g16_snorm
.subsections_via_symbols
