	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function add_guc_variable
_add_guc_variable:                      ## @add_guc_variable
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	_num_guc_variables@GOTPCREL(%rip), %r14
	movl	(%r14), %ecx
	leal	1(%rcx), %edx
	movq	_size_guc_variables@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	cmpl	%eax, %edx
	jge	LBB0_2
## %bb.1:
	movq	_guc_variables@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	jmp	LBB0_8
LBB0_2:
	leal	3(%rax), %ebx
	testl	%eax, %eax
	cmovnsl	%eax, %ebx
	sarl	$2, %ebx
	addl	%eax, %ebx
	je	LBB0_3
## %bb.4:
	movq	_guc_variables@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	leal	(,%rbx,8), %edx
	movl	%esi, %edi
	movq	%rax, %rsi
	callq	_guc_realloc
	testq	%rax, %rax
	je	LBB0_6
LBB0_7:
	movq	_guc_variables@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movl	%ebx, (%r15)
	movl	(%r14), %ecx
	leal	1(%rcx), %edx
LBB0_8:
	movl	%edx, (%r14)
	movslq	%ecx, %rcx
	movq	%r12, (%rax,%rcx,8)
	movq	_guc_variables@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	_guc_var_compare@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%edx, %esi
	movl	$8, %edx
	callq	_qsort
	movl	$1, %eax
	jmp	LBB0_9
LBB0_3:
	movl	%esi, %edi
	movl	$800, %esi                      ## imm = 0x320
	callq	_guc_malloc
	movl	$100, %ebx
	testq	%rax, %rax
	jne	LBB0_7
LBB0_6:
	xorl	%eax, %eax
LBB0_9:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_num_guc_variables,4,2          ## @num_guc_variables
	.comm	_size_guc_variables,4,2         ## @size_guc_variables
	.comm	_guc_variables,8,3              ## @guc_variables
	.comm	_guc_var_compare,4,2            ## @guc_var_compare
	.no_dead_strip	_add_guc_variable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function add_guc_variable
_add_guc_variable:                      ; @add_guc_variable
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x8, x1
	mov	x19, x0
Lloh0:
	adrp	x20, _num_guc_variables@GOTPAGE
Lloh1:
	ldr	x20, [x20, _num_guc_variables@GOTPAGEOFF]
	ldr	w9, [x20]
	add	w1, w9, #1
Lloh2:
	adrp	x22, _size_guc_variables@GOTPAGE
Lloh3:
	ldr	x22, [x22, _size_guc_variables@GOTPAGEOFF]
	ldr	w10, [x22]
Lloh4:
	adrp	x21, _guc_variables@GOTPAGE
Lloh5:
	ldr	x21, [x21, _guc_variables@GOTPAGEOFF]
	cmp	w1, w10
	b.ge	LBB0_2
; %bb.1:
	ldr	x0, [x21]
	b	LBB0_6
LBB0_2:
	add	w9, w10, #3
	cmp	w10, #0
	csel	w9, w9, w10, lt
	adds	w23, w10, w9, asr #2
	b.eq	LBB0_4
; %bb.3:
	ldr	x1, [x21]
	lsl	w2, w23, #3
	mov	x0, x8
	bl	_guc_realloc
	cbnz	x0, LBB0_5
	b	LBB0_7
LBB0_4:
	mov	x0, x8
	mov	w1, #800
	bl	_guc_malloc
	mov	w23, #100
	cbz	x0, LBB0_7
LBB0_5:
	str	x0, [x21]
	str	w23, [x22]
	ldr	w9, [x20]
	add	w1, w9, #1
LBB0_6:
	str	w1, [x20]
	str	x19, [x0, w9, sxtw #3]
	ldr	x0, [x21]
Lloh6:
	adrp	x8, _guc_var_compare@GOTPAGE
Lloh7:
	ldr	x8, [x8, _guc_var_compare@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
	mov	w2, #8
	bl	_qsort
	mov	w0, #1
LBB0_7:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_num_guc_variables,4,2          ; @num_guc_variables
	.comm	_size_guc_variables,4,2         ; @size_guc_variables
	.comm	_guc_variables,8,3              ; @guc_variables
	.comm	_guc_var_compare,4,2            ; @guc_var_compare
	.no_dead_strip	_add_guc_variable
.subsections_via_symbols
