#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 */
typedef int /*<<< orphan*/ buf;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fwrite(char *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
int /*<<< orphan*/ strcpy(char *, char *);
void write_instrument_names(FILE *fstream, char **names) {
  int i;
  char buf[32];
  for (i = 0; i < 175; ++i) {
    memset(buf, 0, sizeof(buf));
    strcpy(buf, names[i]);
    fwrite(buf, 1, sizeof(buf), fstream);
  }
}


x86 assembly (clang, -O0):
<write_instrument_names>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0xaf,-0x14(%rbp)
jge    119e <write_instrument_names+0x6e>
lea    -0x40(%rbp),%rdi
xor    %esi,%esi
mov    $0x20,%edx
call   1040 <memset@plt>
lea    -0x40(%rbp),%rdi
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
call   1030 <strcpy@plt>
lea    -0x40(%rbp),%rdi
mov    -0x8(%rbp),%rcx
mov    $0x1,%esi
mov    $0x20,%edx
call   1050 <fwrite@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1147 <write_instrument_names+0x17>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_instrument_names>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %rsi,%r14
mov    %rdi,%r15
xor    %ebx,%ebx
mov    %rsp,%r12
cs nopw 0x0(%rax,%rax,1)
mov    %r12,%rdi
xor    %esi,%esi
mov    $0x20,%edx
call   1040 <memset@plt>
mov    (%r14,%rbx,8),%rsi
mov    %r12,%rdi
call   1030 <strcpy@plt>
mov    %r12,%rdi
mov    $0x1,%esi
mov    $0x20,%edx
mov    %r15,%rcx
call   1050 <fwrite@plt>
add    $0x1,%rbx
cmp    $0xaf,%rbx
jne    1150 <write_instrument_names+0x20>
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @write_instrument_names(i32* %0, i8** %1) {
%3 = alloca i32*
%4 = alloca i8**
%5 = alloca i32
%6 = alloca [32 x i8]
store i32* %0, i32** %3
store i8** %1, i8*** %4
store i32 0, i32* %5
br label %7
7: ; preds = %23, %2
%8 = load i32, i32* %5
%9 = icmp slt i32 %8, 175
br i1 %9, label %10, label %26
10: ; preds = %7
%11 = getelementptr inbounds [32 x i8], [32 x i8]* %6, i64 0, i64 0
%12 = call i32 @memset(i8* %11, i32 0, i32 32)
%13 = getelementptr inbounds [32 x i8], [32 x i8]* %6, i64 0, i64 0
%14 = load i8**, i8*** %4
%15 = load i32, i32* %5
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i8*, i8** %14, i64 %16
%18 = load i8*, i8** %17
%19 = call i32 @strcpy(i8* %13, i8* %18)
%20 = getelementptr inbounds [32 x i8], [32 x i8]* %6, i64 0, i64 0
%21 = load i32*, i32** %3
%22 = call i32 @fwrite(i8* %20, i32 1, i32 32, i32* %21)
br label %23
23: ; preds = %10
%24 = load i32, i32* %5
%25 = add nsw i32 %24, 1
store i32 %25, i32* %5
br label %7
26: ; preds = %7
ret void
}

LLVM IR (-O2):
define void @write_instrument_names(i32* nocapture %0, i8** nocapture %1) {
%3 = alloca [32 x i8]
%4 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
br label %5
5: ; preds = %2, %5
%6 = phi i64 [ 0, %2 ], [ %12, %5 ]
%7 = call i32 @memset(i8* %4, i32 0, i32 32)
%8 = getelementptr inbounds i8*, i8** %1, i64 %6
%9 = load i8*, i8** %8
%10 = call i32 @strcpy(i8* %4, i8* %9)
%11 = call i32 @fwrite(i8* %4, i32 1, i32 32, i32* %0)
%12 = add nuw nsw i64 %6, 1
%13 = icmp eq i64 %12, 175
br i1 %13, label %14, label %5
14: ; preds = %5
ret void
}