	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_generate_trgm                  ## -- Begin function generate_trgm
	.p2align	4, 0x90
_generate_trgm:                         ## @generate_trgm
	.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
	movl	%esi, %ebx
	movq	%rdi, %r15
	movl	%esi, %edi
	callq	_protect_out_of_mem
	movq	_TRGMHDRSIZE@GOTPCREL(%rip), %rax
	movl	%ebx, %ecx
	shrl	$31, %ecx
	addl	%ebx, %ecx
	sarl	%ecx
	incl	%ecx
	movslq	%ecx, %rcx
	leaq	(%rcx,%rcx,2), %rdi
	shlq	$2, %rdi
	addq	(%rax), %rdi
	callq	_palloc
	movq	%rax, %r14
	movq	_ARRKEY@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	movl	%eax, (%r14)
	movq	%r14, %rdi
	callq	_GETARR
	movq	%rax, %rdi
	movq	%r15, %rsi
	movl	%ebx, %edx
	xorl	%ecx, %ecx
	callq	_generate_trgm_only
	movl	%eax, %ebx
	movl	(%r12), %edi
	movl	%eax, %esi
	callq	_CALCGTSIZE
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_SET_VARSIZE
	testl	%ebx, %ebx
	je	LBB0_4
## %bb.1:
	cmpl	$2, %ebx
	jl	LBB0_3
## %bb.2:
	movq	%r14, %rdi
	callq	_GETARR
	movq	_comp_trgm@GOTPCREL(%rip), %r15
	movl	(%r15), %ecx
	movq	%rax, %rdi
	movl	%ebx, %esi
	movl	$4, %edx
	callq	_qsort
	movq	%r14, %rdi
	callq	_GETARR
	movl	(%r15), %ecx
	movq	%rax, %rdi
	movl	%ebx, %esi
	movl	$4, %edx
	callq	_qunique
	movl	%eax, %ebx
LBB0_3:
	movl	(%r12), %edi
	movl	%ebx, %esi
	callq	_CALCGTSIZE
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_SET_VARSIZE
LBB0_4:
	movq	%r14, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TRGMHDRSIZE,8,3                ## @TRGMHDRSIZE
	.comm	_ARRKEY,4,2                     ## @ARRKEY
	.comm	_comp_trgm,4,2                  ## @comp_trgm
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_generate_trgm                  ; -- Begin function generate_trgm
	.p2align	2
_generate_trgm:                         ; @generate_trgm
	.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
	mov	x20, x1
	mov	x21, x0
	mov	x0, x1
	bl	_protect_out_of_mem
Lloh0:
	adrp	x8, _TRGMHDRSIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TRGMHDRSIZE@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	w20, #0
	cinc	w9, w20, lt
	asr	w9, w9, #1
	add	w9, w9, #1
	mov	w10, #12
	smaddl	x0, w9, w10, x8
	bl	_palloc
	mov	x19, x0
Lloh3:
	adrp	x22, _ARRKEY@GOTPAGE
Lloh4:
	ldr	x22, [x22, _ARRKEY@GOTPAGEOFF]
	ldr	w8, [x22]
	str	w8, [x0]
	bl	_GETARR
	mov	x1, x21
	mov	x2, x20
	mov	x3, #0
	bl	_generate_trgm_only
	mov	x20, x0
	ldr	w0, [x22]
	mov	x1, x20
	bl	_CALCGTSIZE
	mov	x1, x0
	mov	x0, x19
	bl	_SET_VARSIZE
	cbz	w20, LBB0_4
; %bb.1:
	cmp	w20, #2
	b.lt	LBB0_3
; %bb.2:
	mov	x0, x19
	bl	_GETARR
Lloh5:
	adrp	x21, _comp_trgm@GOTPAGE
Lloh6:
	ldr	x21, [x21, _comp_trgm@GOTPAGEOFF]
	ldr	w3, [x21]
	mov	x1, x20
	mov	w2, #4
	bl	_qsort
	mov	x0, x19
	bl	_GETARR
	ldr	w3, [x21]
	mov	x1, x20
	mov	w2, #4
	bl	_qunique
	mov	x20, x0
LBB0_3:
	ldr	w0, [x22]
	mov	x1, x20
	bl	_CALCGTSIZE
	mov	x1, x0
	mov	x0, x19
	bl	_SET_VARSIZE
LBB0_4:
	mov	x0, x19
	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
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_TRGMHDRSIZE,8,3                ; @TRGMHDRSIZE
	.comm	_ARRKEY,4,2                     ; @ARRKEY
	.comm	_comp_trgm,4,2                  ; @comp_trgm
.subsections_via_symbols
