	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_network_backends_add           ## -- Begin function network_backends_add
	.p2align	4, 0x90
_network_backends_add:                  ## @network_backends_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	%rsi, %r14
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movl	16(%rdi), %edi
	callq	_network_backend_new
	movq	%rax, %r13
	movq	%rbx, (%rax)
	movq	_BACKEND_TYPE_RO@GOTPCREL(%rip), %rax
	cmpq	%rbx, (%rax)
	jne	LBB0_3
## %bb.1:
	movq	%r14, %rdi
	movl	$64, %esi
	callq	_strrchr
	movq	%rax, %r12
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movb	$0, (%r12)
	movq	%r12, %rdi
	incq	%rdi
	callq	_atoi
	jmp	LBB0_5
LBB0_3:
	xorl	%r12d, %r12d
	jmp	LBB0_6
LBB0_4:
	movl	$1, %eax
LBB0_5:
	movq	%rax, 8(%r13)
LBB0_6:
	movq	16(%r13), %rdi
	movq	%r14, %rsi
	callq	_network_address_set_address
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	%r13, %rdi
	callq	_network_backend_free
LBB0_20:
	movl	$-1, %eax
	jmp	LBB0_21
LBB0_8:
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movl	(%r15), %edi
	callq	_g_mutex_lock
	movq	8(%r15), %rdi
	cmpq	$0, (%rdi)
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movl	$-1, %r12d
	je	LBB0_14
## %bb.9:
	xorl	%r15d, %r15d
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_11 Depth=1
	incq	%r15
	cmpq	(%rdi), %r15
	jae	LBB0_14
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%rdi), %rax
	movq	(%rax,%r15,8), %rax
	movq	(%rax), %rcx
	movq	_BACKEND_TYPE_RO@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	movl	%r12d, %edx
	movl	$-1, %r12d
	cmovel	%r15d, %r12d
	cmpl	$-1, %edx
	cmovnel	%edx, %r12d
	cmpq	%rbx, %rcx
	jne	LBB0_10
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	16(%rax), %rax
	movl	(%rax), %edi
	callq	_S
	movl	%eax, %r14d
	movq	16(%r13), %rax
	movl	(%rax), %edi
	callq	_S
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_strleq
	testq	%rax, %rax
	jne	LBB0_19
## %bb.13:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rdi
	jmp	LBB0_10
LBB0_14:
	movq	%r13, %rsi
	callq	_g_ptr_array_add
	movq	_BACKEND_TYPE_RW@GOTPCREL(%rip), %r14
	cmpl	$-1, %r12d
	je	LBB0_17
## %bb.15:
	cmpq	%rbx, (%r14)
	jne	LBB0_17
## %bb.16:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	8(%rdi), %rax
	movq	(%rax), %rcx
	movq	8(%rax), %rax
	movslq	%r12d, %rdx
	movq	(%rax,%rdx,8), %rsi
	movq	-8(%rax,%rcx,8), %rcx
	movq	%rcx, (%rax,%rdx,8)
	movq	8(%rdi), %rax
	movq	(%rax), %rcx
	movq	8(%rax), %rax
	movq	%rsi, -8(%rax,%rcx,8)
LBB0_17:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	callq	_g_mutex_unlock
	cmpq	%rbx, (%r14)
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.3(%rip), %rsi
	cmoveq	%rax, %rsi
	leaq	L_.str.1(%rip), %rdi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	callq	_g_message
	xorl	%eax, %eax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	testq	%rcx, %rcx
	je	LBB0_21
## %bb.18:
	movb	$64, (%rcx)
LBB0_21:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	movq	%r13, %rdi
	callq	_network_backend_free
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	callq	_g_mutex_unlock
	leaq	L_.str(%rip), %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_g_critical
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_BACKEND_TYPE_RO,8,3            ## @BACKEND_TYPE_RO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"backend %s is already known!"

	.comm	_BACKEND_TYPE_RW,8,3            ## @BACKEND_TYPE_RW
L_.str.1:                               ## @.str.1
	.asciz	"added %s backend: %s"

L_.str.2:                               ## @.str.2
	.asciz	"read/write"

L_.str.3:                               ## @.str.3
	.asciz	"read-only"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_network_backends_add           ; -- Begin function network_backends_add
	.p2align	2
_network_backends_add:                  ; @network_backends_add
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x20, x2
	mov	x19, x1
	mov	x21, x0
	ldr	w0, [x0, #16]
	bl	_network_backend_new
	mov	x23, x0
	str	x20, [x0]
Lloh0:
	adrp	x25, _BACKEND_TYPE_RO@GOTPAGE
Lloh1:
	ldr	x25, [x25, _BACKEND_TYPE_RO@GOTPAGEOFF]
	ldr	x8, [x25]
	cmp	x8, x20
	b.ne	LBB0_3
; %bb.1:
	mov	x0, x19
	mov	w1, #64
	bl	_strrchr
	mov	x22, x0
	cbz	x0, LBB0_4
; %bb.2:
	mov	x0, x22
	strb	wzr, [x0], #1
	bl	_atoi
	b	LBB0_5
LBB0_3:
	mov	x22, #0
	b	LBB0_6
LBB0_4:
	mov	w0, #1
LBB0_5:
	str	x0, [x23, #8]
LBB0_6:
	ldr	x0, [x23, #16]
	mov	x1, x19
	bl	_network_address_set_address
	cbz	x0, LBB0_9
; %bb.7:
	mov	x0, x23
	bl	_network_backend_free
LBB0_8:
	mov	w0, #-1
	b	LBB0_20
LBB0_9:
	ldr	w0, [x21]
	bl	_g_mutex_lock
	ldr	x0, [x21, #8]
	ldr	x8, [x0]
	cbz	x8, LBB0_15
; %bb.10:
	mov	x27, #0
	mov	w26, #-1
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	add	x27, x27, #1
	ldr	x8, [x0]
	cmp	x27, x8
	b.hs	LBB0_16
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x0, #8]
	ldr	x8, [x8, x27, lsl #3]
	ldr	x9, [x8]
	ldr	x10, [x25]
	cmp	x9, x10
	csinv	w10, w27, wzr, eq
	cmn	w26, #1
	csel	w26, w10, w26, eq
	cmp	x9, x20
	b.ne	LBB0_11
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	x8, [x8, #16]
	ldr	w0, [x8]
	bl	_S
	mov	x24, x0
	ldr	x8, [x23, #16]
	ldr	w0, [x8]
	bl	_S
	mov	x1, x0
	mov	x0, x24
	bl	_strleq
	cbnz	x0, LBB0_21
; %bb.14:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	x0, [x21, #8]
	b	LBB0_11
LBB0_15:
	mov	w26, #-1
LBB0_16:
	mov	x1, x23
	bl	_g_ptr_array_add
Lloh2:
	adrp	x23, _BACKEND_TYPE_RW@GOTPAGE
Lloh3:
	ldr	x23, [x23, _BACKEND_TYPE_RW@GOTPAGEOFF]
	ldr	x8, [x23]
	cmn	w26, #1
	ccmp	x8, x20, #0, ne
	b.ne	LBB0_18
; %bb.17:
	ldr	x8, [x21, #8]
	sbfiz	x9, x26, #3, #32
	ldp	x8, x10, [x8]
	ldr	x11, [x10, x9]
	add	x8, x10, x8, lsl #3
	ldur	x8, [x8, #-8]
	str	x8, [x10, x9]
	ldr	x8, [x21, #8]
	ldp	x8, x9, [x8]
	add	x8, x9, x8, lsl #3
	stur	x11, [x8, #-8]
LBB0_18:
	ldr	w0, [x21]
	bl	_g_mutex_unlock
	ldr	x8, [x23]
Lloh4:
	adrp	x9, l_.str.3@PAGE
Lloh5:
	add	x9, x9, l_.str.3@PAGEOFF
Lloh6:
	adrp	x10, l_.str.2@PAGE
Lloh7:
	add	x10, x10, l_.str.2@PAGEOFF
	cmp	x8, x20
	csel	x1, x10, x9, eq
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x2, x19
	bl	_g_message
	mov	w0, #0
	cbz	x22, LBB0_20
; %bb.19:
	mov	w8, #64
	strb	w8, [x22]
LBB0_20:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_21:
	mov	x0, x23
	bl	_network_backend_free
	ldr	w0, [x21]
	bl	_g_mutex_unlock
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_g_critical
	b	LBB0_8
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_BACKEND_TYPE_RO,8,3            ; @BACKEND_TYPE_RO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"backend %s is already known!"

	.comm	_BACKEND_TYPE_RW,8,3            ; @BACKEND_TYPE_RW
l_.str.1:                               ; @.str.1
	.asciz	"added %s backend: %s"

l_.str.2:                               ; @.str.2
	.asciz	"read/write"

l_.str.3:                               ; @.str.3
	.asciz	"read-only"

.subsections_via_symbols
