#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*/ printf(char *, ...);
scalar_t__ validate_second(int, int);
void print_second(int *second, int third) {
  printf("Possible second numbers: ");
  int i;
  for (i = 0; i < 10; i++) {
    if (validate_second(second[i], third))
      printf("%-4d", second[i]);
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<print_second>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x10(%rbp)
cmpl   $0xa,-0x10(%rbp)
jge    1197 <print_second+0x77>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
mov    -0xc(%rbp),%esi
call   1040 <validate_second@plt>
cmp    $0x0,%rax
je     1184 <print_second+0x64>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xe9d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1189 <print_second+0x69>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1144 <print_second+0x24>
lea    0xe81(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_second>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
lea    0xec1(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    (%rbx),%edi
mov    %ebp,%esi
call   1050 <validate_second@plt>
test   %rax,%rax
je     1164 <print_second+0x34>
mov    (%rbx),%esi
lea    0xebd(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x4(%rbx),%edi
mov    %ebp,%esi
call   1050 <validate_second@plt>
test   %rax,%rax
je     1184 <print_second+0x54>
mov    0x4(%rbx),%esi
lea    0xe9d(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x8(%rbx),%edi
mov    %ebp,%esi
call   1050 <validate_second@plt>
test   %rax,%rax
je     11a4 <print_second+0x74>
mov    0x8(%rbx),%esi
lea    0xe7d(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0xc(%rbx),%edi
mov    %ebp,%esi
call   1050 <validate_second@plt>
test   %rax,%rax
je     11c4 <print_second+0x94>
mov    0xc(%rbx),%esi
lea    0xe5d(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x10(%rbx),%edi
mov    %ebp,%esi
call   1050 <validate_second@plt>
test   %rax,%rax
je     11e4 <print_second+0xb4>
mov    0x10(%rbx),%esi
lea    0xe3d(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x14(%rbx),%edi
mov    %ebp,%esi
call   1050 <validate_second@plt>
test   %rax,%rax
je     1204 <print_second+0xd4>
mov    0x14(%rbx),%esi
lea    0xe1d(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x18(%rbx),%edi
mov    %ebp,%esi
call   1050 <validate_second@plt>
test   %rax,%rax
je     1224 <print_second+0xf4>
mov    0x18(%rbx),%esi
lea    0xdfd(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x1c(%rbx),%edi
mov    %ebp,%esi
call   1050 <validate_second@plt>
test   %rax,%rax
je     1244 <print_second+0x114>
mov    0x1c(%rbx),%esi
lea    0xddd(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x20(%rbx),%edi
mov    %ebp,%esi
call   1050 <validate_second@plt>
test   %rax,%rax
je     1264 <print_second+0x134>
mov    0x20(%rbx),%esi
lea    0xdbd(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x24(%rbx),%edi
mov    %ebp,%esi
call   1050 <validate_second@plt>
test   %rax,%rax
je     1284 <print_second+0x154>
mov    0x24(%rbx),%esi
lea    0xd9d(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@.str = [26 x i8] c"Possible second numbers: \00"
@.str.1 = [5 x i8] c"%-4d\00"
define void @print_second(i32* nocapture %0, i32 %1) {
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* %0
%5 = tail call i64 @validate_second(i32 %4, i32 %1)
%6 = icmp eq i64 %5, 0
br i1 %6, label %10, label %7
7: ; preds = %2
%8 = load i32, i32* %0
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %8)
br label %10
10: ; preds = %2, %7
%11 = getelementptr inbounds i32, i32* %0, i64 1
%12 = load i32, i32* %11
%13 = tail call i64 @validate_second(i32 %12, i32 %1)
%14 = icmp eq i64 %13, 0
br i1 %14, label %18, label %15
15: ; preds = %10
%16 = load i32, i32* %11
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %16)
br label %18
18: ; preds = %15, %10
%19 = getelementptr inbounds i32, i32* %0, i64 2
%20 = load i32, i32* %19
%21 = tail call i64 @validate_second(i32 %20, i32 %1)
%22 = icmp eq i64 %21, 0
br i1 %22, label %26, label %23
23: ; preds = %18
%24 = load i32, i32* %19
%25 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %24)
br label %26
26: ; preds = %23, %18
%27 = getelementptr inbounds i32, i32* %0, i64 3
%28 = load i32, i32* %27
%29 = tail call i64 @validate_second(i32 %28, i32 %1)
%30 = icmp eq i64 %29, 0
br i1 %30, label %34, label %31
31: ; preds = %26
%32 = load i32, i32* %27
%33 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %32)
br label %34
34: ; preds = %31, %26
%35 = getelementptr inbounds i32, i32* %0, i64 4
%36 = load i32, i32* %35
%37 = tail call i64 @validate_second(i32 %36, i32 %1)
%38 = icmp eq i64 %37, 0
br i1 %38, label %42, label %39
39: ; preds = %34
%40 = load i32, i32* %35
%41 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %40)
br label %42
42: ; preds = %39, %34
%43 = getelementptr inbounds i32, i32* %0, i64 5
%44 = load i32, i32* %43
%45 = tail call i64 @validate_second(i32 %44, i32 %1)
%46 = icmp eq i64 %45, 0
br i1 %46, label %50, label %47
47: ; preds = %42
%48 = load i32, i32* %43
%49 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %48)
br label %50
50: ; preds = %47, %42
%51 = getelementptr inbounds i32, i32* %0, i64 6
%52 = load i32, i32* %51
%53 = tail call i64 @validate_second(i32 %52, i32 %1)
%54 = icmp eq i64 %53, 0
br i1 %54, label %58, label %55
55: ; preds = %50
%56 = load i32, i32* %51
%57 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %56)
br label %58
58: ; preds = %55, %50
%59 = getelementptr inbounds i32, i32* %0, i64 7
%60 = load i32, i32* %59
%61 = tail call i64 @validate_second(i32 %60, i32 %1)
%62 = icmp eq i64 %61, 0
br i1 %62, label %66, label %63
63: ; preds = %58
%64 = load i32, i32* %59
%65 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %64)
br label %66
66: ; preds = %63, %58
%67 = getelementptr inbounds i32, i32* %0, i64 8
%68 = load i32, i32* %67
%69 = tail call i64 @validate_second(i32 %68, i32 %1)
%70 = icmp eq i64 %69, 0
br i1 %70, label %74, label %71
71: ; preds = %66
%72 = load i32, i32* %67
%73 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %72)
br label %74
74: ; preds = %71, %66
%75 = getelementptr inbounds i32, i32* %0, i64 9
%76 = load i32, i32* %75
%77 = tail call i64 @validate_second(i32 %76, i32 %1)
%78 = icmp eq i64 %77, 0
br i1 %78, label %82, label %79
79: ; preds = %74
%80 = load i32, i32* %75
%81 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %80)
br label %82
82: ; preds = %79, %74
%83 = tail call i32 @putchar(i32 10)
ret void
}