// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]libcperciva/tests/events/main.c
// Function: main
int
main(int argc, char * argv[])
{
	int empty_loop = 0;
	const char * filename_pid = NULL;

	WARNP_INIT;

	if (argc > 1) {
		empty_loop = 1;
		filename_pid = argv[1];
	}

	/* Set up response to SIGUSR1. */
	if (events_interrupter_init()) {
		warnp("events_interrupter_init()");
		goto err0;
	}

	/* Run tests. */
	if (empty_loop) {
		/* Needs external SIGUSR1 to cancel the event loop. */
		if (test_interrupt_empty_loop(filename_pid))
			goto err0;
	} else {
		if (test_interrupt_run())
			goto err0;
		if (test_interrupt_spin())
			goto err0;
		if (test_timer())
			goto err0;
	}

	/* Success! */
	exit(0);

err0:
	/* Failure! */
	exit(1);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movl %edi, %ebx
movq (%rsi), %rdi
testq %rdi, %rdi
je 0x2345
callq 0x3af0
cmpl $0x2, %ebx
jge 0x234f
xorl %r14d, %r14d
jmp 0x2353
movq 0x8(%r14), %r14
callq 0x26ac
testl %eax, %eax
jne 0x23e7
cmpl $0x2, %ebx
jge 0x23fd
callq 0x2608
leaq 0x248(%rip), %rdi       # 0x25bd
pushq $0xa
popq %rdx
xorl %esi, %esi
callq 0x2abc
movq %rax, 0x6042(%rip)      # 0x83c8
callq 0x28f8
testl %eax, %eax
jne 0x251a
callq 0x276b
testl %eax, %eax
je 0x2386
movq 0x6025(%rip), %rdi      # 0x83c8
callq 0x2ba7
leaq 0x10(%rsp), %rbx
andl $0x0, (%rbx)
callq 0x2608
leaq 0x201(%rip), %rdi       # 0x25bd
pushq $0xa
popq %rdx
xorl %esi, %esi
callq 0x2abc
movq %rax, 0x5ffb(%rip)      # 0x83c8
movq %rbx, %rdi
callq 0x2a17
testl %eax, %eax
je 0x24d3
cmpl $-0x1, %eax
jne 0x23cd
jmp 0x251a
callq 0x2070
cmpl $0x0, (%rax)
jne 0x243b
leaq 0x2c18(%rip), %rdi      # 0x5010
jmp 0x259f
andl $0x0, 0xc(%rsp)
callq 0x2608
leaq 0x2c30(%rip), %rsi      # 0x503e
movq %r14, %rdi
callq 0x21c0
testq %rax, %rax
jne 0x244a
callq 0x2070
cmpl $0x0, (%rax)
jne 0x248e
leaq 0x2c14(%rip), %rdi      # 0x5040
movq %r14, %rsi
xorl %eax, %eax
callq 0x3cfc
jmp 0x25a6
movq %rax, %rbx
leaq 0x2bcb(%rip), %rdi      # 0x5010
jmp 0x2537
movq %rax, %rbx
callq 0x20c0
movslq %eax, %rdx
leaq 0x2bee(%rip), %rsi      # 0x504a
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2140
testl %eax, %eax
jns 0x24a7
callq 0x2070
movq %rax, %r14
cmpl $0x0, (%rax)
jne 0x2556
leaq 0x2bcc(%rip), %rdi      # 0x504e
xorl %eax, %eax
callq 0x3cfc
jmp 0x2568
movq %rax, %rbx
leaq 0x2ba8(%rip), %rdi      # 0x5040
movq %r14, %rsi
xorl %eax, %eax
callq 0x3b6d
jmp 0x253e
movq %rbx, %rdi
callq 0x20d0
testl %eax, %eax
jne 0x258e
leaq 0xc(%rsp), %rbx
movq %rbx, %rdi
callq 0x2a17
testl %eax, %eax
je 0x254f
cmpl $-0x1, %eax
jne 0x24bc
jmp 0x251a
movq 0x5eee(%rip), %rdi      # 0x83c8
callq 0x2ba7
leaq 0x14(%rsp), %rbx
andl $0x0, (%rbx)
callq 0x2608
leaq 0xec(%rip), %rdi        # 0x25df
movsd 0x2b0d(%rip), %xmm0     # 0x5008
xorl %esi, %esi
callq 0x3752
movq %rax, 0x5ebf(%rip)      # 0x83c8
movq %rbx, %rdi
callq 0x2a17
testl %eax, %eax
je 0x2543
cmpl $-0x1, %eax
jne 0x2509
callq 0x2070
cmpl $0x0, (%rax)
jne 0x252d
leaq 0x2aff(%rip), %rdi      # 0x502a
jmp 0x259f
movq %rax, %rbx
leaq 0x2af3(%rip), %rdi      # 0x502a
xorl %eax, %eax
callq 0x3b6d
andl $0x0, (%rbx)
jmp 0x25a6
movq 0x5e7e(%rip), %rdi      # 0x83c8
callq 0x3787
xorl %edi, %edi
callq 0x21f0
leaq 0x2af1(%rip), %rdi      # 0x504e
xorl %eax, %eax
callq 0x3b6d
andl $0x0, (%r14)
movq %rbx, %rdi
callq 0x20d0
testl %eax, %eax
je 0x25a6
cmpl $0x0, (%r14)
je 0x2598
leaq 0x2ad5(%rip), %rdi      # 0x5056
xorl %eax, %eax
callq 0x3b6d
andl $0x0, (%r14)
jmp 0x25a6
callq 0x2070
cmpl $0x0, (%rax)
jne 0x25ae
leaq 0x2ab7(%rip), %rdi      # 0x5056
xorl %eax, %eax
callq 0x3cfc
pushq $0x1
popq %rdi
callq 0x21f0
movq %rax, %rbx
leaq 0x2a9e(%rip), %rdi      # 0x5056
jmp 0x2537