	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rlwit_discharge                ## -- Begin function rlwit_discharge
	.p2align	4, 0x90
_rlwit_discharge:                       ## @rlwit_discharge
	.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	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	testq	%rdx, %rdx
	je	LBB0_1
## %bb.2:
	movq	%rdi, %r13
	xorl	%ebx, %ebx
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	callq	_rlwit_word_size
	testq	%rax, %rax
	jle	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	16(%r13), %rax
	leaq	(%rax,%rbx), %rcx
	movq	%r12, %r15
	subq	%rbx, %r15
	cmpq	%r12, %rcx
	cmovbeq	%rax, %r15
	movl	24(%r13), %esi
	xorl	-44(%rbp), %esi                 ## 4-byte Folded Reload
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %rdx
	callq	_ewah_add_empty_words
	addq	%r15, %rbx
	movq	32(%r13), %rax
	leaq	(%rbx,%rax), %rcx
	movq	%r12, %r14
	subq	%rbx, %r14
	cmpq	%r12, %rcx
	cmovbeq	%rax, %r14
	movq	(%r13), %rsi
	addq	8(%r13), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rdx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	callq	_ewah_add_dirty_words
	addq	%r14, %r15
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_rlwit_discard_first_words
	addq	%r14, %rbx
	cmpq	%r12, %rbx
	jb	LBB0_3
	jmp	LBB0_5
LBB0_1:
	xorl	%ebx, %ebx
LBB0_5:
	movq	%rbx, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	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	_rlwit_discharge                ; -- Begin function rlwit_discharge
	.p2align	2
_rlwit_discharge:                       ; @rlwit_discharge
	.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
	cbz	x2, LBB0_4
; %bb.1:
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	mov	x23, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	bl	_rlwit_word_size
	cmp	x0, #1
	b.lt	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x22, #16]
	sub	x9, x20, x23
	add	x10, x8, x23
	cmp	x10, x20
	csel	x24, x9, x8, hi
	ldr	w8, [x22, #24]
	eor	w1, w8, w19
	mov	x0, x21
	mov	x2, x24
	bl	_ewah_add_empty_words
	ldr	x8, [x22, #32]
	add	x25, x24, x23
	add	x9, x25, x8
	sub	x10, x20, x25
	cmp	x9, x20
	csel	x23, x10, x8, hi
	ldp	x9, x8, [x22]
	add	x1, x9, x8
	mov	x0, x21
	mov	x2, x23
	mov	x3, x19
	bl	_ewah_add_dirty_words
	add	x1, x23, x24
	mov	x0, x22
	bl	_rlwit_discard_first_words
	add	x23, x23, x25
	cmp	x23, x20
	b.lo	LBB0_2
	b	LBB0_5
LBB0_4:
	mov	x23, #0
LBB0_5:
	mov	x0, x23
	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
.subsections_via_symbols
