// File: /workspace/github_c_makefile_star2_O1/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 0x2455
callq 0x3fec
cmpl $0x2, %ebx
jge 0x245f
xorl %r14d, %r14d
jmp 0x2463
movq 0x8(%r14), %r14
callq 0x28b0
testl %eax, %eax
jne 0x24b9
cmpl $0x2, %ebx
jge 0x24d6
callq 0x2800
leaq 0x338(%rip), %rdi       # 0x27b5
xorl %esi, %esi
movl $0xa, %edx
callq 0x2dd8
movq %rax, 0x5f28(%rip)      # 0x83b8
callq 0x2b00
movl %eax, %ebx
testl %eax, %eax
jne 0x2537
callq 0x2979
testl %eax, %eax
je 0x2490
movq 0x5f09(%rip), %rdi      # 0x83b8
callq 0x2eca
jmp 0x25b1
callq 0x2070
cmpl $0x0, (%rax)
jne 0x251b
leaq 0x2b46(%rip), %rdi      # 0x5010
xorl %eax, %eax
callq 0x418b
jmp 0x279c
movl $0x0, 0xc(%rsp)
callq 0x2800
leaq 0x2b54(%rip), %rsi      # 0x503e
movq %r14, %rdi
callq 0x21b0
testq %rax, %rax
jne 0x2551
callq 0x2070
cmpl $0x0, (%rax)
jne 0x2629
leaq 0x2b34(%rip), %rdi      # 0x5040
movq %r14, %rsi
xorl %eax, %eax
callq 0x418b
jmp 0x279c
movq %rax, %rbx
leaq 0x2aeb(%rip), %rdi      # 0x5010
xorl %eax, %eax
callq 0x406c
movl $0x0, (%rbx)
jmp 0x279c
callq 0x2070
cmpl $0x0, (%rax)
jne 0x2599
leaq 0x2ae2(%rip), %rdi      # 0x502a
xorl %eax, %eax
callq 0x418b
jmp 0x25b1
movq %rax, %rbx
callq 0x20c0
movslq %eax, %rdx
leaq 0x2ae7(%rip), %rsi      # 0x504a
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2130
testl %eax, %eax
jns 0x2642
callq 0x2070
movq %rax, %r14
cmpl $0x0, (%rax)
jne 0x2682
leaq 0x2ac1(%rip), %rdi      # 0x504e
xorl %eax, %eax
callq 0x418b
jmp 0x2697
movq %rax, %r14
leaq 0x2a87(%rip), %rdi      # 0x502a
xorl %eax, %eax
callq 0x406c
movl $0x0, (%r14)
testl %ebx, %ebx
jne 0x279c
leaq 0x10(%rsp), %r14
movl $0x0, (%r14)
callq 0x2800
leaq 0x1e4(%rip), %rdi       # 0x27b5
xorl %esi, %esi
movl $0xa, %edx
callq 0x2dd8
movq %rax, 0x5dd4(%rip)      # 0x83b8
movq %r14, %rdi
callq 0x2c41
movl %eax, %ebx
testl %eax, %eax
je 0x2618
cmpl $-0x1, %ebx
jne 0x25e4
callq 0x2070
cmpl $0x0, (%rax)
jne 0x26e1
leaq 0x2a1e(%rip), %rdi      # 0x502a
xorl %eax, %eax
callq 0x418b
jmp 0x26f9
movq 0x5d99(%rip), %rdi      # 0x83b8
callq 0x2eca
jmp 0x26f9
movq %rax, %rbx
leaq 0x2a0d(%rip), %rdi      # 0x5040
movq %r14, %rsi
xorl %eax, %eax
callq 0x406c
jmp 0x252c
movq %rbx, %rdi
callq 0x20d0
testl %eax, %eax
jne 0x26c7
leaq 0xc(%rsp), %rbx
movq %rbx, %rdi
callq 0x2c41
testl %eax, %eax
je 0x2795
cmpl $-0x1, %eax
jne 0x2653
callq 0x2070
cmpl $0x0, (%rax)
jne 0x27a6
leaq 0x29ad(%rip), %rdi      # 0x502a
jmp 0x24ca
leaq 0x29c5(%rip), %rdi      # 0x504e
xorl %eax, %eax
callq 0x406c
movl $0x0, (%r14)
movq %rbx, %rdi
callq 0x20d0
testl %eax, %eax
je 0x279c
cmpl $0x0, (%r14)
je 0x26d5
leaq 0x29a2(%rip), %rdi      # 0x5056
xorl %eax, %eax
callq 0x406c
movl $0x0, (%r14)
jmp 0x279c
callq 0x2070
cmpl $0x0, (%rax)
jne 0x276a
leaq 0x297a(%rip), %rdi      # 0x5056
jmp 0x24ca
movq %rax, %r14
leaq 0x293f(%rip), %rdi      # 0x502a
xorl %eax, %eax
callq 0x406c
movl $0x0, (%r14)
testl %ebx, %ebx
jne 0x279c
leaq 0x14(%rsp), %r14
movl $0x0, (%r14)
callq 0x2800
leaq 0xc0(%rip), %rdi        # 0x27d9
movsd 0x28e7(%rip), %xmm0     # 0x5008
xorl %esi, %esi
callq 0x3c08
movq %rax, 0x5c89(%rip)      # 0x83b8
movq %r14, %rdi
callq 0x2c41
movl %eax, %ebx
testl %eax, %eax
je 0x275c
cmpl $-0x1, %ebx
jne 0x272f
callq 0x2070
cmpl $0x0, (%rax)
jne 0x2779
leaq 0x28d7(%rip), %rdi      # 0x502a
xorl %eax, %eax
callq 0x418b
jmp 0x2791
movq 0x5c55(%rip), %rdi      # 0x83b8
callq 0x3c3d
jmp 0x2791
movq %rax, %rbx
leaq 0x28e2(%rip), %rdi      # 0x5056
jmp 0x2525
movq %rax, %r14
leaq 0x28a7(%rip), %rdi      # 0x502a
xorl %eax, %eax
callq 0x406c
movl $0x0, (%r14)
testl %ebx, %ebx
jne 0x279c
xorl %edi, %edi
callq 0x21e0
movl $0x1, %edi
callq 0x21e0
movq %rax, %rbx
leaq 0x287a(%rip), %rdi      # 0x502a
jmp 0x2525