	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ub_ctx_zone_add                ## -- Begin function ub_ctx_zone_add
	.p2align	4, 0x90
_ub_ctx_zone_add:                       ## @ub_ctx_zone_add
	.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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	%rsi, %r15
	movq	%rdi, %r14
	callq	_ub_ctx_finalize
	testl	%eax, %eax
	jne	LBB0_10
## %bb.1:
	leaq	-32(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_local_zone_str2type
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:
	leaq	-40(%rbp), %rsi
	leaq	-48(%rbp), %rdx
	leaq	-28(%rbp), %rcx
	movq	%r15, %rdi
	callq	_parse_dname
	testl	%eax, %eax
	je	LBB0_2
## %bb.4:
	movq	(%r14), %rdi
	callq	_lock_rw_wrlock
	movq	(%r14), %rdi
	movq	-40(%rbp), %rsi
	movq	-48(%rbp), %rdx
	movl	-28(%rbp), %ecx
	movq	_LDNS_RR_CLASS_IN@GOTPCREL(%rip), %rbx
	movl	(%rbx), %r8d
	callq	_local_zones_find
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:
	movq	%rax, %r15
	movq	%rax, %rbx
	addq	$4, %rbx
	movq	%rbx, %rdi
	callq	_lock_rw_wrlock
	movl	-32(%rbp), %eax
	movl	%eax, (%r15)
	movq	%rbx, %rdi
	callq	_lock_rw_unlock
	movq	(%r14), %rdi
	callq	_lock_rw_unlock
	movq	-40(%rbp), %rdi
	callq	_free
	jmp	LBB0_6
LBB0_2:
	movq	_UB_SYNTAX@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_7:
	movq	(%r14), %rdi
	movq	-40(%rbp), %rsi
	movq	-48(%rbp), %rdx
	movl	-28(%rbp), %ecx
	movl	(%rbx), %r8d
	movl	-32(%rbp), %r9d
	callq	_local_zones_add_zone
	movl	%eax, %ebx
	movq	(%r14), %rdi
	callq	_lock_rw_unlock
	testl	%ebx, %ebx
	je	LBB0_8
LBB0_6:
	movq	_UB_NOERROR@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %eax
LBB0_10:
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	_UB_NOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_UB_SYNTAX,4,2                  ## @UB_SYNTAX
	.comm	_LDNS_RR_CLASS_IN,4,2           ## @LDNS_RR_CLASS_IN
	.comm	_UB_NOERROR,4,2                 ## @UB_NOERROR
	.comm	_UB_NOMEM,4,2                   ## @UB_NOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ub_ctx_zone_add                ; -- Begin function ub_ctx_zone_add
	.p2align	2
_ub_ctx_zone_add:                       ; @ub_ctx_zone_add
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x21, x2
	mov	x20, x1
	mov	x19, x0
	bl	_ub_ctx_finalize
	cbnz	w0, LBB0_9
; %bb.1:
	add	x1, sp, #28
	mov	x0, x21
	bl	_local_zone_str2type
	cbz	w0, LBB0_5
; %bb.2:
	add	x1, sp, #16
	mov	x2, sp
	add	x3, sp, #12
	mov	x0, x20
	bl	_parse_dname
	cbz	w0, LBB0_5
; %bb.3:
	ldr	x0, [x19]
	bl	_lock_rw_wrlock
	ldr	x0, [x19]
	ldr	x1, [sp, #16]
	ldr	x2, [sp]
	ldr	w3, [sp, #12]
Lloh0:
	adrp	x21, _LDNS_RR_CLASS_IN@GOTPAGE
Lloh1:
	ldr	x21, [x21, _LDNS_RR_CLASS_IN@GOTPAGEOFF]
	ldr	w4, [x21]
	bl	_local_zones_find
	cbz	x0, LBB0_6
; %bb.4:
	mov	x20, x0
	add	x21, x0, #4
	mov	x0, x21
	bl	_lock_rw_wrlock
	ldr	w8, [sp, #28]
	str	w8, [x20]
	mov	x0, x21
	bl	_lock_rw_unlock
	ldr	x0, [x19]
	bl	_lock_rw_unlock
	ldr	x0, [sp, #16]
	bl	_free
	b	LBB0_7
LBB0_5:
Lloh2:
	adrp	x8, _UB_SYNTAX@GOTPAGE
Lloh3:
	ldr	x8, [x8, _UB_SYNTAX@GOTPAGEOFF]
	b	LBB0_8
LBB0_6:
	ldr	x0, [x19]
	ldr	x1, [sp, #16]
	ldr	x2, [sp]
	ldr	w3, [sp, #12]
	ldr	w4, [x21]
	ldr	w5, [sp, #28]
	bl	_local_zones_add_zone
	mov	x20, x0
	ldr	x0, [x19]
	bl	_lock_rw_unlock
	cbz	w20, LBB0_10
LBB0_7:
Lloh4:
	adrp	x8, _UB_NOERROR@GOTPAGE
Lloh5:
	ldr	x8, [x8, _UB_NOERROR@GOTPAGEOFF]
LBB0_8:
	ldr	w0, [x8]
LBB0_9:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_10:
Lloh6:
	adrp	x8, _UB_NOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _UB_NOMEM@GOTPAGEOFF]
	b	LBB0_8
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_UB_SYNTAX,4,2                  ; @UB_SYNTAX
	.comm	_LDNS_RR_CLASS_IN,4,2           ; @LDNS_RR_CLASS_IN
	.comm	_UB_NOERROR,4,2                 ; @UB_NOERROR
	.comm	_UB_NOMEM,4,2                   ; @UB_NOMEM
.subsections_via_symbols
