// File: /workspace/github_c_makefile_star2_O2/cirocosta[P]stress/src/print.c
// Function: main
int
main(int argc, char** argv)
{
	stress_args_t args = { 0 };
	thread_arg_t stdout_arg = { .count = 0, .fd = STDOUT_FILENO };
	thread_arg_t stderr_arg = { .count = 0, .fd = STDERR_FILENO };
	pthread_t threads[2];

	setbuf(stdout, NULL);
	setbuf(stderr, NULL);

	stress_parse_args(argc, argv, &args);

	stdout_arg.count = args.n;
	stderr_arg.count = args.n;

	_STRESS_MUST(
	  (!pthread_create(&threads[0], NULL, &thread_handler, &stdout_arg)),
	  "Unexpected error creating stdout thread");
	_STRESS_MUST(
	  (!pthread_create(&threads[1], NULL, &thread_handler, &stderr_arg)),
	  "Unexpected error creating stderr thread");

	_STRESS_MUST((!pthread_join(threads[0], NULL)),
	             "Unexpected error waiting for stdout thread");

	_STRESS_MUST((!pthread_join(threads[1], NULL)),
	             "Unexpected error waiting for stderr thread");

	stress_wait_until_signalized();

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x2030, %rsp           # imm = 0x2030
movq %rsi, %r14
movl %edi, %ebp
leaq 0x28(%rsp), %rbx
movl $0x2008, %edx           # imm = 0x2008
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10b0
movabsq $0x100000000, %rax      # imm = 0x100000000
leaq 0x20(%rsp), %r15
movq %rax, (%r15)
movabsq $0x200000000, %rax      # imm = 0x200000000
movq %rax, 0x8(%rsp)
movq 0x27cc(%rip), %rax      # 0x3fc8
movq (%rax), %rdi
xorl %esi, %esi
callq 0x1090
movq 0x27eb(%rip), %r12      # 0x3ff8
movq (%r12), %rdi
xorl %esi, %esi
callq 0x1090
movl %ebp, %edi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x12bd
movl (%rbx), %eax
movl %eax, (%r15)
movl %eax, 0x8(%rsp)
leaq -0x1a7(%rip), %rdx      # 0x168e
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
movq %r15, %rcx
callq 0x10f0
testl %eax, %eax
jne 0x18a7
leaq 0x18(%rsp), %rdi
leaq -0x1c6(%rip), %rdx      # 0x168e
leaq 0x8(%rsp), %rcx
xorl %esi, %esi
callq 0x10f0
testl %eax, %eax
jne 0x192d
movq 0x10(%rsp), %rdi
xorl %esi, %esi
callq 0x1140
testl %eax, %eax
jne 0x19b3
movq 0x18(%rsp), %rdi
xorl %esi, %esi
callq 0x1140
testl %eax, %eax
jne 0x1a39
callq 0x158e
xorl %eax, %eax
addq $0x2030, %rsp           # imm = 0x2030
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq (%r12), %rcx
leaq 0x76e(%rip), %rdi       # 0x2020
pushq $0x9
popq %rsi
pushq $0x1
popq %rbx
movq %rbx, %rdx
callq 0x1130
movq (%r12), %rcx
leaq 0x75b(%rip), %rdi       # 0x2026
pushq $0x3
popq %rsi
movq %rbx, %rdx
callq 0x1130
movq (%r12), %rcx
leaq 0x85a(%rip), %rdi       # 0x213b
pushq $0x27
popq %rsi
movq %rbx, %rdx
callq 0x1130
movq (%r12), %rcx
leaq 0x756(%rip), %rdi       # 0x204d
pushq $0x2
popq %rsi
movq %rbx, %rdx
callq 0x1130
movq (%r12), %rdi
leaq 0x743(%rip), %rsi       # 0x2050
leaq 0x81b(%rip), %rdx       # 0x212f
xorl %eax, %eax
callq 0x10e0
movq (%r12), %rdi
leaq 0x746(%rip), %rsi       # 0x206c
pushq $0x39
jmp 0x1aba
movq (%r12), %rcx
leaq 0x6e8(%rip), %rdi       # 0x2020
pushq $0x9
popq %rsi
pushq $0x1
popq %rbx
movq %rbx, %rdx
callq 0x1130
movq (%r12), %rcx
leaq 0x6d5(%rip), %rdi       # 0x2026
pushq $0x3
popq %rsi
movq %rbx, %rdx
callq 0x1130
movq (%r12), %rcx
leaq 0x7fc(%rip), %rdi       # 0x2163
pushq $0x27
popq %rsi
movq %rbx, %rdx
callq 0x1130
movq (%r12), %rcx
leaq 0x6d0(%rip), %rdi       # 0x204d
pushq $0x2
popq %rsi
movq %rbx, %rdx
callq 0x1130
movq (%r12), %rdi
leaq 0x6bd(%rip), %rsi       # 0x2050
leaq 0x795(%rip), %rdx       # 0x212f
xorl %eax, %eax
callq 0x10e0
movq (%r12), %rdi
leaq 0x6c0(%rip), %rsi       # 0x206c
pushq $0x3c
jmp 0x1aba
movq (%r12), %rcx
leaq 0x662(%rip), %rdi       # 0x2020
pushq $0x9
popq %rsi
pushq $0x1
popq %rbx
movq %rbx, %rdx
callq 0x1130
movq (%r12), %rcx
leaq 0x64f(%rip), %rdi       # 0x2026
pushq $0x3
popq %rsi
movq %rbx, %rdx
callq 0x1130
movq (%r12), %rcx
leaq 0x79e(%rip), %rdi       # 0x218b
pushq $0x2a
popq %rsi
movq %rbx, %rdx
callq 0x1130
movq (%r12), %rcx
leaq 0x64a(%rip), %rdi       # 0x204d
pushq $0x2
popq %rsi
movq %rbx, %rdx
callq 0x1130
movq (%r12), %rdi
leaq 0x637(%rip), %rsi       # 0x2050
leaq 0x70f(%rip), %rdx       # 0x212f
xorl %eax, %eax
callq 0x10e0
movq (%r12), %rdi
leaq 0x63a(%rip), %rsi       # 0x206c
pushq $0x3f
jmp 0x1aba
movq (%r12), %rcx
leaq 0x5dc(%rip), %rdi       # 0x2020
pushq $0x9
popq %rsi
pushq $0x1
popq %rbx
movq %rbx, %rdx
callq 0x1130
movq (%r12), %rcx
leaq 0x5c9(%rip), %rdi       # 0x2026
pushq $0x3
popq %rsi
movq %rbx, %rdx
callq 0x1130
movq (%r12), %rcx
leaq 0x743(%rip), %rdi       # 0x21b6
pushq $0x2a
popq %rsi
movq %rbx, %rdx
callq 0x1130
movq (%r12), %rcx
leaq 0x5c4(%rip), %rdi       # 0x204d
pushq $0x2
popq %rsi
movq %rbx, %rdx
callq 0x1130
movq (%r12), %rdi
leaq 0x5b1(%rip), %rsi       # 0x2050
leaq 0x689(%rip), %rdx       # 0x212f
xorl %eax, %eax
callq 0x10e0
movq (%r12), %rdi
leaq 0x5b4(%rip), %rsi       # 0x206c
pushq $0x42
popq %rdx
xorl %eax, %eax
callq 0x10e0
movq (%r12), %rsi
pushq $0xa
popq %rdi
callq 0x10c0
movq (%r12), %rcx
leaq 0x5a0(%rip), %rdi       # 0x2079
pushq $0xa
popq %rsi
movq %rbx, %rdx
callq 0x1130
pushq $0x1
popq %rdi
callq 0x1120