// File: /workspace/github_c_makefile_star2_O0/madler[P]pigz/yarn.c
// Function: launch_
thread *launch_(void (*probe)(void *), void *payload,
                char const *file, long line) {
    // construct the requested call and argument for the ignition() routine
    // (allocated instead of automatic so that we're sure this will still be
    // there when ignition() actually starts up -- ignition() will free this
    // allocation)
    struct capsule *capsule = my_malloc(sizeof(struct capsule), file, line);
    capsule->probe = probe;
    capsule->payload = payload;
    capsule->file = file;
    capsule->line = line;

    // assure this thread is in the list before join_all() or ignition() looks
    // for it
    possess_(&(threads_lock), file, line);

    // create the thread and call ignition() from that thread
    thread *th = my_malloc(sizeof(struct thread_s), file, line);
    pthread_attr_t attr;
    int ret = pthread_attr_init(&attr);
    if (ret)
        fail(ret, file, line, "attr_init");
    ret = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
    if (ret)
        fail(ret, file, line, "attr_setdetachstate");
    ret = pthread_create(&(th->id), &attr, ignition, capsule);
    if (ret)
        fail(ret, file, line, "create");
    ret = pthread_attr_destroy(&attr);
    if (ret)
        fail(ret, file, line, "attr_destroy");

    // put the thread in the threads list for join_all()
    th->done = 0;
    th->next = threads;
    threads = th;
    release_(&(threads_lock), file, line);
    return th;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movl $0x20, %edi
callq 0x11740
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
leaq 0x31d4c(%rip), %rdi     # 0x43a48
callq 0x11900
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movl $0x18, %edi
callq 0x11740
movq %rax, -0x30(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x32d0
movl %eax, -0x6c(%rbp)
cmpl $0x0, -0x6c(%rbp)
je 0x11d40
movl -0x6c(%rbp), %edi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
leaq 0xbe4b(%rip), %rcx      # 0x1db86
callq 0x11790
leaq -0x68(%rbp), %rdi
xorl %esi, %esi
callq 0x33b0
movl %eax, -0x6c(%rbp)
cmpl $0x0, -0x6c(%rbp)
je 0x11d6b
movl -0x6c(%rbp), %edi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
leaq 0xbe2a(%rip), %rcx      # 0x1db90
callq 0x11790
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rcx
leaq -0x68(%rbp), %rsi
leaq 0x92(%rip), %rdx        # 0x11e10
callq 0x3460
movl %eax, -0x6c(%rbp)
cmpl $0x0, -0x6c(%rbp)
je 0x11da3
movl -0x6c(%rbp), %edi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
leaq 0xbe06(%rip), %rcx      # 0x1dba4
callq 0x11790
leaq -0x68(%rbp), %rdi
callq 0x3510
movl %eax, -0x6c(%rbp)
cmpl $0x0, -0x6c(%rbp)
je 0x11dcc
movl -0x6c(%rbp), %edi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
leaq 0xbde4(%rip), %rcx      # 0x1dbab
callq 0x11790
movq -0x30(%rbp), %rax
movl $0x0, 0x8(%rax)
movq 0x31cca(%rip), %rcx     # 0x43aa8
movq -0x30(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x30(%rbp), %rax
movq %rax, 0x31cb7(%rip)     # 0x43aa8
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
leaq 0x31c48(%rip), %rdi     # 0x43a48
callq 0x11950
movq -0x30(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
nop