#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*/ doublet();
int /*<<< orphan*/ singlet();
int /*<<< orphan*/ triplet();
int /*<<< orphan*/ usleep(int);
void chapter1_set2() {
  singlet();
  usleep(1200);
  doublet();
  doublet();
  doublet();
  singlet();
  doublet();
  doublet();
  triplet();
  singlet();
  triplet();
  doublet();
  doublet();
  doublet();
  singlet();
  doublet();
  doublet();
  triplet();
  singlet();
  triplet();
  doublet();
  doublet();
  singlet();
  triplet();
  singlet();
  triplet();
  singlet();
  triplet();
}


x86 assembly (clang, -O0):
<chapter1_set2>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <singlet@plt>
mov    $0x4b0,%edi
call   1050 <usleep@plt>
mov    $0x0,%al
call   1040 <doublet@plt>
mov    $0x0,%al
call   1040 <doublet@plt>
mov    $0x0,%al
call   1040 <doublet@plt>
mov    $0x0,%al
call   1030 <singlet@plt>
mov    $0x0,%al
call   1040 <doublet@plt>
mov    $0x0,%al
call   1040 <doublet@plt>
mov    $0x0,%al
call   1060 <triplet@plt>
mov    $0x0,%al
call   1030 <singlet@plt>
mov    $0x0,%al
call   1060 <triplet@plt>
mov    $0x0,%al
call   1040 <doublet@plt>
mov    $0x0,%al
call   1040 <doublet@plt>
mov    $0x0,%al
call   1040 <doublet@plt>
mov    $0x0,%al
call   1030 <singlet@plt>
mov    $0x0,%al
call   1040 <doublet@plt>
mov    $0x0,%al
call   1040 <doublet@plt>
mov    $0x0,%al
call   1060 <triplet@plt>
mov    $0x0,%al
call   1030 <singlet@plt>
mov    $0x0,%al
call   1060 <triplet@plt>
mov    $0x0,%al
call   1040 <doublet@plt>
mov    $0x0,%al
call   1040 <doublet@plt>
mov    $0x0,%al
call   1030 <singlet@plt>
mov    $0x0,%al
call   1060 <triplet@plt>
mov    $0x0,%al
call   1030 <singlet@plt>
mov    $0x0,%al
call   1060 <triplet@plt>
mov    $0x0,%al
call   1030 <singlet@plt>
mov    $0x0,%al
call   1060 <triplet@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<chapter1_set2>:
push   %rax
xor    %eax,%eax
call   1030 <singlet@plt>
mov    $0x4b0,%edi
call   1050 <usleep@plt>
xor    %eax,%eax
call   1040 <doublet@plt>
xor    %eax,%eax
call   1040 <doublet@plt>
xor    %eax,%eax
call   1040 <doublet@plt>
xor    %eax,%eax
call   1030 <singlet@plt>
xor    %eax,%eax
call   1040 <doublet@plt>
xor    %eax,%eax
call   1040 <doublet@plt>
xor    %eax,%eax
call   1060 <triplet@plt>
xor    %eax,%eax
call   1030 <singlet@plt>
xor    %eax,%eax
call   1060 <triplet@plt>
xor    %eax,%eax
call   1040 <doublet@plt>
xor    %eax,%eax
call   1040 <doublet@plt>
xor    %eax,%eax
call   1040 <doublet@plt>
xor    %eax,%eax
call   1030 <singlet@plt>
xor    %eax,%eax
call   1040 <doublet@plt>
xor    %eax,%eax
call   1040 <doublet@plt>
xor    %eax,%eax
call   1060 <triplet@plt>
xor    %eax,%eax
call   1030 <singlet@plt>
xor    %eax,%eax
call   1060 <triplet@plt>
xor    %eax,%eax
call   1040 <doublet@plt>
xor    %eax,%eax
call   1040 <doublet@plt>
xor    %eax,%eax
call   1030 <singlet@plt>
xor    %eax,%eax
call   1060 <triplet@plt>
xor    %eax,%eax
call   1030 <singlet@plt>
xor    %eax,%eax
call   1060 <triplet@plt>
xor    %eax,%eax
call   1030 <singlet@plt>
xor    %eax,%eax
pop    %rcx
jmp    1060 <triplet@plt>

LLVM IR (-O0):
define void @chapter1_set2() {
%1 = call i32 (...) @singlet()
%2 = call i32 @usleep(i32 1200)
%3 = call i32 (...) @doublet()
%4 = call i32 (...) @doublet()
%5 = call i32 (...) @doublet()
%6 = call i32 (...) @singlet()
%7 = call i32 (...) @doublet()
%8 = call i32 (...) @doublet()
%9 = call i32 (...) @triplet()
%10 = call i32 (...) @singlet()
%11 = call i32 (...) @triplet()
%12 = call i32 (...) @doublet()
%13 = call i32 (...) @doublet()
%14 = call i32 (...) @doublet()
%15 = call i32 (...) @singlet()
%16 = call i32 (...) @doublet()
%17 = call i32 (...) @doublet()
%18 = call i32 (...) @triplet()
%19 = call i32 (...) @singlet()
%20 = call i32 (...) @triplet()
%21 = call i32 (...) @doublet()
%22 = call i32 (...) @doublet()
%23 = call i32 (...) @singlet()
%24 = call i32 (...) @triplet()
%25 = call i32 (...) @singlet()
%26 = call i32 (...) @triplet()
%27 = call i32 (...) @singlet()
%28 = call i32 (...) @triplet()
ret void
}

LLVM IR (-O2):
define void @chapter1_set2() {
%1 = tail call i32 (...) @singlet()
%2 = tail call i32 @usleep(i32 1200)
%3 = tail call i32 (...) @doublet()
%4 = tail call i32 (...) @doublet()
%5 = tail call i32 (...) @doublet()
%6 = tail call i32 (...) @singlet()
%7 = tail call i32 (...) @doublet()
%8 = tail call i32 (...) @doublet()
%9 = tail call i32 (...) @triplet()
%10 = tail call i32 (...) @singlet()
%11 = tail call i32 (...) @triplet()
%12 = tail call i32 (...) @doublet()
%13 = tail call i32 (...) @doublet()
%14 = tail call i32 (...) @doublet()
%15 = tail call i32 (...) @singlet()
%16 = tail call i32 (...) @doublet()
%17 = tail call i32 (...) @doublet()
%18 = tail call i32 (...) @triplet()
%19 = tail call i32 (...) @singlet()
%20 = tail call i32 (...) @triplet()
%21 = tail call i32 (...) @doublet()
%22 = tail call i32 (...) @doublet()
%23 = tail call i32 (...) @singlet()
%24 = tail call i32 (...) @triplet()
%25 = tail call i32 (...) @singlet()
%26 = tail call i32 (...) @triplet()
%27 = tail call i32 (...) @singlet()
%28 = tail call i32 (...) @triplet()
ret void
}