	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pg_regprefix                   ## -- Begin function pg_regprefix
	.p2align	4, 0x90
_pg_regprefix:                          ## @pg_regprefix
	.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
	testq	%rsi, %rsi
	je	LBB0_7
## %bb.1:
	movq	%rdx, %r14
	testq	%rdx, %rdx
	je	LBB0_7
## %bb.2:
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	$0, (%rsi)
	movq	$0, (%r14)
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.3:
	movq	(%rbx), %rax
	movq	_REMAGIC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.4:
	cmpl	$4, 8(%rbx)
	jne	LBB0_10
## %bb.5:
	movl	24(%rbx), %edi
	callq	_pg_set_regex_collation
	movq	16(%rbx), %rbx
	movq	_REG_UIMPOSSIBLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_11
## %bb.6:
	movq	_REG_NOMATCH@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_7:
	movq	_REG_INVARG@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %ebx
LBB0_9:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	_REG_MIXED@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_11:
	xorl	%edi, %edi
	cmpq	$0, 8(%rbx)
	setne	%dil
	callq	_assert
	movq	8(%rbx), %r12
	movl	(%r12), %edi
	shll	$2, %edi
	callq	_MALLOC
	movq	%rax, (%r15)
	testq	%rax, %rax
	je	LBB0_15
## %bb.12:
	addq	$4, %rbx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movq	%rax, %rdx
	movq	%r14, %rcx
	callq	_findprefix
	movl	%eax, %ebx
	movslq	(%r12), %rax
	xorl	%edi, %edi
	cmpq	%rax, (%r14)
	setbe	%dil
	callq	_assert
	movq	_REG_PREFIX@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	je	LBB0_9
## %bb.13:
	movq	_REG_EXACT@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	je	LBB0_9
## %bb.14:
	movq	(%r15), %rdi
	callq	_FREE
	movq	$0, (%r15)
	movq	$0, (%r14)
	jmp	LBB0_9
LBB0_15:
	movq	_REG_ESPACE@GOTPCREL(%rip), %rax
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_INVARG,4,2                 ## @REG_INVARG
	.comm	_REMAGIC,8,3                    ## @REMAGIC
	.comm	_REG_MIXED,4,2                  ## @REG_MIXED
	.comm	_REG_UIMPOSSIBLE,4,2            ## @REG_UIMPOSSIBLE
	.comm	_REG_NOMATCH,4,2                ## @REG_NOMATCH
	.comm	_REG_ESPACE,4,2                 ## @REG_ESPACE
	.comm	_REG_PREFIX,4,2                 ## @REG_PREFIX
	.comm	_REG_EXACT,4,2                  ## @REG_EXACT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pg_regprefix                   ; -- Begin function pg_regprefix
	.p2align	2
_pg_regprefix:                          ; @pg_regprefix
	.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_7
; %bb.1:
	mov	x19, x2
	cbz	x2, LBB0_7
; %bb.2:
	mov	x20, x1
	mov	x21, x0
	str	xzr, [x1]
	str	xzr, [x19]
	cbz	x0, LBB0_7
; %bb.3:
	ldr	x8, [x21]
Lloh0:
	adrp	x9, _REMAGIC@GOTPAGE
Lloh1:
	ldr	x9, [x9, _REMAGIC@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.4:
	ldr	w8, [x21, #8]
	cmp	w8, #4
	b.ne	LBB0_10
; %bb.5:
	ldr	w0, [x21, #24]
	bl	_pg_set_regex_collation
	ldr	x21, [x21, #16]
	ldr	w8, [x21]
Lloh3:
	adrp	x9, _REG_UIMPOSSIBLE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _REG_UIMPOSSIBLE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.6:
Lloh6:
	adrp	x8, _REG_NOMATCH@GOTPAGE
Lloh7:
	ldr	x8, [x8, _REG_NOMATCH@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh8:
	adrp	x8, _REG_INVARG@GOTPAGE
Lloh9:
	ldr	x8, [x8, _REG_INVARG@GOTPAGEOFF]
LBB0_8:
	ldr	w21, [x8]
LBB0_9:
	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
LBB0_10:
Lloh10:
	adrp	x8, _REG_MIXED@GOTPAGE
Lloh11:
	ldr	x8, [x8, _REG_MIXED@GOTPAGEOFF]
	b	LBB0_8
LBB0_11:
	ldr	x8, [x21, #8]
	cmp	x8, #0
	cset	w0, ne
	bl	_assert
	ldr	x22, [x21, #8]
	ldr	w8, [x22]
	lsl	w0, w8, #2
	bl	_MALLOC
	str	x0, [x20]
	cbz	x0, LBB0_14
; %bb.12:
	mov	x2, x0
	add	x1, x21, #4
	mov	x0, x22
	mov	x3, x19
	bl	_findprefix
	mov	x21, x0
	ldr	x8, [x19]
	ldrsw	x9, [x22]
	cmp	x8, x9
	cset	w0, ls
	bl	_assert
Lloh12:
	adrp	x8, _REG_PREFIX@GOTPAGE
Lloh13:
	ldr	x8, [x8, _REG_PREFIX@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
Lloh15:
	adrp	x9, _REG_EXACT@GOTPAGE
Lloh16:
	ldr	x9, [x9, _REG_EXACT@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	cmp	w21, w8
	ccmp	w21, w9, #4, ne
	b.eq	LBB0_9
; %bb.13:
	ldr	x0, [x20]
	bl	_FREE
	str	xzr, [x20]
	str	xzr, [x19]
	b	LBB0_9
LBB0_14:
Lloh18:
	adrp	x8, _REG_ESPACE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _REG_ESPACE@GOTPAGEOFF]
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_INVARG,4,2                 ; @REG_INVARG
	.comm	_REMAGIC,8,3                    ; @REMAGIC
	.comm	_REG_MIXED,4,2                  ; @REG_MIXED
	.comm	_REG_UIMPOSSIBLE,4,2            ; @REG_UIMPOSSIBLE
	.comm	_REG_NOMATCH,4,2                ; @REG_NOMATCH
	.comm	_REG_ESPACE,4,2                 ; @REG_ESPACE
	.comm	_REG_PREFIX,4,2                 ; @REG_PREFIX
	.comm	_REG_EXACT,4,2                  ; @REG_EXACT
.subsections_via_symbols
