	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_xml_validate_dtd               ## -- Begin function xml_validate_dtd
	.p2align	4, 0x90
_xml_validate_dtd:                      ## @xml_validate_dtd
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r15
	movq	%rdx, %r12
	movq	%rsi, %r13
	testq	%rcx, %rcx
	je	LBB0_2
## %bb.1:
	movq	$0, (%r15)
LBB0_2:
	leaq	L_.str(%rip), %rdi
	callq	_xmlNewDoc
	movl	$-1, %r14d
	testq	%rax, %rax
	je	LBB0_11
## %bb.3:
	movq	%rax, %rbx
	movq	%r13, %rdi
	movq	%rax, %rsi
	movl	$1, %edx
	callq	_xmlDocCopyNode
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_xmlDocSetRootElement
	leaq	-104(%rbp), %r13
	movq	%r13, %rdi
	xorl	%esi, %esi
	movl	$32, %edx
	callq	_os_memset
	xorl	%edi, %edi
	movq	%r12, %rsi
	callq	_xmlParseDTD
	testq	%rax, %rax
	je	LBB0_4
## %bb.6:
	movq	%rax, %r12
	leaq	-72(%rbp), %rdi
	xorl	%esi, %esi
	movl	$32, %edx
	callq	_os_memset
	movq	%r13, -48(%rbp)
	movq	_add_str@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -56(%rbp)
	movq	%rax, -64(%rbp)
	leaq	-72(%rbp), %rdi
	movq	%rbx, %rsi
	movq	%r12, %rdx
	callq	_xmlValidateDtd
	movl	%eax, %r13d
	movq	%rbx, %rdi
	callq	_xmlFreeDoc
	movq	%r12, %rdi
	callq	_xmlFreeDtd
	movq	-104(%rbp), %rdi
	cmpl	$1, %r13d
	jne	LBB0_8
## %bb.7:
	callq	_os_free
	xorl	%r14d, %r14d
	jmp	LBB0_11
LBB0_4:
	movq	%rbx, %rdi
	callq	_xmlFreeDoc
LBB0_11:
	movl	%r14d, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	testq	%r15, %r15
	je	LBB0_10
## %bb.9:
	movq	%rdi, (%r15)
	jmp	LBB0_11
LBB0_10:
	callq	_os_free
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"1.0"

	.comm	_add_str,8,3                    ## @add_str
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_xml_validate_dtd               ; -- Begin function xml_validate_dtd
	.p2align	2
_xml_validate_dtd:                      ; @xml_validate_dtd
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x19, x3
	mov	x21, x2
	mov	x22, x1
	cbz	x3, LBB0_2
; %bb.1:
	str	xzr, [x19]
LBB0_2:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_xmlNewDoc
	cbz	x0, LBB0_8
; %bb.3:
	mov	x20, x0
	mov	x0, x22
	mov	x1, x20
	mov	w2, #1
	bl	_xmlDocCopyNode
	cbz	x0, LBB0_7
; %bb.4:
	mov	x1, x0
	mov	x0, x20
	bl	_xmlDocSetRootElement
	mov	x22, sp
	mov	x0, sp
	mov	w1, #0
	mov	w2, #32
	bl	_os_memset
	mov	x0, #0
	mov	x1, x21
	bl	_xmlParseDTD
	cbz	x0, LBB0_7
; %bb.5:
	mov	x21, x0
	add	x0, sp, #32
	mov	w1, #0
	mov	w2, #32
	bl	_os_memset
	str	x22, [sp, #56]
Lloh2:
	adrp	x8, _add_str@GOTPAGE
Lloh3:
	ldr	x8, [x8, _add_str@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	stp	x8, x8, [sp, #40]
	add	x0, sp, #32
	mov	x1, x20
	mov	x2, x21
	bl	_xmlValidateDtd
	mov	x22, x0
	mov	x0, x20
	bl	_xmlFreeDoc
	mov	x0, x21
	bl	_xmlFreeDtd
	ldr	x0, [sp]
	cmp	w22, #1
	b.ne	LBB0_10
; %bb.6:
	bl	_os_free
	mov	w0, #0
	b	LBB0_9
LBB0_7:
	mov	x0, x20
	bl	_xmlFreeDoc
LBB0_8:
	mov	w0, #-1
LBB0_9:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_10:
	cbz	x19, LBB0_12
; %bb.11:
	str	x0, [x19]
	b	LBB0_8
LBB0_12:
	bl	_os_free
	b	LBB0_8
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"1.0"

	.comm	_add_str,8,3                    ; @add_str
.subsections_via_symbols
