	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function write_pixel_15_7
_write_pixel_15_7:                      ## @write_pixel_15_7
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	%rdx, %rbx
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r13
	movq	%rdx, %rdi
	callq	_pixel_color15
	movl	%eax, %r12d
	movq	%rbx, %rdi
	callq	_pixel_bgr
	movl	%eax, %r15d
	movl	%eax, %esi
	andl	$16316664, %esi                 ## imm = 0xF8F8F8
	movl	%eax, %edi
	callq	_chroma_diff
	movl	%eax, %r14d
	movq	%r13, %rdi
	movl	%r12d, %esi
	callq	_pixel_color7_fast
	movl	%eax, %ebx
	movq	(%r13), %rax
	movslq	%ebx, %rcx
	movl	(%rax,%rcx,4), %esi
	movl	%r15d, %edi
	callq	_chroma_diff
	addl	-44(%rbp), %r14d                ## 4-byte Folded Reload
	cmpl	%eax, %r14d
	jge	LBB0_1
## %bb.2:
	movl	%r12d, %eax
	shrl	$8, %eax
	orl	$128, %eax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	movzbl	%r12b, %eax
	movl	%eax, 4(%rcx)
	movl	$2, %eax
	jmp	LBB0_3
LBB0_1:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	%ebx, (%rax)
	movl	$1, %eax
LBB0_3:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_write_pixel_15_7
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function write_pixel_15_7
_write_pixel_15_7:                      ; @write_pixel_15_7
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x22, x3
	mov	x21, x2
	mov	x19, x1
	mov	x23, x0
	mov	x0, x2
	bl	_pixel_color15
	mov	x20, x0
	mov	x0, x21
	bl	_pixel_bgr
	mov	x24, x0
	mov	w8, #63736
	movk	w8, #248, lsl #16
	and	w1, w0, w8
	bl	_chroma_diff
	mov	x25, x0
	mov	x0, x23
	mov	x1, x20
	bl	_pixel_color7_fast
	mov	x21, x0
	ldr	x8, [x23]
	ldr	w1, [x8, w0, sxtw #2]
	mov	x0, x24
	bl	_chroma_diff
	add	w8, w25, w22
	cmp	w8, w0
	b.ge	LBB0_2
; %bb.1:
	lsr	w8, w20, #8
	orr	w8, w8, #0x80
	and	w9, w20, #0xff
	stp	w8, w9, [x19]
	mov	w0, #2
	b	LBB0_3
LBB0_2:
	str	w21, [x19]
	mov	w0, #1
LBB0_3:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_write_pixel_15_7
.subsections_via_symbols
