	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_eloop_register_signal_terminate ## -- Begin function eloop_register_signal_terminate
	.p2align	4, 0x90
_eloop_register_signal_terminate:       ## @eloop_register_signal_terminate
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	movl	%edi, %ebx
	movq	_eloop_handle_console_ctrl@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_TRUE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_SetConsoleCtrlHandler
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	_eloop@GOTPCREL(%rip), %rax
	movl	%ebx, 8(%rax)
	movq	%r14, (%rax)
	xorl	%eax, %eax
	jmp	LBB0_3
LBB0_1:
	xorl	%eax, %eax
	callq	_GetLastError
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_printf
	movl	$-1, %eax
LBB0_3:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_eloop_handle_console_ctrl,8,3  ## @eloop_handle_console_ctrl
	.comm	_TRUE,4,2                       ## @TRUE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SetConsoleCtrlHandler() failed: %d\n"

	.comm	_eloop,16,3                     ## @eloop
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_eloop_register_signal_terminate ; -- Begin function eloop_register_signal_terminate
	.p2align	2
_eloop_register_signal_terminate:       ; @eloop_register_signal_terminate
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _eloop_handle_console_ctrl@GOTPAGE
Lloh1:
	ldr	x8, [x8, _eloop_handle_console_ctrl@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _TRUE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_SetConsoleCtrlHandler
	cbz	x0, LBB0_2
; %bb.1:
	mov	w0, #0
Lloh6:
	adrp	x8, _eloop@GOTPAGE
Lloh7:
	ldr	x8, [x8, _eloop@GOTPAGEOFF]
	str	w20, [x8, #8]
	str	x19, [x8]
	b	LBB0_3
LBB0_2:
	bl	_GetLastError
	mov	x1, x0
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_printf
	mov	w0, #-1
LBB0_3:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_eloop_handle_console_ctrl,8,3  ; @eloop_handle_console_ctrl
	.comm	_TRUE,4,2                       ; @TRUE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SetConsoleCtrlHandler() failed: %d\n"

	.comm	_eloop,16,3                     ; @eloop
.subsections_via_symbols
