#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 */
struct timeval {
  int dummy;
};
typedef int /*<<< orphan*/ d;

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
int /*<<< orphan*/ memcpy(char *, char *, int);
int /*<<< orphan*/ print_time(struct timeval, struct timeval);
int /*<<< orphan*/ puts(char *);
int main() {
  struct timeval start, finish;
  int i;
  puts("--- Start ---");
  {
    char d[] = "Hello! My name is hoge.";
    char s[] = "hoge";
    gettimeofday(&start, NULL);
    for (i = 0; i < 100; i++) {
      char a[32];
      int i;
      memcpy(a, d, sizeof(d));
      for (i = 0; i < sizeof(d); i++) {
        if (a[i] == ' ') {
          a[i] = '\0';
        }
      }
    }
  }
  gettimeofday(&finish, NULL);
  print_time(start, finish);
  puts("--- Finish ---");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
call   1030 <puts@plt>
mov    0xece(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xecb(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xec8(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xe8c(%rip),%eax
mov    %eax,-0x35(%rbp)
mov    0xe87(%rip),%al
mov    %al,-0x31(%rbp)
lea    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <gettimeofday@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0x64,-0x14(%rbp)
jge    1214 <main+0xd4>
lea    -0x60(%rbp),%rdi
lea    -0x30(%rbp),%rsi
mov    $0x18,%edx
call   1050 <memcpy@plt>
movl   $0x0,-0x64(%rbp)
movslq -0x64(%rbp),%rax
cmp    $0x18,%rax
jae    1201 <main+0xc1>
movslq -0x64(%rbp),%rax
movsbl -0x60(%rbp,%rax,1),%eax
cmp    $0x20,%eax
jne    11ee <main+0xae>
movslq -0x64(%rbp),%rax
movb   $0x0,-0x60(%rbp,%rax,1)
jmp    11f3 <main+0xb3>
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    11c5 <main+0x85>
jmp    1206 <main+0xc6>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    11a2 <main+0x62>
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <gettimeofday@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%esi
call   1060 <print_time@plt>
lea    0xde0(%rip),%rdi
call   1030 <puts@plt>
mov    -0x4(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x50,%rsp
lea    0xed1(%rip),%rdi
call   1030 <puts@plt>
movdqa 0xee4(%rip),%xmm0
movdqa %xmm0,0x30(%rsp)
movabs $0x2e65676f682073,%rax
mov    %rax,0x40(%rsp)
lea    0x28(%rsp),%rdi
xor    %esi,%esi
call   1040 <gettimeofday@plt>
mov    $0x64,%ebp
mov    %rsp,%r14
lea    0x30(%rsp),%rbx
jmp    1199 <main+0x59>
nopl   0x0(%rax)
add    $0xffffffff,%ebp
je     13d3 <main+0x293>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    $0x18,%edx
call   1050 <memcpy@plt>
movdqa 0xe4f(%rip),%xmm3
movq   (%rsp),%xmm1
movdqa %xmm1,%xmm0
pcmpeqb %xmm3,%xmm0
movd   %xmm0,%eax
test   $0x1,%al
je     11ca <main+0x8a>
movb   $0x0,(%rsp)
movdqa %xmm0,%xmm2
pslld  $0x8,%xmm2
movd   %xmm2,%eax
shr    $0x10,%eax
test   $0x1,%al
je     11e3 <main+0xa3>
movb   $0x0,0x1(%rsp)
pshuflw $0x55,%xmm1,%xmm2
pcmpeqb %xmm3,%xmm2
pextrw $0x2,%xmm2,%eax
test   $0x1,%al
movdqa 0xe15(%rip),%xmm4
je     1202 <main+0xc2>
movb   $0x0,0x2(%rsp)
movdqa %xmm0,%xmm2
psllq  $0x18,%xmm2
pextrw $0x3,%xmm2,%eax
test   $0x1,%al
je     1219 <main+0xd9>
movb   $0x0,0x3(%rsp)
pshufd $0x55,%xmm1,%xmm1
pcmpeqb %xmm4,%xmm1
pextrw $0x4,%xmm1,%eax
test   $0x1,%al
je     1230 <main+0xf0>
movb   $0x0,0x4(%rsp)
movdqa %xmm0,%xmm1
pslldq $0x5,%xmm1
pextrw $0x5,%xmm1,%eax
test   $0x1,%al
je     1247 <main+0x107>
movb   $0x0,0x5(%rsp)
pextrw $0x3,%xmm0,%eax
test   $0x1,%al
je     1255 <main+0x115>
movb   $0x0,0x6(%rsp)
pslldq $0x7,%xmm0
pextrw $0x7,%xmm0,%eax
test   $0x1,%al
je     1268 <main+0x128>
movb   $0x0,0x7(%rsp)
movq   0x8(%rsp),%xmm1
movdqa %xmm1,%xmm0
pcmpeqb %xmm3,%xmm0
movd   %xmm0,%eax
test   $0x1,%al
je     1283 <main+0x143>
movb   $0x0,0x8(%rsp)
movdqa %xmm0,%xmm2
pslld  $0x8,%xmm2
movd   %xmm2,%eax
shr    $0x10,%eax
test   $0x1,%al
je     129c <main+0x15c>
movb   $0x0,0x9(%rsp)
pshuflw $0x55,%xmm1,%xmm2
pcmpeqb %xmm3,%xmm2
pextrw $0x2,%xmm2,%eax
test   $0x1,%al
je     12b3 <main+0x173>
movb   $0x0,0xa(%rsp)
movdqa %xmm0,%xmm2
psllq  $0x18,%xmm2
pextrw $0x3,%xmm2,%eax
test   $0x1,%al
je     12ca <main+0x18a>
movb   $0x0,0xb(%rsp)
pshufd $0x55,%xmm1,%xmm1
pcmpeqb %xmm4,%xmm1
pextrw $0x4,%xmm1,%eax
test   $0x1,%al
je     12e1 <main+0x1a1>
movb   $0x0,0xc(%rsp)
movdqa %xmm0,%xmm1
pslldq $0x5,%xmm1
pextrw $0x5,%xmm1,%eax
test   $0x1,%al
je     12f8 <main+0x1b8>
movb   $0x0,0xd(%rsp)
pextrw $0x3,%xmm0,%eax
test   $0x1,%al
je     1306 <main+0x1c6>
movb   $0x0,0xe(%rsp)
pslldq $0x7,%xmm0
pextrw $0x7,%xmm0,%eax
test   $0x1,%al
je     1319 <main+0x1d9>
movb   $0x0,0xf(%rsp)
movq   0x10(%rsp),%xmm1
movdqa %xmm1,%xmm0
pcmpeqb %xmm3,%xmm0
movd   %xmm0,%eax
test   $0x1,%al
je     1334 <main+0x1f4>
movb   $0x0,0x10(%rsp)
movdqa %xmm0,%xmm2
pslld  $0x8,%xmm2
movd   %xmm2,%eax
shr    $0x10,%eax
test   $0x1,%al
je     134d <main+0x20d>
movb   $0x0,0x11(%rsp)
pshuflw $0x55,%xmm1,%xmm2
pcmpeqb %xmm3,%xmm2
pextrw $0x2,%xmm2,%eax
test   $0x1,%al
je     1364 <main+0x224>
movb   $0x0,0x12(%rsp)
movdqa %xmm0,%xmm2
psllq  $0x18,%xmm2
pextrw $0x3,%xmm2,%eax
test   $0x1,%al
je     137b <main+0x23b>
movb   $0x0,0x13(%rsp)
pshufd $0x55,%xmm1,%xmm1
pcmpeqb %xmm4,%xmm1
pextrw $0x4,%xmm1,%eax
test   $0x1,%al
je     1392 <main+0x252>
movb   $0x0,0x14(%rsp)
movdqa %xmm0,%xmm1
pslldq $0x5,%xmm1
pextrw $0x5,%xmm1,%eax
test   $0x1,%al
je     13a9 <main+0x269>
movb   $0x0,0x15(%rsp)
pextrw $0x3,%xmm0,%eax
test   $0x1,%al
je     13b7 <main+0x277>
movb   $0x0,0x16(%rsp)
pslldq $0x7,%xmm0
pextrw $0x7,%xmm0,%eax
test   $0x1,%al
je     1190 <main+0x50>
movb   $0x0,0x17(%rsp)
jmp    1190 <main+0x50>
mov    %rsp,%rdi
xor    %esi,%esi
call   1040 <gettimeofday@plt>
mov    0x28(%rsp),%edi
mov    (%rsp),%esi
call   1060 <print_time@plt>
lea    0xc3e(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
%struct.timeval = type { i32 }
@.str = [14 x i8] c"--- Start ---\00"
@__const.main.d = [24 x i8] c"Hello! My name is hoge.\00"
@__const.main.s = [5 x i8] c"hoge\00"
@.str.1 = [15 x i8] c"--- Finish ---\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.timeval
%3 = alloca %struct.timeval
%4 = alloca i32
%5 = alloca [24 x i8]
%6 = alloca [5 x i8]
%7 = alloca [32 x i8]
%8 = alloca i32
store i32 0, i32* %1
%9 = call i32 @puts(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%10 = bitcast [24 x i8]* %5 to i8*
%11 = bitcast [5 x i8]* %6 to i8*
%12 = call i32 @gettimeofday(%struct.timeval* %2, i32* null)
store i32 0, i32* %4
br label %13
13: ; preds = %40, %0
%14 = load i32, i32* %4
%15 = icmp slt i32 %14, 100
br i1 %15, label %16, label %43
16: ; preds = %13
%17 = getelementptr inbounds [32 x i8], [32 x i8]* %7, i64 0, i64 0
%18 = getelementptr inbounds [24 x i8], [24 x i8]* %5, i64 0, i64 0
%19 = call i32 @memcpy(i8* %17, i8* %18, i32 24)
store i32 0, i32* %8
br label %20
20: ; preds = %36, %16
%21 = load i32, i32* %8
%22 = sext i32 %21 to i64
%23 = icmp ult i64 %22, 24
br i1 %23, label %24, label %39
24: ; preds = %20
%25 = load i32, i32* %8
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds [32 x i8], [32 x i8]* %7, i64 0, i64 %26
%28 = load i8, i8* %27
%29 = sext i8 %28 to i32
%30 = icmp eq i32 %29, 32
br i1 %30, label %31, label %35
31: ; preds = %24
%32 = load i32, i32* %8
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds [32 x i8], [32 x i8]* %7, i64 0, i64 %33
store i8 0, i8* %34
br label %35
35: ; preds = %31, %24
br label %36
36: ; preds = %35
%37 = load i32, i32* %8
%38 = add nsw i32 %37, 1
store i32 %38, i32* %8
br label %20
39: ; preds = %20
br label %40
40: ; preds = %39
%41 = load i32, i32* %4
%42 = add nsw i32 %41, 1
store i32 %42, i32* %4
br label %13
43: ; preds = %13
%44 = call i32 @gettimeofday(%struct.timeval* %3, i32* null)
%45 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i32 0, i32 0
%46 = load i32, i32* %45
%47 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i32 0, i32 0
%48 = load i32, i32* %47
%49 = call i32 @print_time(i32 %46, i32 %48)
%50 = call i32 @puts(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%51 = load i32, i32* %1
ret i32 %51
}

LLVM IR (-O2):
%struct.timeval = type { i32 }
@.str = [14 x i8] c"--- Start ---\00"
@__const.main.d = [24 x i8] c"Hello! My name is hoge.\00"
@.str.1 = [15 x i8] c"--- Finish ---\00"
define i32 @main() {
%1 = alloca %struct.timeval
%2 = alloca %struct.timeval
%3 = alloca [24 x i8]
%4 = alloca [32 x i8]
%5 = bitcast %struct.timeval* %1 to i8*
%6 = bitcast %struct.timeval* %2 to i8*
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%8 = getelementptr inbounds [24 x i8], [24 x i8]* %3, i64 0, i64 0
%9 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%10 = getelementptr inbounds [32 x i8], [32 x i8]* %4, i64 0, i64 0
%11 = bitcast [32 x i8]* %4 to <8 x i8>*
%12 = getelementptr inbounds [32 x i8], [32 x i8]* %4, i64 0, i64 0
%13 = getelementptr inbounds [32 x i8], [32 x i8]* %4, i64 0, i64 1
%14 = getelementptr inbounds [32 x i8], [32 x i8]* %4, i64 0, i64 2
%15 = getelementptr inbounds [32 x i8], [32 x i8]* %4, i64 0, i64 3
%16 = getelementptr inbounds [32 x i8], [32 x i8]* %4, i64 0, i64 4
%17 = getelementptr inbounds [32 x i8], [32 x i8]* %4, i64 0, i64 5
%18 = getelementptr inbounds [32 x i8], [32 x i8]* %4, i64 0, i64 6
%19 = getelementptr inbounds [32 x i8], [32 x i8]* %4, i64 0, i64 7
%20 = getelementptr inbounds [32 x i8], [32 x i8]* %4, i64 0, i64 8
%21 = bitcast i8* %20 to <8 x i8>*
%22 = getelementptr inbounds [32 x i8], [32 x i8]* %4, i64 0, i64 8
%23 = getelementptr inbounds [32 x i8], [32 x i8]* %4, i64 0, i64 9
%24 = getelementptr inbounds [32 x i8], [32 x i8]* %4, i64 0, i64 10
%25 = getelementptr inbounds [32 x i8], [32 x i8]* %4, i64 0, i64 11
%26 = getelementptr inbounds [32 x i8], [32 x i8]* %4, i64 0, i64 12
%27 = getelementptr inbounds [32 x i8], [32 x i8]* %4, i64 0, i64 13
%28 = getelementptr inbounds [32 x i8], [32 x i8]* %4, i64 0, i64 14
%29 = getelementptr inbounds [32 x i8], [32 x i8]* %4, i64 0, i64 15
%30 = getelementptr inbounds [32 x i8], [32 x i8]* %4, i64 0, i64 16
%31 = bitcast i8* %30 to <8 x i8>*
%32 = getelementptr inbounds [32 x i8], [32 x i8]* %4, i64 0, i64 16
%33 = getelementptr inbounds [32 x i8], [32 x i8]* %4, i64 0, i64 17
%34 = getelementptr inbounds [32 x i8], [32 x i8]* %4, i64 0, i64 18
%35 = getelementptr inbounds [32 x i8], [32 x i8]* %4, i64 0, i64 19
%36 = getelementptr inbounds [32 x i8], [32 x i8]* %4, i64 0, i64 20
%37 = getelementptr inbounds [32 x i8], [32 x i8]* %4, i64 0, i64 21
%38 = getelementptr inbounds [32 x i8], [32 x i8]* %4, i64 0, i64 22
%39 = getelementptr inbounds [32 x i8], [32 x i8]* %4, i64 0, i64 23
br label %40
40: ; preds = %0, %120
%41 = phi i32 [ 0, %0 ], [ %121, %120 ]
%42 = call i32 @memcpy(i8* %10, i8* %8, i32 24)
%43 = load <8 x i8>, <8 x i8>* %11
%44 = icmp eq <8 x i8> %43, <i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32>
%45 = extractelement <8 x i1> %44, i64 0
br i1 %45, label %46, label %47
46: ; preds = %40
store i8 0, i8* %12
br label %47
47: ; preds = %46, %40
%48 = extractelement <8 x i1> %44, i64 1
br i1 %48, label %49, label %50
49: ; preds = %47
store i8 0, i8* %13
br label %50
50: ; preds = %49, %47
%51 = extractelement <8 x i1> %44, i64 2
br i1 %51, label %52, label %53
52: ; preds = %50
store i8 0, i8* %14
br label %53
53: ; preds = %52, %50
%54 = extractelement <8 x i1> %44, i64 3
br i1 %54, label %55, label %56
55: ; preds = %53
store i8 0, i8* %15
br label %56
56: ; preds = %55, %53
%57 = extractelement <8 x i1> %44, i64 4
br i1 %57, label %58, label %59
58: ; preds = %56
store i8 0, i8* %16
br label %59
59: ; preds = %58, %56
%60 = extractelement <8 x i1> %44, i64 5
br i1 %60, label %61, label %62
61: ; preds = %59
store i8 0, i8* %17
br label %62
62: ; preds = %61, %59
%63 = extractelement <8 x i1> %44, i64 6
br i1 %63, label %64, label %65
64: ; preds = %62
store i8 0, i8* %18
br label %65
65: ; preds = %64, %62
%66 = extractelement <8 x i1> %44, i64 7
br i1 %66, label %67, label %68
67: ; preds = %65
store i8 0, i8* %19
br label %68
68: ; preds = %67, %65
%69 = load <8 x i8>, <8 x i8>* %21
%70 = icmp eq <8 x i8> %69, <i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32>
%71 = extractelement <8 x i1> %70, i64 0
br i1 %71, label %72, label %73
72: ; preds = %68
store i8 0, i8* %22
br label %73
73: ; preds = %72, %68
%74 = extractelement <8 x i1> %70, i64 1
br i1 %74, label %75, label %76
75: ; preds = %73
store i8 0, i8* %23
br label %76
76: ; preds = %75, %73
%77 = extractelement <8 x i1> %70, i64 2
br i1 %77, label %78, label %79
78: ; preds = %76
store i8 0, i8* %24
br label %79
79: ; preds = %78, %76
%80 = extractelement <8 x i1> %70, i64 3
br i1 %80, label %81, label %82
81: ; preds = %79
store i8 0, i8* %25
br label %82
82: ; preds = %81, %79
%83 = extractelement <8 x i1> %70, i64 4
br i1 %83, label %84, label %85
84: ; preds = %82
store i8 0, i8* %26
br label %85
85: ; preds = %84, %82
%86 = extractelement <8 x i1> %70, i64 5
br i1 %86, label %87, label %88
87: ; preds = %85
store i8 0, i8* %27
br label %88
88: ; preds = %87, %85
%89 = extractelement <8 x i1> %70, i64 6
br i1 %89, label %90, label %91
90: ; preds = %88
store i8 0, i8* %28
br label %91
91: ; preds = %90, %88
%92 = extractelement <8 x i1> %70, i64 7
br i1 %92, label %93, label %94
93: ; preds = %91
store i8 0, i8* %29
br label %94
94: ; preds = %93, %91
%95 = load <8 x i8>, <8 x i8>* %31
%96 = icmp eq <8 x i8> %95, <i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32>
%97 = extractelement <8 x i1> %96, i64 0
br i1 %97, label %98, label %99
98: ; preds = %94
store i8 0, i8* %32
br label %99
99: ; preds = %98, %94
%100 = extractelement <8 x i1> %96, i64 1
br i1 %100, label %101, label %102
101: ; preds = %99
store i8 0, i8* %33
br label %102
102: ; preds = %101, %99
%103 = extractelement <8 x i1> %96, i64 2
br i1 %103, label %104, label %105
104: ; preds = %102
store i8 0, i8* %34
br label %105
105: ; preds = %104, %102
%106 = extractelement <8 x i1> %96, i64 3
br i1 %106, label %107, label %108
107: ; preds = %105
store i8 0, i8* %35
br label %108
108: ; preds = %107, %105
%109 = extractelement <8 x i1> %96, i64 4
br i1 %109, label %110, label %111
110: ; preds = %108
store i8 0, i8* %36
br label %111
111: ; preds = %110, %108
%112 = extractelement <8 x i1> %96, i64 5
br i1 %112, label %113, label %114
113: ; preds = %111
store i8 0, i8* %37
br label %114
114: ; preds = %113, %111
%115 = extractelement <8 x i1> %96, i64 6
br i1 %115, label %116, label %117
116: ; preds = %114
store i8 0, i8* %38
br label %117
117: ; preds = %116, %114
%118 = extractelement <8 x i1> %96, i64 7
br i1 %118, label %119, label %120
119: ; preds = %117
store i8 0, i8* %39
br label %120
120: ; preds = %119, %117
%121 = add nuw nsw i32 %41, 1
%122 = icmp eq i32 %121, 100
br i1 %122, label %123, label %40
123: ; preds = %120
%124 = call i32 @gettimeofday(%struct.timeval* %2, i32* null)
%125 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%126 = load i32, i32* %125
%127 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i64 0, i32 0
%128 = load i32, i32* %127
%129 = call i32 @print_time(i32 %126, i32 %128)
%130 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}