// File: /workspace/github_c_makefile_star2_O3/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 %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movl %edi, %ebp
movq (%rsi), %rdi
testq %rdi, %rdi
je 0x2466
callq 0x3f58
cmpl $0x1, %ebp
jg 0x2501
callq 0x27f0
testl %eax, %eax
jne 0x254f
callq 0x2740
leaq 0x26d(%rip), %rdi       # 0x26f5
xorl %esi, %esi
movl $0xa, %edx
callq 0x2d20
movq %rax, 0x5f2d(%rip)      # 0x83c8
callq 0x2a48
testl %eax, %eax
jne 0x2647
callq 0x28b9
testl %eax, %eax
je 0x249b
movq 0x5f10(%rip), %rdi      # 0x83c8
callq 0x2e12
leaq 0x8(%rsp), %rbx
movl $0x0, (%rbx)
callq 0x2740
leaq 0x221(%rip), %rdi       # 0x26f5
xorl %esi, %esi
movl $0xa, %edx
callq 0x2d20
movq %rax, 0x5ee1(%rip)      # 0x83c8
movq %rbx, %rdi
callq 0x2b71
testl %eax, %eax
je 0x25fd
cmpl $-0x1, %eax
jne 0x24e7
jmp 0x2647
movq 0x8(%rbx), %r14
callq 0x27f0
testl %eax, %eax
jne 0x254f
movl $0x0, 0x4(%rsp)
callq 0x2740
leaq 0x2b1c(%rip), %rsi      # 0x503e
movq %r14, %rdi
callq 0x21c0
testq %rax, %rax
jne 0x2574
callq 0x2070
cmpl $0x0, (%rax)
jne 0x25b8
leaq 0x2b00(%rip), %rdi      # 0x5040
movq %r14, %rsi
xorl %eax, %eax
callq 0x40f7
jmp 0x26dc
callq 0x2070
cmpl $0x0, (%rax)
jne 0x2565
leaq 0x2ab0(%rip), %rdi      # 0x5010
jmp 0x26d5
movq %rax, %rbx
leaq 0x2aa1(%rip), %rdi      # 0x5010
jmp 0x2664
movq %rax, %rbx
callq 0x20c0
movslq %eax, %rdx
leaq 0x2ac4(%rip), %rsi      # 0x504a
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2140
testl %eax, %eax
jns 0x25d1
callq 0x2070
movq %rax, %r14
cmpl $0x0, (%rax)
jne 0x2686
leaq 0x2aa2(%rip), %rdi      # 0x504e
xorl %eax, %eax
callq 0x40f7
jmp 0x269b
movq %rax, %rbx
leaq 0x2a7e(%rip), %rdi      # 0x5040
movq %r14, %rsi
xorl %eax, %eax
callq 0x3fd8
jmp 0x266b
movq %rbx, %rdi
callq 0x20d0
testl %eax, %eax
jne 0x26c4
leaq 0x4(%rsp), %rbx
movq %rbx, %rdi
callq 0x2b71
testl %eax, %eax
je 0x267f
cmpl $-0x1, %eax
jne 0x25e6
jmp 0x2647
movq 0x5dc4(%rip), %rdi      # 0x83c8
callq 0x2e12
leaq 0xc(%rsp), %rbx
movl $0x0, (%rbx)
callq 0x2740
leaq 0xf9(%rip), %rdi        # 0x2719
movsd 0x29e0(%rip), %xmm0     # 0x5008
xorl %esi, %esi
callq 0x3b6d
movq %rax, 0x5d92(%rip)      # 0x83c8
movq %rbx, %rdi
callq 0x2b71
testl %eax, %eax
je 0x2673
cmpl $-0x1, %eax
jne 0x2636
callq 0x2070
cmpl $0x0, (%rax)
jne 0x265a
leaq 0x29d2(%rip), %rdi      # 0x502a
jmp 0x26d5
movq %rax, %rbx
leaq 0x29c6(%rip), %rdi      # 0x502a
xorl %eax, %eax
callq 0x3fd8
movl $0x0, (%rbx)
jmp 0x26dc
movq 0x5d4e(%rip), %rdi      # 0x83c8
callq 0x3ba2
xorl %edi, %edi
callq 0x21f0
leaq 0x29c1(%rip), %rdi      # 0x504e
xorl %eax, %eax
callq 0x3fd8
movl $0x0, (%r14)
movq %rbx, %rdi
callq 0x20d0
testl %eax, %eax
je 0x26dc
cmpl $0x0, (%r14)
je 0x26ce
leaq 0x29a2(%rip), %rdi      # 0x5056
xorl %eax, %eax
callq 0x3fd8
movl $0x0, (%r14)
jmp 0x26dc
callq 0x2070
cmpl $0x0, (%rax)
jne 0x26e6
leaq 0x2981(%rip), %rdi      # 0x5056
xorl %eax, %eax
callq 0x40f7
movl $0x1, %edi
callq 0x21f0
movq %rax, %rbx
leaq 0x2966(%rip), %rdi      # 0x5056
jmp 0x2664