	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_restore_connect                ## -- Begin function restore_connect
	.p2align	4, 0x90
_restore_connect:                       ## @restore_connect
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_restore_conn@GOTPCREL(%rip), %r15
	cmpq	$0, (%r15)
	je	LBB0_5
## %bb.1:
	movq	_main_loop@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movq	_xcb_watcher@GOTPCREL(%rip), %r12
	movq	(%r12), %rsi
	callq	_ev_io_stop
	movl	(%rbx), %edi
	movq	_xcb_prepare@GOTPCREL(%rip), %r13
	movq	(%r13), %rsi
	callq	_ev_prepare_stop
	movq	_state_head@GOTPCREL(%rip), %rdi
	callq	_TAILQ_EMPTY
	testl	%eax, %eax
	jne	LBB0_4
## %bb.2:
	movq	_state_head@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	callq	_TAILQ_FIRST
	movq	%rax, %rbx
	movq	%r14, %rdi
	movq	%rax, %rsi
	movq	%rax, %rdx
	callq	_TAILQ_REMOVE
	movq	%rbx, %rdi
	callq	_free
	movq	%r14, %rdi
	callq	_TAILQ_EMPTY
	testl	%eax, %eax
	je	LBB0_3
LBB0_4:
	movq	(%r15), %rdi
	callq	_xcb_disconnect
	movq	(%r12), %rdi
	callq	_free
	movq	(%r13), %rdi
	callq	_free
LBB0_5:
	leaq	-44(%rbp), %rsi
	xorl	%edi, %edi
	callq	_xcb_connect
	movq	%rax, (%r15)
	testq	%rax, %rax
	je	LBB0_9
## %bb.6:
	movq	%rax, %rdi
	callq	_xcb_connection_has_error
	testq	%rax, %rax
	je	LBB0_10
## %bb.7:
	movq	(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_9
## %bb.8:
	callq	_xcb_disconnect
LBB0_9:
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_errx
LBB0_10:
	movl	$1, %edi
	movl	$4, %esi
	callq	_scalloc
	movq	_xcb_watcher@GOTPCREL(%rip), %r13
	movq	%rax, (%r13)
	movl	$1, %edi
	movl	$4, %esi
	callq	_scalloc
	movq	_xcb_prepare@GOTPCREL(%rip), %r12
	movq	%rax, (%r12)
	movq	(%r13), %r14
	movq	_restore_xcb_got_event@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	(%r15), %rdi
	callq	_xcb_get_file_descriptor
	movq	_EV_READ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_ev_io_init
	movq	_main_loop@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movq	(%r13), %rsi
	callq	_ev_io_start
	movq	(%r12), %rdi
	movq	_restore_xcb_prepare_cb@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ev_prepare_init
	movl	(%rbx), %edi
	movq	(%r12), %rsi
	callq	_ev_prepare_start
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_restore_conn,8,3               ## @restore_conn
	.comm	_main_loop,4,2                  ## @main_loop
	.comm	_xcb_watcher,8,3                ## @xcb_watcher
	.comm	_xcb_prepare,8,3                ## @xcb_prepare
	.comm	_state_head,4,2                 ## @state_head
	.comm	_EXIT_FAILURE,4,2               ## @EXIT_FAILURE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Cannot open display"

	.comm	_restore_xcb_got_event,4,2      ## @restore_xcb_got_event
	.comm	_EV_READ,4,2                    ## @EV_READ
	.comm	_restore_xcb_prepare_cb,4,2     ## @restore_xcb_prepare_cb
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_restore_connect                ; -- Begin function restore_connect
	.p2align	2
_restore_connect:                       ; @restore_connect
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
Lloh0:
	adrp	x24, _restore_conn@GOTPAGE
Lloh1:
	ldr	x24, [x24, _restore_conn@GOTPAGEOFF]
	ldr	x8, [x24]
Lloh2:
	adrp	x23, _xcb_watcher@GOTPAGE
Lloh3:
	ldr	x23, [x23, _xcb_watcher@GOTPAGEOFF]
Lloh4:
	adrp	x21, _xcb_prepare@GOTPAGE
Lloh5:
	ldr	x21, [x21, _xcb_prepare@GOTPAGEOFF]
Lloh6:
	adrp	x22, _main_loop@GOTPAGE
Lloh7:
	ldr	x22, [x22, _main_loop@GOTPAGEOFF]
	cbz	x8, LBB0_5
; %bb.1:
	ldr	w0, [x22]
	ldr	x1, [x23]
	bl	_ev_io_stop
	ldr	w0, [x22]
	ldr	x1, [x21]
	bl	_ev_prepare_stop
Lloh8:
	adrp	x0, _state_head@GOTPAGE
Lloh9:
	ldr	x0, [x0, _state_head@GOTPAGEOFF]
	bl	_TAILQ_EMPTY
	cbnz	w0, LBB0_4
; %bb.2:
Lloh10:
	adrp	x19, _state_head@GOTPAGE
Lloh11:
	ldr	x19, [x19, _state_head@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_TAILQ_FIRST
	mov	x20, x0
	mov	x0, x19
	mov	x1, x20
	mov	x2, x20
	bl	_TAILQ_REMOVE
	mov	x0, x20
	bl	_free
	mov	x0, x19
	bl	_TAILQ_EMPTY
	cbz	w0, LBB0_3
LBB0_4:
	ldr	x0, [x24]
	bl	_xcb_disconnect
	ldr	x0, [x23]
	bl	_free
	ldr	x0, [x21]
	bl	_free
LBB0_5:
	add	x1, sp, #12
	mov	x0, #0
	bl	_xcb_connect
	str	x0, [x24]
	cbz	x0, LBB0_9
; %bb.6:
	bl	_xcb_connection_has_error
	cbz	x0, LBB0_10
; %bb.7:
	ldr	x0, [x24]
	cbz	x0, LBB0_9
; %bb.8:
	bl	_xcb_disconnect
LBB0_9:
Lloh12:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	bl	_errx
LBB0_10:
	mov	w0, #1
	mov	w1, #4
	bl	_scalloc
	str	x0, [x23]
	mov	w0, #1
	mov	w1, #4
	bl	_scalloc
	str	x0, [x21]
	ldr	x19, [x23]
Lloh17:
	adrp	x8, _restore_xcb_got_event@GOTPAGE
Lloh18:
	ldr	x8, [x8, _restore_xcb_got_event@GOTPAGEOFF]
Lloh19:
	ldr	w20, [x8]
	ldr	x0, [x24]
	bl	_xcb_get_file_descriptor
	mov	x2, x0
Lloh20:
	adrp	x8, _EV_READ@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EV_READ@GOTPAGEOFF]
Lloh22:
	ldr	w3, [x8]
	mov	x0, x19
	mov	x1, x20
	bl	_ev_io_init
	ldr	w0, [x22]
	ldr	x1, [x23]
	bl	_ev_io_start
	ldr	x0, [x21]
Lloh23:
	adrp	x8, _restore_xcb_prepare_cb@GOTPAGE
Lloh24:
	ldr	x8, [x8, _restore_xcb_prepare_cb@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	bl	_ev_prepare_init
	ldr	w0, [x22]
	ldr	x1, [x21]
	bl	_ev_prepare_start
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_restore_conn,8,3               ; @restore_conn
	.comm	_main_loop,4,2                  ; @main_loop
	.comm	_xcb_watcher,8,3                ; @xcb_watcher
	.comm	_xcb_prepare,8,3                ; @xcb_prepare
	.comm	_state_head,4,2                 ; @state_head
	.comm	_EXIT_FAILURE,4,2               ; @EXIT_FAILURE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Cannot open display"

	.comm	_restore_xcb_got_event,4,2      ; @restore_xcb_got_event
	.comm	_EV_READ,4,2                    ; @EV_READ
	.comm	_restore_xcb_prepare_cb,4,2     ; @restore_xcb_prepare_cb
.subsections_via_symbols
