#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*/ gen_psk(char const *, char const *);
int /*<<< orphan*/ putchar(char);
void gen_all(void) {
  const char *a[] = {"B0B2DCA742B4", "eircom76162802", "S121K27025123"};
  int i, j;
  for (i = 0; i < 3; i++) {
    for (j = 0; j < 3; j++) {
      gen_psk(a[i], a[j]);
    }
  }
  putchar('\n');
}


x86 assembly (clang, -O0):
<gen_all>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x2cd1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0x2cce(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0x2ccb(%rip),%rax
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x24(%rbp)
cmpl   $0x3,-0x24(%rbp)
jge    11a3 <gen_all+0x83>
movl   $0x0,-0x28(%rbp)
cmpl   $0x3,-0x28(%rbp)
jge    1190 <gen_all+0x70>
movslq -0x24(%rbp),%rax
mov    -0x20(%rbp,%rax,8),%rdi
movslq -0x28(%rbp),%rax
mov    -0x20(%rbp,%rax,8),%rsi
call   1040 <gen_psk@plt>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    1161 <gen_all+0x41>
jmp    1195 <gen_all+0x75>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1150 <gen_all+0x30>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gen_all>:
push   %r15
push   %r14
push   %rbx
lea    0xed4(%rip),%r14
mov    %r14,%rdi
mov    %r14,%rsi
call   1040 <gen_psk@plt>
lea    0xecf(%rip),%r15
mov    %r14,%rdi
mov    %r15,%rsi
call   1040 <gen_psk@plt>
lea    0xecc(%rip),%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <gen_psk@plt>
mov    %r15,%rdi
mov    %r14,%rsi
call   1040 <gen_psk@plt>
mov    %r15,%rdi
mov    %r15,%rsi
call   1040 <gen_psk@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1040 <gen_psk@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <gen_psk@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1040 <gen_psk@plt>
mov    %rbx,%rdi
mov    %rbx,%rsi
call   1040 <gen_psk@plt>
mov    $0xa,%edi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"B0B2DCA742B4\00"
@.str.1 = [15 x i8] c"eircom76162802\00"
@.str.2 = [14 x i8] c"S121K27025123\00"
@__const.gen_all.a = [3 x i8*] [i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i32 0, i32 0)]
define void @gen_all() {
%1 = alloca [3 x i8*]
%2 = alloca i32
%3 = alloca i32
%4 = bitcast [3 x i8*]* %1 to i8*
store i32 0, i32* %2
br label %5
5: ; preds = %26, %0
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 3
br i1 %7, label %8, label %29
8: ; preds = %5
store i32 0, i32* %3
br label %9
9: ; preds = %22, %8
%10 = load i32, i32* %3
%11 = icmp slt i32 %10, 3
br i1 %11, label %12, label %25
12: ; preds = %9
%13 = load i32, i32* %2
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds [3 x i8*], [3 x i8*]* %1, i64 0, i64 %14
%16 = load i8*, i8** %15
%17 = load i32, i32* %3
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds [3 x i8*], [3 x i8*]* %1, i64 0, i64 %18
%20 = load i8*, i8** %19
%21 = call i32 @gen_psk(i8* %16, i8* %20)
br label %22
22: ; preds = %12
%23 = load i32, i32* %3
%24 = add nsw i32 %23, 1
store i32 %24, i32* %3
br label %9
25: ; preds = %9
br label %26
26: ; preds = %25
%27 = load i32, i32* %2
%28 = add nsw i32 %27, 1
store i32 %28, i32* %2
br label %5
29: ; preds = %5
%30 = call i32 @putchar(i8 signext 10)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"B0B2DCA742B4\00"
@.str.1 = [15 x i8] c"eircom76162802\00"
@.str.2 = [14 x i8] c"S121K27025123\00"
define void @gen_all() {
%1 = tail call i32 @gen_psk(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @gen_psk(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @gen_psk(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @gen_psk(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @gen_psk(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32 @gen_psk(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
%7 = tail call i32 @gen_psk(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 @gen_psk(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%9 = tail call i32 @gen_psk(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
%10 = tail call i32 @putchar(i8 signext 10)
ret void
}