#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf("Usage: pthread [<thread-spec...>]\n"
         "Launch one or more threads making useless work for 10 "
         "seconds. When done, each\n"
         "thread prints the mask of the cores they ran on (in "
         "hexadecimal).\n\n");
  printf("If no thread specification is supplied, only the main thread "
         "is used with a\n"
         "default specifiaction, otherwise the first specification is "
         "used for the main\n"
         "thread and additional threads are launched with the "
         "following specifications.\n\n");
  printf("A thread specification is a mask indicating on what core to "
         "pin the thread.\n");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
lea    0xf8e(%rip),%rdi
call   1030 <printf@plt>
lea    0x106c(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf90(%rip),%rdi
call   1030 <puts@plt>
lea    0x106d(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [181 x i8] c"Usage: pthread [<thread-spec...>]\0ALaunch one or more threads making useless work for 10 seconds. When done, each\0Athread prints the mask of the cores they ran on (in hexadecimal).\0A\0A\00"
@.str.1 = [234 x i8] c"If no thread specification is supplied, only the main thread is used with a\0Adefault specifiaction, otherwise the first specification is used for the main\0Athread and additional threads are launched with the following specifications.\0A\0A\00"
@.str.2 = [77 x i8] c"A thread specification is a mask indicating on what core to pin the thread.\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([181 x i8], [181 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([234 x i8], [234 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [180 x i8] c"Usage: pthread [<thread-spec...>]\0ALaunch one or more threads making useless work for 10 seconds. When done, each\0Athread prints the mask of the cores they ran on (in hexadecimal).\0A\00"
@str.3 = [233 x i8] c"If no thread specification is supplied, only the main thread is used with a\0Adefault specifiaction, otherwise the first specification is used for the main\0Athread and additional threads are launched with the following specifications.\0A\00"
@str.4 = [76 x i8] c"A thread specification is a mask indicating on what core to pin the thread.\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([180 x i8], [180 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([233 x i8], [233 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([76 x i8], [76 x i8]* @str.4, i64 0, i64 0))
ret void
}