	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function context_realloc_test
_context_realloc_test:                  ## @context_realloc_test
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	leaq	L_.str(%rip), %rdi
	callq	_XCS
	movq	%rax, -96(%rbp)
	leaq	L_.str.1(%rip), %rax
	movq	%rax, -88(%rbp)
	leaq	L_.str.2(%rip), %rdi
	callq	_XCS
	movq	%rax, -80(%rbp)
	leaq	L_.str.3(%rip), %rax
	movq	%rax, -72(%rbp)
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -64(%rbp)
	movq	_parser@GOTPCREL(%rip), %r13
	movq	_XML_STATUS_ERROR@GOTPCREL(%rip), %r14
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	_reallocation_count@GOTPCREL(%rip), %rax
	movl	%r12d, (%rax)
	movl	(%r13), %edi
	leaq	-96(%rbp), %rsi
	callq	_XML_SetUserData
	movl	(%r13), %edi
	movq	_XML_PARAM_ENTITY_PARSING_ALWAYS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_XML_SetParamEntityParsing
	movl	(%r13), %edi
	movq	_external_entity_optioner@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_XML_SetExternalEntityRefHandler
	movl	(%r13), %ebx
	movq	%r15, %rdi
	callq	_strlen
	movq	_XML_TRUE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ebx, %edi
	movq	%r15, %rsi
	movl	%eax, %edx
	callq	__XML_Parse_SINGLE_BYTES
	cmpq	(%r14), %rax
	jne	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	xorl	%eax, %eax
	callq	_nsalloc_teardown
	xorl	%eax, %eax
	callq	_nsalloc_setup
	incl	%r12d
	cmpl	$6, %r12d
	jne	LBB0_1
	jmp	LBB0_6
LBB0_3:
	testl	%r12d, %r12d
	je	LBB0_4
## %bb.5:
	cmpl	$6, %r12d
	jne	LBB0_8
LBB0_6:
	leaq	L_.str.5(%rip), %rdi
	jmp	LBB0_7
LBB0_4:
	leaq	L_.str.4(%rip), %rdi
LBB0_7:
	callq	_fail
LBB0_8:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_10
## %bb.9:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"foo"

L_.str.1:                               ## @.str.1
	.asciz	"<!ELEMENT e EMPTY>"

L_.str.2:                               ## @.str.2
	.asciz	"bar"

L_.str.3:                               ## @.str.3
	.asciz	"<e/>"

	.comm	_reallocation_count,4,2         ## @reallocation_count
	.comm	_parser,4,2                     ## @parser
	.comm	_XML_PARAM_ENTITY_PARSING_ALWAYS,4,2 ## @XML_PARAM_ENTITY_PARSING_ALWAYS
	.comm	_external_entity_optioner,4,2   ## @external_entity_optioner
	.comm	_XML_TRUE,4,2                   ## @XML_TRUE
	.comm	_XML_STATUS_ERROR,8,3           ## @XML_STATUS_ERROR
L_.str.4:                               ## @.str.4
	.asciz	"Parsing worked despite failing reallocations"

L_.str.5:                               ## @.str.5
	.asciz	"Parsing failed even at max reallocation count"

	.no_dead_strip	_context_realloc_test
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function context_realloc_test
_context_realloc_test:                  ; @context_realloc_test
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x28, x27, [sp, #64]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #56]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_XCS
Lloh5:
	adrp	x8, l_.str.1@PAGE
Lloh6:
	add	x8, x8, l_.str.1@PAGEOFF
	stp	x0, x8, [sp, #8]
Lloh7:
	adrp	x0, l_.str.2@PAGE
Lloh8:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_XCS
	mov	w21, #0
Lloh9:
	adrp	x8, l_.str.3@PAGE
Lloh10:
	add	x8, x8, l_.str.3@PAGEOFF
	stp	x0, x8, [sp, #24]
	stp	xzr, xzr, [sp, #40]
Lloh11:
	adrp	x22, _reallocation_count@GOTPAGE
Lloh12:
	ldr	x22, [x22, _reallocation_count@GOTPAGEOFF]
Lloh13:
	adrp	x23, _parser@GOTPAGE
Lloh14:
	ldr	x23, [x23, _parser@GOTPAGEOFF]
Lloh15:
	adrp	x24, _XML_PARAM_ENTITY_PARSING_ALWAYS@GOTPAGE
Lloh16:
	ldr	x24, [x24, _XML_PARAM_ENTITY_PARSING_ALWAYS@GOTPAGEOFF]
Lloh17:
	adrp	x25, _external_entity_optioner@GOTPAGE
Lloh18:
	ldr	x25, [x25, _external_entity_optioner@GOTPAGEOFF]
Lloh19:
	adrp	x26, _XML_TRUE@GOTPAGE
Lloh20:
	ldr	x26, [x26, _XML_TRUE@GOTPAGEOFF]
Lloh21:
	adrp	x27, _XML_STATUS_ERROR@GOTPAGE
Lloh22:
	ldr	x27, [x27, _XML_STATUS_ERROR@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	str	w21, [x22]
	ldr	w0, [x23]
	add	x1, sp, #8
	bl	_XML_SetUserData
	ldr	w0, [x23]
	ldr	w1, [x24]
	bl	_XML_SetParamEntityParsing
	ldr	w0, [x23]
	ldr	w1, [x25]
	bl	_XML_SetExternalEntityRefHandler
	ldr	w20, [x23]
	mov	x0, x19
	bl	_strlen
	mov	x2, x0
	ldr	w3, [x26]
	mov	x0, x20
	mov	x1, x19
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	__XML_Parse_SINGLE_BYTES
	ldr	x8, [x27]
	cmp	x0, x8
	b.ne	LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	bl	_nsalloc_teardown
	bl	_nsalloc_setup
	add	w21, w21, #1
	cmp	w21, #6
	b.ne	LBB0_1
	b	LBB0_5
LBB0_3:
	cbz	w21, LBB0_6
; %bb.4:
	cmp	w21, #6
	b.ne	LBB0_8
LBB0_5:
Lloh23:
	adrp	x0, l_.str.5@PAGE
Lloh24:
	add	x0, x0, l_.str.5@PAGEOFF
	b	LBB0_7
LBB0_6:
Lloh25:
	adrp	x0, l_.str.4@PAGE
Lloh26:
	add	x0, x0, l_.str.4@PAGEOFF
LBB0_7:
	bl	_fail
LBB0_8:
	ldr	x8, [sp, #56]
Lloh27:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh28:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_10
; %bb.9:
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
LBB0_10:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"foo"

l_.str.1:                               ; @.str.1
	.asciz	"<!ELEMENT e EMPTY>"

l_.str.2:                               ; @.str.2
	.asciz	"bar"

l_.str.3:                               ; @.str.3
	.asciz	"<e/>"

	.comm	_reallocation_count,4,2         ; @reallocation_count
	.comm	_parser,4,2                     ; @parser
	.comm	_XML_PARAM_ENTITY_PARSING_ALWAYS,4,2 ; @XML_PARAM_ENTITY_PARSING_ALWAYS
	.comm	_external_entity_optioner,4,2   ; @external_entity_optioner
	.comm	_XML_TRUE,4,2                   ; @XML_TRUE
	.comm	_XML_STATUS_ERROR,8,3           ; @XML_STATUS_ERROR
l_.str.4:                               ; @.str.4
	.asciz	"Parsing worked despite failing reallocations"

l_.str.5:                               ; @.str.5
	.asciz	"Parsing failed even at max reallocation count"

	.no_dead_strip	_context_realloc_test
.subsections_via_symbols
