// File: /workspace/github_c_makefile_star2_O0/Tarsnap[P]spiped/tests/pushbits/main.c
// Function: start_stop
static int
start_stop(void)
{
	pthread_t thread;
	int in[2];
	int rc;

	/* Create socket pair for the input. */
	if (socketpair(AF_UNIX, SOCK_STREAM, 0, in)) {
		warnp("socketpair");
		goto err0;
	}

	/* Start echoing. */
	if (pushbits(in[1], STDOUT_FILENO, &thread)) {
		warnp("pushbits");
		goto err1;
	}

	/* Cancel the thread immediately. */
	if ((rc = pthread_cancel(thread)) != 0) {
		warn0("pthread_cancel: %s", strerror(rc));
		goto err1;
	}

	/* Wait for thread to finish. */
	if ((rc = pthread_join(thread, NULL)) != 0) {
		warn0("pthread_join: %s", strerror(rc));
		goto err1;
	}

	/* Clean up. */
	if (close(in[0])) {
		warnp("close");
		goto err0;
	}
	if (close(in[1])) {
		warnp("close");
		goto err0;
	}

	/* Success! */
	return (0);

err1:
	if (close(in[0]))
		warnp("close");
	if (close(in[1]))
		warnp("close");
err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
leaq -0x18(%rbp), %rcx
movl $0x1, %esi
xorl %edx, %edx
movl %esi, %edi
callq 0x21b0
cmpl $0x0, %eax
je 0x3a1b
jmp 0x39e1
callq 0x2080
cmpl $0x0, (%rax)
je 0x3a06
leaq 0x284f(%rip), %rdi      # 0x6241
movb $0x0, %al
callq 0x4e40
callq 0x2080
movl $0x0, (%rax)
jmp 0x3a14
leaq 0x2834(%rip), %rdi      # 0x6241
movb $0x0, %al
callq 0x5090
jmp 0x3a16
jmp 0x3c15
movl -0x14(%rbp), %edi
movl $0x1, %esi
leaq -0x10(%rbp), %rdx
callq 0x3c80
cmpl $0x0, %eax
je 0x3a6d
jmp 0x3a33
callq 0x2080
cmpl $0x0, (%rax)
je 0x3a58
leaq 0x27be(%rip), %rdi      # 0x6202
movb $0x0, %al
callq 0x4e40
callq 0x2080
movl $0x0, (%rax)
jmp 0x3a66
leaq 0x27a3(%rip), %rdi      # 0x6202
movb $0x0, %al
callq 0x5090
jmp 0x3a68
jmp 0x3b87
movq -0x10(%rbp), %rdi
callq 0x22d0
movl %eax, -0x1c(%rbp)
cmpl $0x0, %eax
je 0x3aa9
jmp 0x3a80
movl -0x1c(%rbp), %edi
callq 0x22b0
movq %rax, %rsi
leaq 0x2790(%rip), %rdi      # 0x6222
movb $0x0, %al
callq 0x5090
callq 0x2080
movl $0x0, (%rax)
jmp 0x3b87
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x2290
movl %eax, -0x1c(%rbp)
cmpl $0x0, %eax
je 0x3ae9
jmp 0x3ac0
movl -0x1c(%rbp), %edi
callq 0x22b0
movq %rax, %rsi
leaq 0x2739(%rip), %rdi      # 0x620b
movb $0x0, %al
callq 0x5090
callq 0x2080
movl $0x0, (%rax)
jmp 0x3b87
movl -0x18(%rbp), %edi
callq 0x2140
cmpl $0x0, %eax
je 0x3b32
jmp 0x3af8
callq 0x2080
cmpl $0x0, (%rax)
je 0x3b1d
leaq 0x2713(%rip), %rdi      # 0x621c
movb $0x0, %al
callq 0x4e40
callq 0x2080
movl $0x0, (%rax)
jmp 0x3b2b
leaq 0x26f8(%rip), %rdi      # 0x621c
movb $0x0, %al
callq 0x5090
jmp 0x3b2d
jmp 0x3c15
movl -0x14(%rbp), %edi
callq 0x2140
cmpl $0x0, %eax
je 0x3b7b
jmp 0x3b41
callq 0x2080
cmpl $0x0, (%rax)
je 0x3b66
leaq 0x26ca(%rip), %rdi      # 0x621c
movb $0x0, %al
callq 0x4e40
callq 0x2080
movl $0x0, (%rax)
jmp 0x3b74
leaq 0x26af(%rip), %rdi      # 0x621c
movb $0x0, %al
callq 0x5090
jmp 0x3b76
jmp 0x3c15
movl $0x0, -0x4(%rbp)
jmp 0x3c1c
movl -0x18(%rbp), %edi
callq 0x2140
cmpl $0x0, %eax
je 0x3bcd
jmp 0x3b96
callq 0x2080
cmpl $0x0, (%rax)
je 0x3bbb
leaq 0x2675(%rip), %rdi      # 0x621c
movb $0x0, %al
callq 0x4e40
callq 0x2080
movl $0x0, (%rax)
jmp 0x3bc9
leaq 0x265a(%rip), %rdi      # 0x621c
movb $0x0, %al
callq 0x5090
jmp 0x3bcb
jmp 0x3bcd
movl -0x14(%rbp), %edi
callq 0x2140
cmpl $0x0, %eax
je 0x3c13
jmp 0x3bdc
callq 0x2080
cmpl $0x0, (%rax)
je 0x3c01
leaq 0x262f(%rip), %rdi      # 0x621c
movb $0x0, %al
callq 0x4e40
callq 0x2080
movl $0x0, (%rax)
jmp 0x3c0f
leaq 0x2614(%rip), %rdi      # 0x621c
movb $0x0, %al
callq 0x5090
jmp 0x3c11
jmp 0x3c13
jmp 0x3c15
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)