#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*/ result;

/* Variables and functions */
int /*<<< orphan*/ get_all_macs(char **);
int /*<<< orphan*/ printf(char *, int, char *);
int strlen(char *);
int main(int argc, char *argv[]) {
  char result[10][20];
  get_all_macs(result);
  int i;
  for (i = 0; i < (sizeof(result) / sizeof(result[i])); i++) {
    if (strlen(result[i]) < 14) {
      continue;
    }
    printf("eth%d\'s MAC is %s\n", i, result[i]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0xe0(%rbp),%rdi
call   1030 <get_all_macs@plt>
movl   $0x0,-0xe4(%rbp)
movslq -0xe4(%rbp),%rax
cmp    $0xa,%rax
jae    11d3 <main+0xa3>
movslq -0xe4(%rbp),%rax
lea    -0xe0(%rbp),%rdi
imul   $0x14,%rax,%rax
add    %rax,%rdi
call   1040 <strlen@plt>
cmp    $0xe,%eax
jge    1198 <main+0x68>
jmp    11bf <main+0x8f>
mov    -0xe4(%rbp),%esi
movslq -0xe4(%rbp),%rax
lea    -0xe0(%rbp),%rdx
imul   $0x14,%rax,%rax
add    %rax,%rdx
lea    0xe46(%rip),%rdi
call   1050 <printf@plt>
mov    -0xe4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xe4(%rbp)
jmp    115f <main+0x2f>
xor    %eax,%eax
add    $0xf0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0xd0,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <get_all_macs@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
cmp    $0xe,%eax
jl     1161 <main+0x31>
lea    0xea9(%rip),%rdi
mov    %rsp,%rdx
xor    %esi,%esi
call   1050 <printf@plt>
lea    0x14(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <strlen@plt>
cmp    $0xe,%eax
jl     1187 <main+0x57>
lea    0xe86(%rip),%rdi
mov    $0x1,%esi
mov    %rbx,%rdx
call   1050 <printf@plt>
lea    0x28(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <strlen@plt>
cmp    $0xe,%eax
jl     11ad <main+0x7d>
lea    0xe60(%rip),%rdi
mov    $0x2,%esi
mov    %rbx,%rdx
call   1050 <printf@plt>
lea    0x3c(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <strlen@plt>
cmp    $0xe,%eax
jl     11d3 <main+0xa3>
lea    0xe3a(%rip),%rdi
mov    $0x3,%esi
mov    %rbx,%rdx
call   1050 <printf@plt>
lea    0x50(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <strlen@plt>
cmp    $0xe,%eax
jl     11f9 <main+0xc9>
lea    0xe14(%rip),%rdi
mov    $0x4,%esi
mov    %rbx,%rdx
call   1050 <printf@plt>
lea    0x64(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <strlen@plt>
cmp    $0xe,%eax
jl     121f <main+0xef>
lea    0xdee(%rip),%rdi
mov    $0x5,%esi
mov    %rbx,%rdx
call   1050 <printf@plt>
lea    0x78(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <strlen@plt>
cmp    $0xe,%eax
jl     1245 <main+0x115>
lea    0xdc8(%rip),%rdi
mov    $0x6,%esi
mov    %rbx,%rdx
call   1050 <printf@plt>
lea    0x8c(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <strlen@plt>
cmp    $0xe,%eax
jl     126e <main+0x13e>
lea    0xd9f(%rip),%rdi
mov    $0x7,%esi
mov    %rbx,%rdx
call   1050 <printf@plt>
lea    0xa0(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <strlen@plt>
cmp    $0xe,%eax
jl     1297 <main+0x167>
lea    0xd76(%rip),%rdi
mov    $0x8,%esi
mov    %rbx,%rdx
call   1050 <printf@plt>
lea    0xb4(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <strlen@plt>
cmp    $0xe,%eax
jl     12c0 <main+0x190>
lea    0xd4d(%rip),%rdi
mov    $0x9,%esi
mov    %rbx,%rdx
call   1050 <printf@plt>
xor    %eax,%eax
add    $0xd0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"eth%d's MAC is %s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [10 x [20 x i8]]
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = getelementptr inbounds [10 x [20 x i8]], [10 x [20 x i8]]* %6, i64 0, i64 0
%9 = bitcast [20 x i8]* %8 to i8**
%10 = call i32 @get_all_macs(i8** %9)
store i32 0, i32* %7
br label %11
11: ; preds = %30, %2
%12 = load i32, i32* %7
%13 = sext i32 %12 to i64
%14 = icmp ult i64 %13, 10
br i1 %14, label %15, label %33
15: ; preds = %11
%16 = load i32, i32* %7
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds [10 x [20 x i8]], [10 x [20 x i8]]* %6, i64 0, i64 %17
%19 = getelementptr inbounds [20 x i8], [20 x i8]* %18, i64 0, i64 0
%20 = call i32 @strlen(i8* %19)
%21 = icmp slt i32 %20, 14
br i1 %21, label %22, label %23
22: ; preds = %15
br label %30
23: ; preds = %15
%24 = load i32, i32* %7
%25 = load i32, i32* %7
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds [10 x [20 x i8]], [10 x [20 x i8]]* %6, i64 0, i64 %26
%28 = getelementptr inbounds [20 x i8], [20 x i8]* %27, i64 0, i64 0
%29 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %24, i8* %28)
br label %30
30: ; preds = %23, %22
%31 = load i32, i32* %7
%32 = add nsw i32 %31, 1
store i32 %32, i32* %7
br label %11
33: ; preds = %11
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"eth%d's MAC is %s\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [10 x [20 x i8]]
%4 = getelementptr inbounds [10 x [20 x i8]], [10 x [20 x i8]]* %3, i64 0, i64 0, i64 0
%5 = bitcast [10 x [20 x i8]]* %3 to i8**
%6 = call i32 @get_all_macs(i8** %5)
%7 = call i32 @strlen(i8* %4)
%8 = icmp slt i32 %7, 14
br i1 %8, label %11, label %9
9: ; preds = %2
%10 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 0, i8* %4)
br label %11
11: ; preds = %2, %9
%12 = getelementptr inbounds [10 x [20 x i8]], [10 x [20 x i8]]* %3, i64 0, i64 1, i64 0
%13 = call i32 @strlen(i8* %12)
%14 = icmp slt i32 %13, 14
br i1 %14, label %17, label %15
15: ; preds = %11
%16 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 1, i8* %12)
br label %17
17: ; preds = %15, %11
%18 = getelementptr inbounds [10 x [20 x i8]], [10 x [20 x i8]]* %3, i64 0, i64 2, i64 0
%19 = call i32 @strlen(i8* %18)
%20 = icmp slt i32 %19, 14
br i1 %20, label %23, label %21
21: ; preds = %17
%22 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 2, i8* %18)
br label %23
23: ; preds = %21, %17
%24 = getelementptr inbounds [10 x [20 x i8]], [10 x [20 x i8]]* %3, i64 0, i64 3, i64 0
%25 = call i32 @strlen(i8* %24)
%26 = icmp slt i32 %25, 14
br i1 %26, label %29, label %27
27: ; preds = %23
%28 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 3, i8* %24)
br label %29
29: ; preds = %27, %23
%30 = getelementptr inbounds [10 x [20 x i8]], [10 x [20 x i8]]* %3, i64 0, i64 4, i64 0
%31 = call i32 @strlen(i8* %30)
%32 = icmp slt i32 %31, 14
br i1 %32, label %35, label %33
33: ; preds = %29
%34 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 4, i8* %30)
br label %35
35: ; preds = %33, %29
%36 = getelementptr inbounds [10 x [20 x i8]], [10 x [20 x i8]]* %3, i64 0, i64 5, i64 0
%37 = call i32 @strlen(i8* %36)
%38 = icmp slt i32 %37, 14
br i1 %38, label %41, label %39
39: ; preds = %35
%40 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 5, i8* %36)
br label %41
41: ; preds = %39, %35
%42 = getelementptr inbounds [10 x [20 x i8]], [10 x [20 x i8]]* %3, i64 0, i64 6, i64 0
%43 = call i32 @strlen(i8* %42)
%44 = icmp slt i32 %43, 14
br i1 %44, label %47, label %45
45: ; preds = %41
%46 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 6, i8* %42)
br label %47
47: ; preds = %45, %41
%48 = getelementptr inbounds [10 x [20 x i8]], [10 x [20 x i8]]* %3, i64 0, i64 7, i64 0
%49 = call i32 @strlen(i8* %48)
%50 = icmp slt i32 %49, 14
br i1 %50, label %53, label %51
51: ; preds = %47
%52 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 7, i8* %48)
br label %53
53: ; preds = %51, %47
%54 = getelementptr inbounds [10 x [20 x i8]], [10 x [20 x i8]]* %3, i64 0, i64 8, i64 0
%55 = call i32 @strlen(i8* %54)
%56 = icmp slt i32 %55, 14
br i1 %56, label %59, label %57
57: ; preds = %53
%58 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 8, i8* %54)
br label %59
59: ; preds = %57, %53
%60 = getelementptr inbounds [10 x [20 x i8]], [10 x [20 x i8]]* %3, i64 0, i64 9, i64 0
%61 = call i32 @strlen(i8* %60)
%62 = icmp slt i32 %61, 14
br i1 %62, label %65, label %63
63: ; preds = %59
%64 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 9, i8* %60)
br label %65
65: ; preds = %63, %59
ret i32 0
}