	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pgtypes_fmt_replace            ## -- Begin function pgtypes_fmt_replace
	.p2align	4, 0x90
_pgtypes_fmt_replace:                   ## @pgtypes_fmt_replace
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	leal	-128(%rbx), %r14d
	cmpl	$10, %r14d
	ja	LBB0_27
## %bb.1:
	movq	%rcx, %r15
	movq	%rdi, %r13
	movl	$799, %eax                      ## imm = 0x31F
	btl	%r14d, %eax
	jae	LBB0_2
## %bb.9:
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	_PGTYPES_FMT_NUM_MAX_DIGITS@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_pgtypes_alloc
	testq	%rax, %rax
	je	LBB0_10
## %bb.11:
	movq	%rax, %r12
	xorl	%eax, %eax
	cmpl	$9, %r14d
	ja	LBB0_21
## %bb.12:
	movq	%r13, %xmm0
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%r14,4), %rdx
	addq	%rcx, %rdx
	jmpq	*%rdx
LBB0_19:
	movl	(%rbx), %esi
	leaq	L_.str.5(%rip), %rdx
	jmp	LBB0_20
LBB0_2:
	movl	$96, %eax
	btl	%r14d, %eax
	jae	LBB0_3
## %bb.6:
	movq	%rdx, %r14
	movq	%r13, %rdi
	callq	_strlen
	movl	%eax, %r12d
	movl	$-1, %eax
	cmpl	(%r15), %r12d
	jge	LBB0_28
## %bb.7:
	leal	1(%r12), %edx
	movq	(%r14), %rdi
	movq	%r13, %rsi
	callq	_memcpy
	subl	%r12d, (%r15)
	movslq	%r12d, %rax
	addq	%rax, (%r14)
	cmpl	$133, %ebx
	jne	LBB0_27
## %bb.8:
	movq	%r13, %rdi
	jmp	LBB0_26
LBB0_10:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_28
LBB0_3:
	cmpl	$10, %r14d
	jne	LBB0_27
## %bb.4:
	movl	$-1, %eax
	cmpl	$2, (%r15)
	jl	LBB0_28
## %bb.5:
	movq	(%rdx), %rax
	movb	%r13b, (%rax)
	movq	(%rdx), %rax
	movb	$0, 1(%rax)
	decl	(%r15)
	incq	(%rdx)
	jmp	LBB0_27
LBB0_18:
	movl	(%rbx), %esi
	leaq	L_.str.4(%rip), %rdx
	jmp	LBB0_20
LBB0_16:
	movl	(%rbx), %esi
	leaq	L_.str.2(%rip), %rdx
	jmp	LBB0_20
LBB0_17:
	movl	(%rbx), %esi
	leaq	L_.str.3(%rip), %rdx
	jmp	LBB0_20
LBB0_15:
	movl	(%rbx), %esi
	leaq	L_.str.1(%rip), %rdx
	jmp	LBB0_20
LBB0_14:
	movl	(%rbx), %esi
	movq	_INT64_FORMAT@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	jmp	LBB0_20
LBB0_13:
	movl	(%rbx), %esi
	leaq	L_.str(%rip), %rdx
LBB0_20:
	movq	%r12, %rdi
	callq	_snprintf
LBB0_21:
	testl	%eax, %eax
	js	LBB0_23
## %bb.22:
	cmpl	(%rbx), %eax
	jge	LBB0_23
## %bb.24:
	movq	%r12, %rdi
	callq	_strlen
	subl	%eax, (%r15)
	jle	LBB0_23
## %bb.25:
	movl	%eax, %ebx
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	(%r14), %rdi
	movq	%r12, %rsi
	callq	_strcpy
	movslq	%ebx, %rax
	addq	%rax, (%r14)
	movq	%r12, %rdi
LBB0_26:
	callq	_free
LBB0_27:
	xorl	%eax, %eax
	jmp	LBB0_28
LBB0_23:
	movq	%r12, %rdi
	callq	_free
	movl	$-1, %eax
LBB0_28:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_19, LBB0_19-LJTI0_0
.set L0_0_set_18, LBB0_18-LJTI0_0
.set L0_0_set_16, LBB0_16-LJTI0_0
.set L0_0_set_17, LBB0_17-LJTI0_0
.set L0_0_set_15, LBB0_15-LJTI0_0
.set L0_0_set_21, LBB0_21-LJTI0_0
.set L0_0_set_14, LBB0_14-LJTI0_0
.set L0_0_set_13, LBB0_13-LJTI0_0
LJTI0_0:
	.long	L0_0_set_19
	.long	L0_0_set_18
	.long	L0_0_set_16
	.long	L0_0_set_17
	.long	L0_0_set_15
	.long	L0_0_set_21
	.long	L0_0_set_21
	.long	L0_0_set_21
	.long	L0_0_set_14
	.long	L0_0_set_13
	.end_data_region
                                        ## -- End function
	.comm	_PGTYPES_FMT_NUM_MAX_DIGITS,4,2 ## @PGTYPES_FMT_NUM_MAX_DIGITS
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%0.0g"

	.comm	_INT64_FORMAT,8,3               ## @INT64_FORMAT
L_.str.1:                               ## @.str.1
	.asciz	"%u"

L_.str.2:                               ## @.str.2
	.asciz	"%02u"

L_.str.3:                               ## @.str.3
	.asciz	"%2u"

L_.str.4:                               ## @.str.4
	.asciz	"%03u"

L_.str.5:                               ## @.str.5
	.asciz	"%04u"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pgtypes_fmt_replace            ; -- Begin function pgtypes_fmt_replace
	.p2align	2
_pgtypes_fmt_replace:                   ; @pgtypes_fmt_replace
	.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	x22, x0
	mov	w0, #0
	sub	w24, w1, #128
	cmp	w24, #10
	b.hi	LBB0_29
; %bb.1:
	mov	x20, x3
	mov	x19, x2
	mov	w8, #1
	lsl	w8, w8, w24
	mov	w9, #799
	tst	w8, w9
	b.eq	LBB0_6
; %bb.2:
Lloh0:
	adrp	x23, _PGTYPES_FMT_NUM_MAX_DIGITS@GOTPAGE
Lloh1:
	ldr	x23, [x23, _PGTYPES_FMT_NUM_MAX_DIGITS@GOTPAGEOFF]
	ldr	w0, [x23]
	bl	_pgtypes_alloc
	cbz	x0, LBB0_10
; %bb.3:
	mov	x21, x0
	mov	w0, #0
	cmp	w24, #9
	b.hi	LBB0_21
; %bb.4:
	fmov	d0, x22
Lloh2:
	adrp	x8, lJTI0_0@PAGE
Lloh3:
	add	x8, x8, lJTI0_0@PAGEOFF
	adr	x9, LBB0_5
	ldrb	w10, [x8, x24]
	add	x9, x9, x10, lsl #2
	br	x9
LBB0_5:
	ldr	w1, [x23]
Lloh4:
	adrp	x2, l_.str.5@PAGE
Lloh5:
	add	x2, x2, l_.str.5@PAGEOFF
	b	LBB0_20
LBB0_6:
	tst	w8, #0x60
	b.eq	LBB0_11
; %bb.7:
	mov	x21, x1
	mov	x0, x22
	bl	_strlen
	ldr	w8, [x20]
	cmp	w0, w8
	b.ge	LBB0_28
; %bb.8:
	mov	x23, x0
	add	w2, w0, #1
	ldr	x0, [x19]
	mov	x1, x22
	bl	_memcpy
	ldr	w8, [x20]
	sub	w8, w8, w23
	str	w8, [x20]
	ldr	x8, [x19]
	add	x8, x8, w23, sxtw
	str	x8, [x19]
	cmp	w21, #133
	b.ne	LBB0_26
; %bb.9:
	mov	x0, x22
	b	LBB0_25
LBB0_10:
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	b	LBB0_29
LBB0_11:
	cmp	w24, #10
	b.ne	LBB0_29
; %bb.12:
	ldr	w8, [x20]
	cmp	w8, #2
	b.lt	LBB0_28
; %bb.13:
	mov	w0, #0
	ldr	x8, [x19]
	strb	w22, [x8]
	ldr	x8, [x19]
	strb	wzr, [x8, #1]
	ldr	w8, [x20]
	sub	w8, w8, #1
	str	w8, [x20]
	ldr	x8, [x19]
	add	x8, x8, #1
	str	x8, [x19]
	b	LBB0_29
LBB0_14:
	ldr	w1, [x23]
Lloh9:
	adrp	x2, l_.str.4@PAGE
Lloh10:
	add	x2, x2, l_.str.4@PAGEOFF
	b	LBB0_20
LBB0_15:
	ldr	w1, [x23]
Lloh11:
	adrp	x2, l_.str.2@PAGE
Lloh12:
	add	x2, x2, l_.str.2@PAGEOFF
	b	LBB0_20
LBB0_16:
	ldr	w1, [x23]
Lloh13:
	adrp	x2, l_.str.3@PAGE
Lloh14:
	add	x2, x2, l_.str.3@PAGEOFF
	b	LBB0_20
LBB0_17:
	ldr	w1, [x23]
Lloh15:
	adrp	x2, l_.str.1@PAGE
Lloh16:
	add	x2, x2, l_.str.1@PAGEOFF
	b	LBB0_20
LBB0_18:
	ldr	w1, [x23]
Lloh17:
	adrp	x8, _INT64_FORMAT@GOTPAGE
Lloh18:
	ldr	x8, [x8, _INT64_FORMAT@GOTPAGEOFF]
Lloh19:
	ldr	x2, [x8]
	b	LBB0_20
LBB0_19:
	ldr	w1, [x23]
Lloh20:
	adrp	x2, l_.str@PAGE
Lloh21:
	add	x2, x2, l_.str@PAGEOFF
LBB0_20:
	mov	x0, x21
	bl	_snprintf
LBB0_21:
	tbnz	w0, #31, LBB0_27
; %bb.22:
	ldr	w8, [x23]
	cmp	w0, w8
	b.ge	LBB0_27
; %bb.23:
	mov	x0, x21
	bl	_strlen
	ldr	w8, [x20]
	sub	w8, w8, w0
	str	w8, [x20]
	cmp	w8, #0
	b.le	LBB0_27
; %bb.24:
	mov	x22, x0
	ldr	x0, [x19]
	mov	x1, x21
	bl	_strcpy
	ldr	x8, [x19]
	add	x8, x8, w22, sxtw
	str	x8, [x19]
	mov	x0, x21
LBB0_25:
	bl	_free
LBB0_26:
	mov	w0, #0
	b	LBB0_29
LBB0_27:
	mov	x0, x21
	bl	_free
LBB0_28:
	mov	w0, #-1
LBB0_29:
	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	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_5-LBB0_5)>>2
	.byte	(LBB0_14-LBB0_5)>>2
	.byte	(LBB0_15-LBB0_5)>>2
	.byte	(LBB0_16-LBB0_5)>>2
	.byte	(LBB0_17-LBB0_5)>>2
	.byte	(LBB0_21-LBB0_5)>>2
	.byte	(LBB0_21-LBB0_5)>>2
	.byte	(LBB0_21-LBB0_5)>>2
	.byte	(LBB0_18-LBB0_5)>>2
	.byte	(LBB0_19-LBB0_5)>>2
                                        ; -- End function
	.comm	_PGTYPES_FMT_NUM_MAX_DIGITS,4,2 ; @PGTYPES_FMT_NUM_MAX_DIGITS
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%0.0g"

	.comm	_INT64_FORMAT,8,3               ; @INT64_FORMAT
l_.str.1:                               ; @.str.1
	.asciz	"%u"

l_.str.2:                               ; @.str.2
	.asciz	"%02u"

l_.str.3:                               ; @.str.3
	.asciz	"%2u"

l_.str.4:                               ; @.str.4
	.asciz	"%03u"

l_.str.5:                               ; @.str.5
	.asciz	"%04u"

.subsections_via_symbols
