	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function count_sad
_count_sad:                             ## @count_sad
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rsi, %rsi
	je	LBB0_1
## %bb.2:
	movq	%rsi, %r15
	movq	%rdi, %r14
	cmpq	$1, %rsi
	jne	LBB0_4
## %bb.3:
	xorl	%r12d, %r12d
	xorl	%ebx, %ebx
LBB0_10:
	testb	$1, %r15b
	je	LBB0_13
## %bb.11:
	movq	(%r14,%rbx,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_13
## %bb.12:
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_abs
	addl	%eax, %r12d
	jmp	LBB0_13
LBB0_1:
	xorl	%r12d, %r12d
LBB0_13:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	%r15, %r13
	andq	$-2, %r13
	xorl	%r12d, %r12d
	xorl	%ebx, %ebx
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_5 Depth=1
	addq	$2, %rbx
	cmpq	%rbx, %r13
	je	LBB0_10
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r14,%rbx,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_abs
	addl	%eax, %r12d
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	8(%r14,%rbx,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_abs
	addl	%eax, %r12d
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_count_sad
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function count_sad
_count_sad:                             ; @count_sad
	.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
	cbz	x1, LBB0_5
; %bb.1:
	mov	x19, x1
	mov	x20, x0
	mov	w21, #0
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x20, x20, #8
	subs	x19, x19, #1
	b.eq	LBB0_6
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x20]
	cbz	x0, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_abs
	add	w21, w21, w0
	b	LBB0_2
LBB0_5:
	mov	w21, #0
LBB0_6:
	mov	x0, x21
	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
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_count_sad
.subsections_via_symbols
