#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*/ test_bzero(unsigned int);
int /*<<< orphan*/ test_memcpy(unsigned int);
int /*<<< orphan*/ test_mempcpy(unsigned int);
int /*<<< orphan*/ test_memset(unsigned int);
int main(void) {
  unsigned tests[] = {1, 2, 3, 4, 5, 8, 15, 17, 23, 33, 0};
  for (unsigned i = 0; tests[i]; i++) {
    test_bzero(tests[i]);
    test_memset(tests[i]);
    test_memcpy(tests[i]);
    test_mempcpy(tests[i]);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
lea    0xe96(%rip),%rsi
mov    $0x2c,%edx
call   1050 <memcpy@plt>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmpl   $0x0,-0x30(%rbp,%rax,4)
je     11c7 <main+0x77>
mov    -0x34(%rbp),%eax
mov    -0x30(%rbp,%rax,4),%edi
call   1070 <test_bzero@plt>
mov    -0x34(%rbp),%eax
mov    -0x30(%rbp,%rax,4),%edi
call   1040 <test_memset@plt>
mov    -0x34(%rbp),%eax
mov    -0x30(%rbp,%rax,4),%edi
call   1030 <test_memcpy@plt>
mov    -0x34(%rbp),%eax
mov    -0x30(%rbp,%rax,4),%edi
call   1060 <test_mempcpy@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    117b <main+0x2b>
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1060 <test_bzero@plt>
mov    $0x1,%edi
call   1040 <test_memset@plt>
mov    $0x1,%edi
call   1030 <test_memcpy@plt>
mov    $0x1,%edi
call   1050 <test_mempcpy@plt>
mov    $0x2,%edi
call   1060 <test_bzero@plt>
mov    $0x2,%edi
call   1040 <test_memset@plt>
mov    $0x2,%edi
call   1030 <test_memcpy@plt>
mov    $0x2,%edi
call   1050 <test_mempcpy@plt>
mov    $0x3,%edi
call   1060 <test_bzero@plt>
mov    $0x3,%edi
call   1040 <test_memset@plt>
mov    $0x3,%edi
call   1030 <test_memcpy@plt>
mov    $0x3,%edi
call   1050 <test_mempcpy@plt>
mov    $0x4,%edi
call   1060 <test_bzero@plt>
mov    $0x4,%edi
call   1040 <test_memset@plt>
mov    $0x4,%edi
call   1030 <test_memcpy@plt>
mov    $0x4,%edi
call   1050 <test_mempcpy@plt>
mov    $0x5,%edi
call   1060 <test_bzero@plt>
mov    $0x5,%edi
call   1040 <test_memset@plt>
mov    $0x5,%edi
call   1030 <test_memcpy@plt>
mov    $0x5,%edi
call   1050 <test_mempcpy@plt>
mov    $0x8,%edi
call   1060 <test_bzero@plt>
mov    $0x8,%edi
call   1040 <test_memset@plt>
mov    $0x8,%edi
call   1030 <test_memcpy@plt>
mov    $0x8,%edi
call   1050 <test_mempcpy@plt>
mov    $0xf,%edi
call   1060 <test_bzero@plt>
mov    $0xf,%edi
call   1040 <test_memset@plt>
mov    $0xf,%edi
call   1030 <test_memcpy@plt>
mov    $0xf,%edi
call   1050 <test_mempcpy@plt>
mov    $0x11,%edi
call   1060 <test_bzero@plt>
mov    $0x11,%edi
call   1040 <test_memset@plt>
mov    $0x11,%edi
call   1030 <test_memcpy@plt>
mov    $0x11,%edi
call   1050 <test_mempcpy@plt>
mov    $0x17,%edi
call   1060 <test_bzero@plt>
mov    $0x17,%edi
call   1040 <test_memset@plt>
mov    $0x17,%edi
call   1030 <test_memcpy@plt>
mov    $0x17,%edi
call   1050 <test_mempcpy@plt>
mov    $0x21,%edi
call   1060 <test_bzero@plt>
mov    $0x21,%edi
call   1040 <test_memset@plt>
mov    $0x21,%edi
call   1030 <test_memcpy@plt>
mov    $0x21,%edi
call   1050 <test_mempcpy@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@__const.main.tests = [11 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5, i32 8, i32 15, i32 17, i32 23, i32 33, i32 0]
define i32 @main() {
%1 = alloca i32
%2 = alloca [11 x i32]
%3 = alloca i32
store i32 0, i32* %1
%4 = bitcast [11 x i32]* %2 to i8*
store i32 0, i32* %3
br label %5
5: ; preds = %32, %0
%6 = load i32, i32* %3
%7 = zext i32 %6 to i64
%8 = getelementptr inbounds [11 x i32], [11 x i32]* %2, i64 0, i64 %7
%9 = load i32, i32* %8
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %35
11: ; preds = %5
%12 = load i32, i32* %3
%13 = zext i32 %12 to i64
%14 = getelementptr inbounds [11 x i32], [11 x i32]* %2, i64 0, i64 %13
%15 = load i32, i32* %14
%16 = call i32 @test_bzero(i32 %15)
%17 = load i32, i32* %3
%18 = zext i32 %17 to i64
%19 = getelementptr inbounds [11 x i32], [11 x i32]* %2, i64 0, i64 %18
%20 = load i32, i32* %19
%21 = call i32 @test_memset(i32 %20)
%22 = load i32, i32* %3
%23 = zext i32 %22 to i64
%24 = getelementptr inbounds [11 x i32], [11 x i32]* %2, i64 0, i64 %23
%25 = load i32, i32* %24
%26 = call i32 @test_memcpy(i32 %25)
%27 = load i32, i32* %3
%28 = zext i32 %27 to i64
%29 = getelementptr inbounds [11 x i32], [11 x i32]* %2, i64 0, i64 %28
%30 = load i32, i32* %29
%31 = call i32 @test_mempcpy(i32 %30)
br label %32
32: ; preds = %11
%33 = load i32, i32* %3
%34 = add i32 %33, 1
store i32 %34, i32* %3
br label %5
35: ; preds = %5
%36 = load i32, i32* %1
ret i32 %36
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @test_bzero(i32 1)
%2 = tail call i32 @test_memset(i32 1)
%3 = tail call i32 @test_memcpy(i32 1)
%4 = tail call i32 @test_mempcpy(i32 1)
%5 = tail call i32 @test_bzero(i32 2)
%6 = tail call i32 @test_memset(i32 2)
%7 = tail call i32 @test_memcpy(i32 2)
%8 = tail call i32 @test_mempcpy(i32 2)
%9 = tail call i32 @test_bzero(i32 3)
%10 = tail call i32 @test_memset(i32 3)
%11 = tail call i32 @test_memcpy(i32 3)
%12 = tail call i32 @test_mempcpy(i32 3)
%13 = tail call i32 @test_bzero(i32 4)
%14 = tail call i32 @test_memset(i32 4)
%15 = tail call i32 @test_memcpy(i32 4)
%16 = tail call i32 @test_mempcpy(i32 4)
%17 = tail call i32 @test_bzero(i32 5)
%18 = tail call i32 @test_memset(i32 5)
%19 = tail call i32 @test_memcpy(i32 5)
%20 = tail call i32 @test_mempcpy(i32 5)
%21 = tail call i32 @test_bzero(i32 8)
%22 = tail call i32 @test_memset(i32 8)
%23 = tail call i32 @test_memcpy(i32 8)
%24 = tail call i32 @test_mempcpy(i32 8)
%25 = tail call i32 @test_bzero(i32 15)
%26 = tail call i32 @test_memset(i32 15)
%27 = tail call i32 @test_memcpy(i32 15)
%28 = tail call i32 @test_mempcpy(i32 15)
%29 = tail call i32 @test_bzero(i32 17)
%30 = tail call i32 @test_memset(i32 17)
%31 = tail call i32 @test_memcpy(i32 17)
%32 = tail call i32 @test_mempcpy(i32 17)
%33 = tail call i32 @test_bzero(i32 23)
%34 = tail call i32 @test_memset(i32 23)
%35 = tail call i32 @test_memcpy(i32 23)
%36 = tail call i32 @test_mempcpy(i32 23)
%37 = tail call i32 @test_bzero(i32 33)
%38 = tail call i32 @test_memset(i32 33)
%39 = tail call i32 @test_memcpy(i32 33)
%40 = tail call i32 @test_mempcpy(i32 33)
ret i32 0
}