#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*/ freeSegment(int, int);
int /*<<< orphan*/ printf(char *, int);
scalar_t__ pthread_self();
int /*<<< orphan*/ useSegment(int, int);
int /*<<< orphan*/ usleep(int);
void *trainBT(void *arg) {
  while (1) {
    useSegment(1, 2);
    printf("Train BT ID = %d occupies BC\n", (int)pthread_self());
    usleep(6000000);
    freeSegment(1, 2);
    printf("Train BT ID = %d left BC\n", (int)pthread_self());
    useSegment(2, 6);
    printf("Train BT ID = %d occupies CF\n", (int)pthread_self());
    usleep(6000000);
    freeSegment(2, 6);
    printf("Train BT ID = %d left CF\n", (int)pthread_self());
    useSegment(6, 7);
    printf("Train BT ID = %d occupies FG\n", (int)pthread_self());
    usleep(6000000);
    freeSegment(6, 7);
    printf("Train BT ID = %d left FG\n", (int)pthread_self());
    useSegment(7, 8);
    printf("Train BT ID = %d occupies GH\n", (int)pthread_self());
    usleep(6000000);
    freeSegment(7, 8);
    printf("Train BT ID = %d left GH\n", (int)pthread_self());
    useSegment(8, 9);
    printf("Train BT ID = %d occupies HI\n", (int)pthread_self());
    usleep(6000000);
    freeSegment(8, 9);
    printf("Train BT ID = %d left HI\n", (int)pthread_self());
    useSegment(9, 18);
    printf("Train BT ID = %d occupies IR\n", (int)pthread_self());
    usleep(6000000);
    freeSegment(9, 18);
    printf("Train BT ID = %d left IR\n", (int)pthread_self());
    useSegment(18, 19);
    printf("Train BT ID = %d occupies RS\n", (int)pthread_self());
    usleep(6000000);
    freeSegment(18, 19);
    printf("Train BT ID = %d left RS\n", (int)pthread_self());
    useSegment(19, 20);
    printf("Train BT ID = %d occupies ST\n", (int)pthread_self());
    usleep(6000000);
    freeSegment(19, 20);
    printf("Train BT ID = %d left ST [FINISHED]\n", (int)pthread_self());
    break;
  }
}


x86 assembly (clang, -O0):
<trainBT>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    $0x1,%edi
mov    $0x2,%esi
call   1040 <useSegment@plt>
mov    $0x0,%al
call   1050 <pthread_self@plt>
mov    %eax,%esi
lea    0xe85(%rip),%rdi
call   1030 <printf@plt>
mov    $0x5b8d80,%edi
call   1070 <usleep@plt>
mov    $0x1,%edi
mov    $0x2,%esi
call   1060 <freeSegment@plt>
mov    $0x0,%al
call   1050 <pthread_self@plt>
mov    %eax,%esi
lea    0xe75(%rip),%rdi
call   1030 <printf@plt>
mov    $0x2,%edi
mov    $0x6,%esi
call   1040 <useSegment@plt>
mov    $0x0,%al
call   1050 <pthread_self@plt>
mov    %eax,%esi
lea    0xe6b(%rip),%rdi
call   1030 <printf@plt>
mov    $0x5b8d80,%edi
call   1070 <usleep@plt>
mov    $0x2,%edi
mov    $0x6,%esi
call   1060 <freeSegment@plt>
mov    $0x0,%al
call   1050 <pthread_self@plt>
mov    %eax,%esi
lea    0xe5b(%rip),%rdi
call   1030 <printf@plt>
mov    $0x6,%edi
mov    $0x7,%esi
call   1040 <useSegment@plt>
mov    $0x0,%al
call   1050 <pthread_self@plt>
mov    %eax,%esi
lea    0xe51(%rip),%rdi
call   1030 <printf@plt>
mov    $0x5b8d80,%edi
call   1070 <usleep@plt>
mov    $0x6,%edi
mov    $0x7,%esi
call   1060 <freeSegment@plt>
mov    $0x0,%al
call   1050 <pthread_self@plt>
mov    %eax,%esi
lea    0xe41(%rip),%rdi
call   1030 <printf@plt>
mov    $0x7,%edi
mov    $0x8,%esi
call   1040 <useSegment@plt>
mov    $0x0,%al
call   1050 <pthread_self@plt>
mov    %eax,%esi
lea    0xe37(%rip),%rdi
call   1030 <printf@plt>
mov    $0x5b8d80,%edi
call   1070 <usleep@plt>
mov    $0x7,%edi
mov    $0x8,%esi
call   1060 <freeSegment@plt>
mov    $0x0,%al
call   1050 <pthread_self@plt>
mov    %eax,%esi
lea    0xe27(%rip),%rdi
call   1030 <printf@plt>
mov    $0x8,%edi
mov    $0x9,%esi
call   1040 <useSegment@plt>
mov    $0x0,%al
call   1050 <pthread_self@plt>
mov    %eax,%esi
lea    0xe1d(%rip),%rdi
call   1030 <printf@plt>
mov    $0x5b8d80,%edi
call   1070 <usleep@plt>
mov    $0x8,%edi
mov    $0x9,%esi
call   1060 <freeSegment@plt>
mov    $0x0,%al
call   1050 <pthread_self@plt>
mov    %eax,%esi
lea    0xe0d(%rip),%rdi
call   1030 <printf@plt>
mov    $0x9,%edi
mov    $0x12,%esi
call   1040 <useSegment@plt>
mov    $0x0,%al
call   1050 <pthread_self@plt>
mov    %eax,%esi
lea    0xe03(%rip),%rdi
call   1030 <printf@plt>
mov    $0x5b8d80,%edi
call   1070 <usleep@plt>
mov    $0x9,%edi
mov    $0x12,%esi
call   1060 <freeSegment@plt>
mov    $0x0,%al
call   1050 <pthread_self@plt>
mov    %eax,%esi
lea    0xdf3(%rip),%rdi
call   1030 <printf@plt>
mov    $0x12,%edi
mov    $0x13,%esi
call   1040 <useSegment@plt>
mov    $0x0,%al
call   1050 <pthread_self@plt>
mov    %eax,%esi
lea    0xde9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x5b8d80,%edi
call   1070 <usleep@plt>
mov    $0x12,%edi
mov    $0x13,%esi
call   1060 <freeSegment@plt>
mov    $0x0,%al
call   1050 <pthread_self@plt>
mov    %eax,%esi
lea    0xdd9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x13,%edi
mov    $0x14,%esi
call   1040 <useSegment@plt>
mov    $0x0,%al
call   1050 <pthread_self@plt>
mov    %eax,%esi
lea    0xdcf(%rip),%rdi
call   1030 <printf@plt>
mov    $0x5b8d80,%edi
call   1070 <usleep@plt>
mov    $0x13,%edi
mov    $0x14,%esi
call   1060 <freeSegment@plt>
mov    $0x0,%al
call   1050 <pthread_self@plt>
mov    %eax,%esi
lea    0xdbf(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<trainBT>:
push   %rax
mov    $0x1,%edi
mov    $0x2,%esi
call   1040 <useSegment@plt>
xor    %eax,%eax
call   1050 <pthread_self@plt>
lea    0xe92(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x5b8d80,%edi
call   1070 <usleep@plt>
mov    $0x1,%edi
mov    $0x2,%esi
call   1060 <freeSegment@plt>
xor    %eax,%eax
call   1050 <pthread_self@plt>
lea    0xe82(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x2,%edi
mov    $0x6,%esi
call   1040 <useSegment@plt>
xor    %eax,%eax
call   1050 <pthread_self@plt>
lea    0xe78(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x5b8d80,%edi
call   1070 <usleep@plt>
mov    $0x2,%edi
mov    $0x6,%esi
call   1060 <freeSegment@plt>
xor    %eax,%eax
call   1050 <pthread_self@plt>
lea    0xe68(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x6,%edi
mov    $0x7,%esi
call   1040 <useSegment@plt>
xor    %eax,%eax
call   1050 <pthread_self@plt>
lea    0xe5e(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x5b8d80,%edi
call   1070 <usleep@plt>
mov    $0x6,%edi
mov    $0x7,%esi
call   1060 <freeSegment@plt>
xor    %eax,%eax
call   1050 <pthread_self@plt>
lea    0xe4e(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x7,%edi
mov    $0x8,%esi
call   1040 <useSegment@plt>
xor    %eax,%eax
call   1050 <pthread_self@plt>
lea    0xe44(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x5b8d80,%edi
call   1070 <usleep@plt>
mov    $0x7,%edi
mov    $0x8,%esi
call   1060 <freeSegment@plt>
xor    %eax,%eax
call   1050 <pthread_self@plt>
lea    0xe34(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x8,%edi
mov    $0x9,%esi
call   1040 <useSegment@plt>
xor    %eax,%eax
call   1050 <pthread_self@plt>
lea    0xe2a(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x5b8d80,%edi
call   1070 <usleep@plt>
mov    $0x8,%edi
mov    $0x9,%esi
call   1060 <freeSegment@plt>
xor    %eax,%eax
call   1050 <pthread_self@plt>
lea    0xe1a(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x9,%edi
mov    $0x12,%esi
call   1040 <useSegment@plt>
xor    %eax,%eax
call   1050 <pthread_self@plt>
lea    0xe10(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x5b8d80,%edi
call   1070 <usleep@plt>
mov    $0x9,%edi
mov    $0x12,%esi
call   1060 <freeSegment@plt>
xor    %eax,%eax
call   1050 <pthread_self@plt>
lea    0xe00(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x12,%edi
mov    $0x13,%esi
call   1040 <useSegment@plt>
xor    %eax,%eax
call   1050 <pthread_self@plt>
lea    0xdf6(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x5b8d80,%edi
call   1070 <usleep@plt>
mov    $0x12,%edi
mov    $0x13,%esi
call   1060 <freeSegment@plt>
xor    %eax,%eax
call   1050 <pthread_self@plt>
lea    0xde6(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x13,%edi
mov    $0x14,%esi
call   1040 <useSegment@plt>
xor    %eax,%eax
call   1050 <pthread_self@plt>
lea    0xddc(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x5b8d80,%edi
call   1070 <usleep@plt>
mov    $0x13,%edi
mov    $0x14,%esi
call   1060 <freeSegment@plt>
xor    %eax,%eax
call   1050 <pthread_self@plt>
lea    0xdcc(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [30 x i8] c"Train BT ID = %d occupies BC\0A\00"
@.str.1 = [26 x i8] c"Train BT ID = %d left BC\0A\00"
@.str.2 = [30 x i8] c"Train BT ID = %d occupies CF\0A\00"
@.str.3 = [26 x i8] c"Train BT ID = %d left CF\0A\00"
@.str.4 = [30 x i8] c"Train BT ID = %d occupies FG\0A\00"
@.str.5 = [26 x i8] c"Train BT ID = %d left FG\0A\00"
@.str.6 = [30 x i8] c"Train BT ID = %d occupies GH\0A\00"
@.str.7 = [26 x i8] c"Train BT ID = %d left GH\0A\00"
@.str.8 = [30 x i8] c"Train BT ID = %d occupies HI\0A\00"
@.str.9 = [26 x i8] c"Train BT ID = %d left HI\0A\00"
@.str.10 = [30 x i8] c"Train BT ID = %d occupies IR\0A\00"
@.str.11 = [26 x i8] c"Train BT ID = %d left IR\0A\00"
@.str.12 = [30 x i8] c"Train BT ID = %d occupies RS\0A\00"
@.str.13 = [26 x i8] c"Train BT ID = %d left RS\0A\00"
@.str.14 = [30 x i8] c"Train BT ID = %d occupies ST\0A\00"
@.str.15 = [37 x i8] c"Train BT ID = %d left ST [FINISHED]\0A\00"
define i8* @trainBT(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %3
br label %4
4: ; preds = %1
%5 = call i32 @useSegment(i32 1, i32 2)
%6 = call i64 (...) @pthread_self()
%7 = trunc i64 %6 to i32
%8 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = call i32 @usleep(i32 6000000)
%10 = call i32 @freeSegment(i32 1, i32 2)
%11 = call i64 (...) @pthread_self()
%12 = trunc i64 %11 to i32
%13 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i32 %12)
%14 = call i32 @useSegment(i32 2, i32 6)
%15 = call i64 (...) @pthread_self()
%16 = trunc i64 %15 to i32
%17 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), i32 %16)
%18 = call i32 @usleep(i32 6000000)
%19 = call i32 @freeSegment(i32 2, i32 6)
%20 = call i64 (...) @pthread_self()
%21 = trunc i64 %20 to i32
%22 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0), i32 %21)
%23 = call i32 @useSegment(i32 6, i32 7)
%24 = call i64 (...) @pthread_self()
%25 = trunc i64 %24 to i32
%26 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.4, i64 0, i64 0), i32 %25)
%27 = call i32 @usleep(i32 6000000)
%28 = call i32 @freeSegment(i32 6, i32 7)
%29 = call i64 (...) @pthread_self()
%30 = trunc i64 %29 to i32
%31 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.5, i64 0, i64 0), i32 %30)
%32 = call i32 @useSegment(i32 7, i32 8)
%33 = call i64 (...) @pthread_self()
%34 = trunc i64 %33 to i32
%35 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.6, i64 0, i64 0), i32 %34)
%36 = call i32 @usleep(i32 6000000)
%37 = call i32 @freeSegment(i32 7, i32 8)
%38 = call i64 (...) @pthread_self()
%39 = trunc i64 %38 to i32
%40 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.7, i64 0, i64 0), i32 %39)
%41 = call i32 @useSegment(i32 8, i32 9)
%42 = call i64 (...) @pthread_self()
%43 = trunc i64 %42 to i32
%44 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.8, i64 0, i64 0), i32 %43)
%45 = call i32 @usleep(i32 6000000)
%46 = call i32 @freeSegment(i32 8, i32 9)
%47 = call i64 (...) @pthread_self()
%48 = trunc i64 %47 to i32
%49 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.9, i64 0, i64 0), i32 %48)
%50 = call i32 @useSegment(i32 9, i32 18)
%51 = call i64 (...) @pthread_self()
%52 = trunc i64 %51 to i32
%53 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.10, i64 0, i64 0), i32 %52)
%54 = call i32 @usleep(i32 6000000)
%55 = call i32 @freeSegment(i32 9, i32 18)
%56 = call i64 (...) @pthread_self()
%57 = trunc i64 %56 to i32
%58 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.11, i64 0, i64 0), i32 %57)
%59 = call i32 @useSegment(i32 18, i32 19)
%60 = call i64 (...) @pthread_self()
%61 = trunc i64 %60 to i32
%62 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.12, i64 0, i64 0), i32 %61)
%63 = call i32 @usleep(i32 6000000)
%64 = call i32 @freeSegment(i32 18, i32 19)
%65 = call i64 (...) @pthread_self()
%66 = trunc i64 %65 to i32
%67 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.13, i64 0, i64 0), i32 %66)
%68 = call i32 @useSegment(i32 19, i32 20)
%69 = call i64 (...) @pthread_self()
%70 = trunc i64 %69 to i32
%71 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.14, i64 0, i64 0), i32 %70)
%72 = call i32 @usleep(i32 6000000)
%73 = call i32 @freeSegment(i32 19, i32 20)
%74 = call i64 (...) @pthread_self()
%75 = trunc i64 %74 to i32
%76 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.15, i64 0, i64 0), i32 %75)
br label %77
77: ; preds = %4
%78 = load i8*, i8** %2
ret i8* %78
}

LLVM IR (-O2):
@.str = [30 x i8] c"Train BT ID = %d occupies BC\0A\00"
@.str.1 = [26 x i8] c"Train BT ID = %d left BC\0A\00"
@.str.2 = [30 x i8] c"Train BT ID = %d occupies CF\0A\00"
@.str.3 = [26 x i8] c"Train BT ID = %d left CF\0A\00"
@.str.4 = [30 x i8] c"Train BT ID = %d occupies FG\0A\00"
@.str.5 = [26 x i8] c"Train BT ID = %d left FG\0A\00"
@.str.6 = [30 x i8] c"Train BT ID = %d occupies GH\0A\00"
@.str.7 = [26 x i8] c"Train BT ID = %d left GH\0A\00"
@.str.8 = [30 x i8] c"Train BT ID = %d occupies HI\0A\00"
@.str.9 = [26 x i8] c"Train BT ID = %d left HI\0A\00"
@.str.10 = [30 x i8] c"Train BT ID = %d occupies IR\0A\00"
@.str.11 = [26 x i8] c"Train BT ID = %d left IR\0A\00"
@.str.12 = [30 x i8] c"Train BT ID = %d occupies RS\0A\00"
@.str.13 = [26 x i8] c"Train BT ID = %d left RS\0A\00"
@.str.14 = [30 x i8] c"Train BT ID = %d occupies ST\0A\00"
@.str.15 = [37 x i8] c"Train BT ID = %d left ST [FINISHED]\0A\00"
define noalias i8* @trainBT(i8* nocapture readnone %0) {
%2 = tail call i32 @useSegment(i32 1, i32 2)
%3 = tail call i64 (...) @pthread_self()
%4 = trunc i64 %3 to i32
%5 = tail call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = tail call i32 @usleep(i32 6000000)
%7 = tail call i32 @freeSegment(i32 1, i32 2)
%8 = tail call i64 (...) @pthread_self()
%9 = trunc i64 %8 to i32
%10 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i32 %9)
%11 = tail call i32 @useSegment(i32 2, i32 6)
%12 = tail call i64 (...) @pthread_self()
%13 = trunc i64 %12 to i32
%14 = tail call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), i32 %13)
%15 = tail call i32 @usleep(i32 6000000)
%16 = tail call i32 @freeSegment(i32 2, i32 6)
%17 = tail call i64 (...) @pthread_self()
%18 = trunc i64 %17 to i32
%19 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0), i32 %18)
%20 = tail call i32 @useSegment(i32 6, i32 7)
%21 = tail call i64 (...) @pthread_self()
%22 = trunc i64 %21 to i32
%23 = tail call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.4, i64 0, i64 0), i32 %22)
%24 = tail call i32 @usleep(i32 6000000)
%25 = tail call i32 @freeSegment(i32 6, i32 7)
%26 = tail call i64 (...) @pthread_self()
%27 = trunc i64 %26 to i32
%28 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.5, i64 0, i64 0), i32 %27)
%29 = tail call i32 @useSegment(i32 7, i32 8)
%30 = tail call i64 (...) @pthread_self()
%31 = trunc i64 %30 to i32
%32 = tail call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.6, i64 0, i64 0), i32 %31)
%33 = tail call i32 @usleep(i32 6000000)
%34 = tail call i32 @freeSegment(i32 7, i32 8)
%35 = tail call i64 (...) @pthread_self()
%36 = trunc i64 %35 to i32
%37 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.7, i64 0, i64 0), i32 %36)
%38 = tail call i32 @useSegment(i32 8, i32 9)
%39 = tail call i64 (...) @pthread_self()
%40 = trunc i64 %39 to i32
%41 = tail call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.8, i64 0, i64 0), i32 %40)
%42 = tail call i32 @usleep(i32 6000000)
%43 = tail call i32 @freeSegment(i32 8, i32 9)
%44 = tail call i64 (...) @pthread_self()
%45 = trunc i64 %44 to i32
%46 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.9, i64 0, i64 0), i32 %45)
%47 = tail call i32 @useSegment(i32 9, i32 18)
%48 = tail call i64 (...) @pthread_self()
%49 = trunc i64 %48 to i32
%50 = tail call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.10, i64 0, i64 0), i32 %49)
%51 = tail call i32 @usleep(i32 6000000)
%52 = tail call i32 @freeSegment(i32 9, i32 18)
%53 = tail call i64 (...) @pthread_self()
%54 = trunc i64 %53 to i32
%55 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.11, i64 0, i64 0), i32 %54)
%56 = tail call i32 @useSegment(i32 18, i32 19)
%57 = tail call i64 (...) @pthread_self()
%58 = trunc i64 %57 to i32
%59 = tail call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.12, i64 0, i64 0), i32 %58)
%60 = tail call i32 @usleep(i32 6000000)
%61 = tail call i32 @freeSegment(i32 18, i32 19)
%62 = tail call i64 (...) @pthread_self()
%63 = trunc i64 %62 to i32
%64 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.13, i64 0, i64 0), i32 %63)
%65 = tail call i32 @useSegment(i32 19, i32 20)
%66 = tail call i64 (...) @pthread_self()
%67 = trunc i64 %66 to i32
%68 = tail call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.14, i64 0, i64 0), i32 %67)
%69 = tail call i32 @usleep(i32 6000000)
%70 = tail call i32 @freeSegment(i32 19, i32 20)
%71 = tail call i64 (...) @pthread_self()
%72 = trunc i64 %71 to i32
%73 = tail call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.15, i64 0, i64 0), i32 %72)
ret i8* undef
}