	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function connection_new
_connection_new:                        ## @connection_new
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movq	%rsi, %r12
	movq	%rdi, %r14
	xorl	%eax, %eax
	callq	_connection_cleanups
	movl	$56, %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movl	8(%r14), %edi
	callq	_strdup
	movq	%rax, 16(%rbx)
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movl	4(%r14), %eax
	movl	%eax, 52(%rbx)
	movl	(%r12), %edi
	callq	_htonl
	movl	%eax, %r12d
	movl	%eax, 48(%rbx)
	movq	$-1, (%rbx)
	movq	_GGATE_FLAG_SEND@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	je	LBB0_6
## %bb.5:
	movl	%r15d, (%rbx)
	jmp	LBB0_7
LBB0_1:
	xorl	%ebx, %ebx
	jmp	LBB0_8
LBB0_3:
	movq	%rbx, %rdi
	callq	_free
	xorl	%ebx, %ebx
	jmp	LBB0_8
LBB0_6:
	movl	%r15d, 4(%rbx)
LBB0_7:
	movq	%rbx, %rdi
	addq	$24, %rdi
	xorps	%xmm0, %xmm0
	movups	%xmm0, 32(%rbx)
	callq	_time
	movl	(%r14), %eax
	movl	%eax, 8(%rbx)
	movq	_c_next@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_connections@GOTPCREL(%rip), %rdi
	movq	%rbx, %rsi
	callq	_LIST_INSERT_HEAD
	movq	_LOG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	%r12d, %edi
	callq	_ip2str
	movq	16(%rbx), %rcx
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edi
	movl	%eax, %edx
	callq	_g_gate_log
LBB0_8:
	movq	%rbx, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GGATE_FLAG_SEND,4,2            ## @GGATE_FLAG_SEND
	.comm	_connections,4,2                ## @connections
	.comm	_c_next,4,2                     ## @c_next
	.comm	_LOG_DEBUG,4,2                  ## @LOG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Connection created [%s, %s]."

	.no_dead_strip	_connection_new
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function connection_new
_connection_new:                        ; @connection_new
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x22, x1
	mov	x20, x0
	bl	_connection_cleanups
	mov	w0, #56
	bl	_malloc
	mov	x19, x0
	cbz	x0, LBB0_7
; %bb.1:
	ldr	w0, [x20, #8]
	bl	_strdup
	str	x0, [x19, #16]
	cbz	x0, LBB0_4
; %bb.2:
	ldr	w8, [x20, #4]
	str	w8, [x19, #52]
	ldr	w0, [x22]
	bl	_htonl
	mov	x22, x0
	str	w0, [x19, #48]
	movi.2d	v0, #0xffffffffffffffff
	str	d0, [x19]
	ldr	w8, [x20]
Lloh0:
	adrp	x9, _GGATE_FLAG_SEND@GOTPAGE
Lloh1:
	ldr	x9, [x9, _GGATE_FLAG_SEND@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.3:
	str	w21, [x19]
	b	LBB0_6
LBB0_4:
	mov	x0, x19
	bl	_free
	mov	x19, #0
	b	LBB0_7
LBB0_5:
	str	w21, [x19, #4]
LBB0_6:
	add	x0, x19, #24
	stp	xzr, xzr, [x19, #32]
	bl	_time
	ldr	w8, [x20]
	str	w8, [x19, #8]
Lloh3:
	adrp	x8, _c_next@GOTPAGE
Lloh4:
	ldr	x8, [x8, _c_next@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
Lloh6:
	adrp	x0, _connections@GOTPAGE
Lloh7:
	ldr	x0, [x0, _connections@GOTPAGEOFF]
	mov	x1, x19
	bl	_LIST_INSERT_HEAD
Lloh8:
	adrp	x8, _LOG_DEBUG@GOTPAGE
Lloh9:
	ldr	x8, [x8, _LOG_DEBUG@GOTPAGEOFF]
Lloh10:
	ldr	w20, [x8]
	mov	x0, x22
	bl	_ip2str
	mov	x2, x0
	ldr	x3, [x19, #16]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_g_gate_log
LBB0_7:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_GGATE_FLAG_SEND,4,2            ; @GGATE_FLAG_SEND
	.comm	_connections,4,2                ; @connections
	.comm	_c_next,4,2                     ; @c_next
	.comm	_LOG_DEBUG,4,2                  ; @LOG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Connection created [%s, %s]."

	.no_dead_strip	_connection_new
.subsections_via_symbols
