	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_chg_add                        ## -- Begin function chg_add
	.p2align	4, 0x90
_chg_add:                               ## @chg_add
	.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	%esi, %ebx
	movq	%rdi, %r15
	xorl	%edi, %edi
	testl	%esi, %esi
	setg	%dil
	callq	_assert
	movq	(%r15), %r12
	testq	%r12, %r12
	jns	LBB0_6
## %bb.1:
	movl	%ebx, %eax
	negl	%eax
	movslq	%eax, %r14
	cmpq	%r14, %r12
	je	LBB0_39
## %bb.2:
	negq	%r12
	movl	%ebx, %eax
	xorl	$1, %eax
	cltq
	cmpq	%rax, %r12
	je	LBB0_38
## %bb.3:
	movl	$12, %edi
	callq	_qmalloc
	movq	%rax, %r14
	xorl	%edi, %edi
	testq	%rax, %rax
	setne	%dil
	callq	_assert
	movl	$2, (%r14)
	cmpl	%ebx, %r12d
	jle	LBB0_5
## %bb.4:
	movl	%r12d, 4(%r14)
	movl	%ebx, 8(%r14)
	jmp	LBB0_38
LBB0_6:
	je	LBB0_37
## %bb.7:
	movl	(%r12), %edi
	testl	%edi, %edi
	jle	LBB0_8
## %bb.9:
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	andl	$-2, %ebx
	leal	1(%rdi), %eax
	movl	$1, %r13d
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r12,%r13,4), %edx
	movl	%edx, %esi
	andl	$-2, %esi
	cmpl	%ebx, %esi
	jle	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	incq	%r13
	cmpq	%r13, %rax
	jne	LBB0_10
## %bb.12:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movl	%eax, %r13d
	jmp	LBB0_16
LBB0_37:
	negl	%ebx
	movslq	%ebx, %r14
	jmp	LBB0_38
LBB0_8:
	movq	%r12, %r14
	testl	%edi, %edi
	jns	LBB0_38
	jmp	LBB0_36
LBB0_13:
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	cmpl	%esi, %edx
	je	LBB0_39
## %bb.14:
	movl	%esi, %ecx
	xorl	$1, %ecx
	cmpl	%ecx, %edx
	jne	LBB0_15
## %bb.40:
	movl	%esi, (%r12,%r13,4)
	jmp	LBB0_39
LBB0_5:
	movl	%ebx, 4(%r14)
	movl	%r12d, 8(%r14)
	jmp	LBB0_38
LBB0_15:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
LBB0_16:
	movl	%r13d, %r15d
	cmpl	%r13d, %edi
	jl	LBB0_22
## %bb.17:
	movl	%r13d, %ecx
	leaq	(%r12,%rcx,4), %rcx
	movl	%r13d, %r15d
	.p2align	4, 0x90
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	cmpl	$0, (%rcx)
	je	LBB0_19
## %bb.20:                              ##   in Loop: Header=BB0_18 Depth=1
	leal	1(%r15), %edx
	addq	$4, %rcx
	cmpl	%r15d, %edi
	movl	%edx, %r15d
	jg	LBB0_18
## %bb.21:
	movl	%eax, %r15d
LBB0_22:
	cmpl	$8, %edi
	jne	LBB0_24
## %bb.23:
	leaq	4(%r12), %rdi
	movl	$8, %esi
	callq	_trp_conv_from_array
	movl	%eax, %ebx
	movq	%r12, %rdi
	movl	$36, %esi
	callq	_qfree
	movl	$8, %edi
	callq	_qmalloc
	movl	$8, %edi
	movq	%rax, %r14
	movl	$-8, (%rax)
	movl	%ebx, 4(%rax)
	cmpl	%edi, %r15d
	jle	LBB0_26
	jmp	LBB0_34
LBB0_24:
	leal	(%rdi,%rdi), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	%rdi, %rbx
	leal	4(,%rdi,8), %edi
	callq	_qmalloc0
	movq	%rax, %r14
	xorl	%edi, %edi
	testq	%rax, %rax
	setne	%dil
	callq	_assert
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%r14)
	movq	%r14, %rdi
	addq	$4, %rdi
	leaq	4(%r12), %rsi
	movl	%ebx, %edx
	shll	$2, %edx
	callq	_memcpy
	leal	4(,%rbx,4), %esi
	movq	%r12, %rdi
	callq	_qfree
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, %edi
	cmpl	%edi, %r15d
	jle	LBB0_26
	jmp	LBB0_34
LBB0_19:
	movq	%r12, %r14
	cmpl	%edi, %r15d
	jg	LBB0_34
LBB0_26:
	movl	%r15d, %ecx
	subl	%r13d, %ecx
	je	LBB0_33
## %bb.27:
	movslq	%r15d, %rsi
	movl	%r13d, %edx
	notl	%edx
	addl	%r15d, %edx
	andl	$3, %ecx
	je	LBB0_28
	.p2align	4, 0x90
LBB0_29:                                ## =>This Inner Loop Header: Depth=1
	leaq	-1(%rsi), %rax
	movl	-4(%r14,%rsi,4), %edi
	movl	%edi, (%r14,%rsi,4)
	movq	%rax, %rsi
	decl	%ecx
	jne	LBB0_29
	jmp	LBB0_30
LBB0_28:
	movq	%rsi, %rax
LBB0_30:
	cmpl	$3, %edx
	jb	LBB0_33
## %bb.31:
	movl	%r13d, %ecx
	.p2align	4, 0x90
LBB0_32:                                ## =>This Inner Loop Header: Depth=1
	movups	-16(%r14,%rax,4), %xmm0
	movups	%xmm0, -12(%r14,%rax,4)
	leaq	-4(%rax), %rdx
	movq	%rdx, %rax
	cmpl	%edx, %ecx
	jne	LBB0_32
LBB0_33:
	movslq	%r13d, %rax
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, (%r14,%rax,4)
LBB0_34:
	movl	(%r14), %edi
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	testl	%edi, %edi
	jns	LBB0_38
LBB0_36:
	xorl	%eax, %eax
	callq	_my_rand
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_trp_add_or_set
LBB0_38:
	movq	%r14, (%r15)
LBB0_39:
	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	_chg_add                        ; -- Begin function chg_add
	.p2align	2
_chg_add:                               ; @chg_add
	.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	x20, x1
	mov	x19, x0
	cmp	w1, #0
	cset	w0, gt
	bl	_assert
	ldr	x21, [x19]
	cbz	x21, LBB0_14
; %bb.1:
	ldr	w23, [x21]
	cmp	w23, #1
	b.lt	LBB0_24
; %bb.2:
	and	w9, w20, #0xfffffffe
	add	w8, w23, #1
	mov	w24, #1
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w10, [x21, x24, lsl #2]
	and	w11, w10, #0xfffffffe
	cmp	w11, w9
	b.le	LBB0_15
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x24, x24, #1
	cmp	x8, x24
	b.ne	LBB0_3
; %bb.5:
	mov	x24, x8
LBB0_6:
	mov	x25, x24
	cmp	w23, w24
	b.lt	LBB0_11
; %bb.7:
	mov	w9, w24
	lsl	x9, x9, #2
	mov	x25, x24
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w10, [x21, x9]
	cbz	w10, LBB0_13
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	add	w10, w25, #1
	add	x9, x9, #4
	cmp	w23, w25
	mov	x25, x10
	b.gt	LBB0_8
; %bb.10:
	mov	x25, x8
LBB0_11:
	cmp	w23, #8
	b.ne	LBB0_18
; %bb.12:
	add	x0, x21, #4
	mov	w1, #8
	bl	_trp_conv_from_array
	mov	x22, x0
	mov	x0, x21
	mov	w1, #36
	bl	_qfree
	mov	w0, #8
	bl	_qmalloc
	mov	x21, x0
	mov	w8, #-8
	stp	w8, w22, [x0]
LBB0_13:
	cmp	w25, w23
	b.le	LBB0_19
	b	LBB0_23
LBB0_14:
	mov	w0, #8
	bl	_qmalloc0
	mov	x21, x0
	mov	w8, #1
	stp	w8, w20, [x0]
	b	LBB0_26
LBB0_15:
	cmp	w10, w20
	b.eq	LBB0_27
; %bb.16:
	eor	w9, w20, #0x1
	cmp	w10, w9
	b.ne	LBB0_6
; %bb.17:
	str	w20, [x21, x24, lsl #2]
	b	LBB0_27
LBB0_18:
	lsl	w26, w23, #1
	mov	w0, #4
	bfi	w0, w23, #3, #29
	bl	_qmalloc0
	mov	x22, x0
	cmp	x0, #0
	cset	w0, ne
	bl	_assert
	mov	x0, x22
	str	w26, [x0], #4
	add	x1, x21, #4
	lsl	w23, w23, #2
	mov	x2, x23
	bl	_memcpy
	add	w1, w23, #4
	mov	x0, x21
	bl	_qfree
	mov	x23, x26
	mov	x21, x22
	cmp	w25, w23
	b.gt	LBB0_23
LBB0_19:
	cmp	w25, w24
	b.eq	LBB0_22
; %bb.20:
	add	x10, x21, w25, sxtw #2
	sub	w8, w24, w25
	mov	x9, x10
LBB0_21:                                ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x9, #-4]!
	str	w11, [x10]
	mov	x10, x9
	adds	w8, w8, #1
	b.lo	LBB0_21
LBB0_22:
	str	w20, [x21, w24, sxtw #2]
LBB0_23:
	ldr	w23, [x21]
LBB0_24:
	tbz	w23, #31, LBB0_26
; %bb.25:
	bl	_my_rand
	mov	x2, x0
	mov	x0, x21
	mov	x1, x20
	bl	_trp_add_or_set
LBB0_26:
	str	x21, [x19]
LBB0_27:
	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
