	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bswap_16bpc
_bswap_16bpc:                           ## @bswap_16bpc
	.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
	subq	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -88(%rbp)                  ## 8-byte Spill
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
	movl	%ecx, -52(%rbp)                 ## 4-byte Spill
	movq	%rdx, -80(%rbp)                 ## 8-byte Spill
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	xorl	%ecx, %ecx
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	-96(%rbp), %rcx                 ## 8-byte Reload
	incq	%rcx
	cmpq	$4, %rcx
	je	LBB0_11
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
                                        ##       Child Loop BB0_7 Depth 3
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax,%rcx,4), %eax
	movl	%eax, %r12d
	shrl	$31, %r12d
	addl	%eax, %r12d
	sarl	%r12d
	movq	16(%rbp), %rax
	movl	(%rax,%rcx,4), %eax
	movl	%eax, %r13d
	shrl	$31, %r13d
	addl	%eax, %r13d
	sarl	%r13d
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax,%rcx,8), %r15
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	%rcx, -96(%rbp)                 ## 8-byte Spill
	movq	(%rax,%rcx,8), %rbx
	movl	%r12d, %edi
	callq	_FFABS
	movl	%eax, %r14d
	movl	%r13d, %edi
	callq	_FFABS
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_FFMIN
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	testq	%r15, %r15
	je	LBB0_10
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	testq	%rbx, %rbx
	je	LBB0_10
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %ecx
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	sarl	%cl, %eax
	testl	%eax, %eax
	jle	LBB0_10
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	sarl	%cl, %eax
	imull	%r13d, %eax
	cltq
	leaq	(%r15,%rax,4), %r15
	movslq	%r12d, %rax
	movslq	%r13d, %rdx
	movl	-48(%rbp), %r14d                ## 4-byte Reload
	shlq	$2, %rdx
	movq	%rdx, -104(%rbp)                ## 8-byte Spill
	shlq	$2, %rax
	movq	%rax, -112(%rbp)                ## 8-byte Spill
	xorl	%r12d, %r12d
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_5 Depth=2
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	sarl	%cl, %eax
	incl	%r12d
	addq	-104(%rbp), %r15                ## 8-byte Folded Reload
	addq	-112(%rbp), %rbx                ## 8-byte Folded Reload
	cmpl	%eax, %r12d
	jge	LBB0_10
LBB0_5:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_7 Depth 3
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	jle	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=2
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_7:                                 ##   Parent Loop BB0_1 Depth=1
                                        ##     Parent Loop BB0_5 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movl	(%rbx,%r13,4), %edi
	callq	_av_bswap16
	movl	%eax, (%r15,%r13,4)
	incq	%r13
	cmpq	%r13, %r14
	jne	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=2
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %ecx
	jmp	LBB0_9
LBB0_11:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_bswap_16bpc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bswap_16bpc
_bswap_16bpc:                           ; @bswap_16bpc
	.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
	add	x29, sp, #128
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	stp	x5, x6, [sp, #24]               ; 16-byte Folded Spill
	mov	x20, x4
	str	w3, [sp, #4]                    ; 4-byte Folded Spill
	stp	x1, x2, [sp, #8]                ; 16-byte Folded Spill
	str	x0, [sp, #40]                   ; 8-byte Folded Spill
	mov	x22, #0
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	add	x22, x22, #1
	cmp	x22, #4
	b.eq	LBB0_10
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
                                        ;       Child Loop BB0_8 Depth 3
	lsl	x8, x22, #2
	ldr	x9, [sp, #16]                   ; 8-byte Folded Reload
	ldr	w9, [x9, x8]
	cmp	w9, #0
	cinc	w9, w9, lt
	asr	w27, w9, #1
	ldr	x9, [sp, #32]                   ; 8-byte Folded Reload
	ldr	w8, [x9, x8]
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w28, w8, #1
	lsl	x8, x22, #3
	ldr	x9, [sp, #24]                   ; 8-byte Folded Reload
	ldr	x23, [x9, x8]
	ldr	x9, [sp, #8]                    ; 8-byte Folded Reload
	ldr	x19, [x9, x8]
	mov	x0, x27
	bl	_FFABS
	mov	x26, x0
	mov	x0, x28
	bl	_FFABS
	mov	x1, x0
	mov	x0, x26
	bl	_FFMIN
	cmp	x23, #0
	ccmp	x19, #0, #4, ne
	b.eq	LBB0_1
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [sp, #40]                   ; 8-byte Folded Reload
	ldr	w8, [x8]
	asr	w9, w20, w8
	cmp	w9, #1
	b.lt	LBB0_1
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x26, x0
	mov	w21, #0
	ldr	w9, [sp, #4]                    ; 4-byte Folded Reload
	asr	w9, w9, w8
	mul	w9, w9, w28
	add	x23, x23, w9, sxtw #2
	mov	w9, w0
	sbfiz	x28, x28, #2, #32
	sbfiz	x27, x27, #2, #32
	lsl	x24, x9, #2
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=2
	add	w21, w21, #1
	asr	w9, w20, w8
	add	x23, x23, x28
	add	x19, x19, x27
	cmp	w21, w9
	b.ge	LBB0_1
LBB0_6:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_8 Depth 3
	cmp	w26, #1
	b.lt	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	mov	x25, #0
LBB0_8:                                 ;   Parent Loop BB0_2 Depth=1
                                        ;     Parent Loop BB0_6 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldr	w0, [x19, x25]
	bl	_av_bswap16
	str	w0, [x23, x25]
	add	x25, x25, #4
	cmp	x24, x25
	b.ne	LBB0_8
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=2
	ldr	x8, [sp, #40]                   ; 8-byte Folded Reload
	ldr	w8, [x8]
	b	LBB0_5
LBB0_10:
	mov	x0, x20
	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	_bswap_16bpc
.subsections_via_symbols
