#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 pinValidationData(unsigned char *, int, unsigned char *, char *);
int /*<<< orphan*/ printf(char *, int, ...);
scalar_t__ strcmp(char const *, char const *);
int main(int argc, char *argv[]) {
  unsigned char pan[] = "4041850002769603";
  char errstatus[100 + 1];
  int k = 0;
  unsigned char pinvaldat[8 * 2 + 1];
  unsigned char result[] = "1769605000276960";
  int pos = 2;
  k = pinValidationData(pan, pos, pinvaldat, errstatus);
  if (k == 0) {
    if (strcmp((const char *)pinvaldat, (const char *)result) == 0) {
      printf("main.pinValidationData.1 OK position %2d - %s %s \n", pos,
             pinvaldat, result);
    } else {
      printf("main.pinValidationData.1 KO position %2d - %s %s \n", pos,
             pinvaldat, result);
    }
  } else {
    printf("main.pinValidationData.1 KO %2d %s \n", k, errstatus);
  }
  unsigned char result2[] = "1850002769676960";
  pos = 12;
  k = pinValidationData(pan, pos, pinvaldat, errstatus);
  if (k == 0) {
    if (strcmp((const char *)pinvaldat, (const char *)result2) == 0) {
      printf("main.pinValidationData.2 OK position %2d - %s %s \n", pos,
             pinvaldat, result2);
    } else {
      printf("main.pinValidationData.2 KO position %2d - %s %s \n", pos,
             pinvaldat, result2);
    }
  } else {
    printf("main.pinValidationData.2 KO %2d %s \n", k, errstatus);
  }
  unsigned char result3[] = "7696085000276960";
  pos = 1;
  k = pinValidationData(pan, pos, pinvaldat, errstatus);
  if (k == 0) {
    if (strcmp((const char *)pinvaldat, (const char *)result3) == 0) {
      printf("main.pinValidationData.3 OK position %2d - %s %s \n", pos,
             pinvaldat, result3);
    } else {
      printf("main.pinValidationData.3 KO position %2d - %s %s \n", pos,
             pinvaldat, result3);
    }
  } else {
    printf("main.pinValidationData.3 KO %2d %s \n", k, errstatus);
  }
  pos = 13;
  k = pinValidationData(pan, pos, pinvaldat, errstatus);
  if (k == 0) {
    if (strcmp((const char *)pinvaldat, (const char *)result3) == 0) {
      printf("main.pinValidationData.4 KO position %2d - %s %s \n", pos,
             pinvaldat, result3);
    } else {
      printf("main.pinValidationData.4 KO position %2d - %s %s \n", pos,
             pinvaldat, result3);
    }
  } else {
    printf("main.pinValidationData.4 OK position %2d - %s \n", pos, errstatus);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xeb0(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xead(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xeab(%rip),%al
mov    %al,-0x20(%rbp)
movl   $0x0,-0xa4(%rbp)
mov    0xea7(%rip),%rax
mov    %rax,-0xe0(%rbp)
mov    0xea1(%rip),%rax
mov    %rax,-0xd8(%rbp)
mov    0xe9c(%rip),%al
mov    %al,-0xd0(%rbp)
movl   $0x2,-0xe4(%rbp)
lea    -0x30(%rbp),%rdi
mov    -0xe4(%rbp),%esi
lea    -0xc0(%rbp),%rdx
lea    -0xa0(%rbp),%rcx
call   1050 <pinValidationData@plt>
mov    %eax,-0xa4(%rbp)
cmpl   $0x0,-0xa4(%rbp)
jne    123f <main+0x10f>
lea    -0xc0(%rbp),%rdi
lea    -0xe0(%rbp),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    1218 <main+0xe8>
mov    -0xe4(%rbp),%esi
lea    -0xc0(%rbp),%rdx
lea    -0xe0(%rbp),%rcx
lea    0xe65(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    123a <main+0x10a>
mov    -0xe4(%rbp),%esi
lea    -0xc0(%rbp),%rdx
lea    -0xe0(%rbp),%rcx
lea    0xe71(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    125a <main+0x12a>
mov    -0xa4(%rbp),%esi
lea    -0xa0(%rbp),%rdx
lea    0xe84(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0xddf(%rip),%rax
mov    %rax,-0x100(%rbp)
mov    0xdd9(%rip),%rax
mov    %rax,-0xf8(%rbp)
mov    0xdd4(%rip),%al
mov    %al,-0xf0(%rbp)
movl   $0xc,-0xe4(%rbp)
lea    -0x30(%rbp),%rdi
mov    -0xe4(%rbp),%esi
lea    -0xc0(%rbp),%rdx
lea    -0xa0(%rbp),%rcx
call   1050 <pinValidationData@plt>
mov    %eax,-0xa4(%rbp)
cmpl   $0x0,-0xa4(%rbp)
jne    1327 <main+0x1f7>
lea    -0xc0(%rbp),%rdi
lea    -0x100(%rbp),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    1300 <main+0x1d0>
mov    -0xe4(%rbp),%esi
lea    -0xc0(%rbp),%rdx
lea    -0x100(%rbp),%rcx
lea    0xe08(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1322 <main+0x1f2>
mov    -0xe4(%rbp),%esi
lea    -0xc0(%rbp),%rdx
lea    -0x100(%rbp),%rcx
lea    0xe14(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1342 <main+0x212>
mov    -0xa4(%rbp),%esi
lea    -0xa0(%rbp),%rdx
lea    0xe27(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0xd17(%rip),%rax
mov    %rax,-0x120(%rbp)
mov    0xd11(%rip),%rax
mov    %rax,-0x118(%rbp)
mov    0xd0c(%rip),%al
mov    %al,-0x110(%rbp)
movl   $0x1,-0xe4(%rbp)
lea    -0x30(%rbp),%rdi
mov    -0xe4(%rbp),%esi
lea    -0xc0(%rbp),%rdx
lea    -0xa0(%rbp),%rcx
call   1050 <pinValidationData@plt>
mov    %eax,-0xa4(%rbp)
cmpl   $0x0,-0xa4(%rbp)
jne    140f <main+0x2df>
lea    -0xc0(%rbp),%rdi
lea    -0x120(%rbp),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    13e8 <main+0x2b8>
mov    -0xe4(%rbp),%esi
lea    -0xc0(%rbp),%rdx
lea    -0x120(%rbp),%rcx
lea    0xdab(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    140a <main+0x2da>
mov    -0xe4(%rbp),%esi
lea    -0xc0(%rbp),%rdx
lea    -0x120(%rbp),%rcx
lea    0xdb7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    142a <main+0x2fa>
mov    -0xa4(%rbp),%esi
lea    -0xa0(%rbp),%rdx
lea    0xdca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0xd,-0xe4(%rbp)
lea    -0x30(%rbp),%rdi
mov    -0xe4(%rbp),%esi
lea    -0xc0(%rbp),%rdx
lea    -0xa0(%rbp),%rcx
call   1050 <pinValidationData@plt>
mov    %eax,-0xa4(%rbp)
cmpl   $0x0,-0xa4(%rbp)
jne    14cf <main+0x39f>
lea    -0xc0(%rbp),%rdi
lea    -0x120(%rbp),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    14a8 <main+0x378>
mov    -0xe4(%rbp),%esi
lea    -0xc0(%rbp),%rdx
lea    -0x120(%rbp),%rcx
lea    0xd76(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    14ca <main+0x39a>
mov    -0xe4(%rbp),%esi
lea    -0xc0(%rbp),%rdx
lea    -0x120(%rbp),%rcx
lea    0xd4f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    14ea <main+0x3ba>
mov    -0xe4(%rbp),%esi
lea    -0xa0(%rbp),%rdx
lea    0xd62(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x108,%rsp
movaps 0xebf(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movb   $0x0,0x50(%rsp)
movaps 0xece(%rip),%xmm0
movaps %xmm0,0x80(%rsp)
movb   $0x0,0x90(%rsp)
lea    0x40(%rsp),%rdi
mov    %rsp,%rdx
lea    0xa0(%rsp),%rcx
mov    $0x2,%esi
call   1050 <pinValidationData@plt>
test   %eax,%eax
je     119a <main+0x6a>
lea    0xf50(%rip),%rdi
lea    0xa0(%rsp),%rdx
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
jmp    11d6 <main+0xa6>
mov    %rsp,%rdi
lea    0x80(%rsp),%rsi
call   1040 <strcmp@plt>
test   %rax,%rax
je     11b8 <main+0x88>
lea    0xeee(%rip),%rdi
jmp    11bf <main+0x8f>
lea    0xeb2(%rip),%rdi
mov    %rsp,%rdx
lea    0x80(%rsp),%rcx
mov    $0x2,%esi
xor    %eax,%eax
call   1030 <printf@plt>
movaps 0xe63(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
movb   $0x0,0x70(%rsp)
lea    0x40(%rsp),%rdi
mov    %rsp,%rdx
lea    0xa0(%rsp),%rcx
mov    $0xc,%esi
call   1050 <pinValidationData@plt>
test   %eax,%eax
je     121f <main+0xef>
lea    0xf56(%rip),%rdi
lea    0xa0(%rsp),%rdx
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
jmp    1255 <main+0x125>
mov    %rsp,%rdi
lea    0x60(%rsp),%rsi
call   1040 <strcmp@plt>
test   %rax,%rax
je     123a <main+0x10a>
lea    0xef7(%rip),%rdi
jmp    1241 <main+0x111>
lea    0xebb(%rip),%rdi
mov    %rsp,%rdx
lea    0x60(%rsp),%rcx
mov    $0xc,%esi
xor    %eax,%eax
call   1030 <printf@plt>
movaps 0xe04(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movb   $0x0,0x30(%rsp)
lea    0x40(%rsp),%rdi
mov    %rsp,%rdx
lea    0xa0(%rsp),%rcx
mov    $0x1,%esi
call   1050 <pinValidationData@plt>
test   %eax,%eax
je     129e <main+0x16e>
lea    0xf62(%rip),%rdi
lea    0xa0(%rsp),%rdx
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
jmp    12d4 <main+0x1a4>
mov    %rsp,%rdi
lea    0x20(%rsp),%rsi
call   1040 <strcmp@plt>
test   %rax,%rax
je     12b9 <main+0x189>
lea    0xf03(%rip),%rdi
jmp    12c0 <main+0x190>
lea    0xec7(%rip),%rdi
mov    %rsp,%rdx
lea    0x20(%rsp),%rcx
mov    $0x1,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x40(%rsp),%rdi
mov    %rsp,%rdx
lea    0xa0(%rsp),%rcx
mov    $0xd,%esi
call   1050 <pinValidationData@plt>
test   %eax,%eax
je     130f <main+0x1df>
lea    0xf4c(%rip),%rdi
lea    0xa0(%rsp),%rdx
mov    $0xd,%esi
xor    %eax,%eax
call   1030 <printf@plt>
jmp    133b <main+0x20b>
mov    %rsp,%rbx
lea    0x20(%rsp),%r14
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <strcmp@plt>
lea    0xee9(%rip),%rdi
mov    $0xd,%esi
mov    %rbx,%rdx
mov    %r14,%rcx
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x108,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.main.pan = [17 x i8] c"4041850002769603\00"
@__const.main.result = [17 x i8] c"1769605000276960\00"
@.str = [51 x i8] c"main.pinValidationData.1 OK position %2d - %s %s \0A\00"
@.str.1 = [51 x i8] c"main.pinValidationData.1 KO position %2d - %s %s \0A\00"
@.str.2 = [37 x i8] c"main.pinValidationData.1 KO %2d %s \0A\00"
@__const.main.result2 = [17 x i8] c"1850002769676960\00"
@.str.3 = [51 x i8] c"main.pinValidationData.2 OK position %2d - %s %s \0A\00"
@.str.4 = [51 x i8] c"main.pinValidationData.2 KO position %2d - %s %s \0A\00"
@.str.5 = [37 x i8] c"main.pinValidationData.2 KO %2d %s \0A\00"
@__const.main.result3 = [17 x i8] c"7696085000276960\00"
@.str.6 = [51 x i8] c"main.pinValidationData.3 OK position %2d - %s %s \0A\00"
@.str.7 = [51 x i8] c"main.pinValidationData.3 KO position %2d - %s %s \0A\00"
@.str.8 = [37 x i8] c"main.pinValidationData.3 KO %2d %s \0A\00"
@.str.9 = [51 x i8] c"main.pinValidationData.4 KO position %2d - %s %s \0A\00"
@.str.10 = [48 x i8] c"main.pinValidationData.4 OK position %2d - %s \0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [17 x i8]
%7 = alloca [101 x i8]
%8 = alloca i32
%9 = alloca [17 x i8]
%10 = alloca [17 x i8]
%11 = alloca i32
%12 = alloca [17 x i8]
%13 = alloca [17 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%14 = bitcast [17 x i8]* %6 to i8*
store i32 0, i32* %8
%15 = bitcast [17 x i8]* %10 to i8*
store i32 2, i32* %11
%16 = getelementptr inbounds [17 x i8], [17 x i8]* %6, i64 0, i64 0
%17 = load i32, i32* %11
%18 = getelementptr inbounds [17 x i8], [17 x i8]* %9, i64 0, i64 0
%19 = getelementptr inbounds [101 x i8], [101 x i8]* %7, i64 0, i64 0
%20 = call i32 @pinValidationData(i8* %16, i32 %17, i8* %18, i8* %19)
store i32 %20, i32* %8
%21 = load i32, i32* %8
%22 = icmp eq i32 %21, 0
br i1 %22, label %23, label %39
23: ; preds = %2
%24 = getelementptr inbounds [17 x i8], [17 x i8]* %9, i64 0, i64 0
%25 = getelementptr inbounds [17 x i8], [17 x i8]* %10, i64 0, i64 0
%26 = call i64 @strcmp(i8* %24, i8* %25)
%27 = icmp eq i64 %26, 0
br i1 %27, label %28, label %33
28: ; preds = %23
%29 = load i32, i32* %11
%30 = getelementptr inbounds [17 x i8], [17 x i8]* %9, i64 0, i64 0
%31 = getelementptr inbounds [17 x i8], [17 x i8]* %10, i64 0, i64 0
%32 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0), i32 %29, i8* %30, i8* %31)
br label %38
33: ; preds = %23
%34 = load i32, i32* %11
%35 = getelementptr inbounds [17 x i8], [17 x i8]* %9, i64 0, i64 0
%36 = getelementptr inbounds [17 x i8], [17 x i8]* %10, i64 0, i64 0
%37 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.1, i64 0, i64 0), i32 %34, i8* %35, i8* %36)
br label %38
38: ; preds = %33, %28
br label %43
39: ; preds = %2
%40 = load i32, i32* %8
%41 = getelementptr inbounds [101 x i8], [101 x i8]* %7, i64 0, i64 0
%42 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0), i32 %40, i8* %41)
br label %43
43: ; preds = %39, %38
%44 = bitcast [17 x i8]* %12 to i8*
store i32 12, i32* %11
%45 = getelementptr inbounds [17 x i8], [17 x i8]* %6, i64 0, i64 0
%46 = load i32, i32* %11
%47 = getelementptr inbounds [17 x i8], [17 x i8]* %9, i64 0, i64 0
%48 = getelementptr inbounds [101 x i8], [101 x i8]* %7, i64 0, i64 0
%49 = call i32 @pinValidationData(i8* %45, i32 %46, i8* %47, i8* %48)
store i32 %49, i32* %8
%50 = load i32, i32* %8
%51 = icmp eq i32 %50, 0
br i1 %51, label %52, label %68
52: ; preds = %43
%53 = getelementptr inbounds [17 x i8], [17 x i8]* %9, i64 0, i64 0
%54 = getelementptr inbounds [17 x i8], [17 x i8]* %12, i64 0, i64 0
%55 = call i64 @strcmp(i8* %53, i8* %54)
%56 = icmp eq i64 %55, 0
br i1 %56, label %57, label %62
57: ; preds = %52
%58 = load i32, i32* %11
%59 = getelementptr inbounds [17 x i8], [17 x i8]* %9, i64 0, i64 0
%60 = getelementptr inbounds [17 x i8], [17 x i8]* %12, i64 0, i64 0
%61 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.3, i64 0, i64 0), i32 %58, i8* %59, i8* %60)
br label %67
62: ; preds = %52
%63 = load i32, i32* %11
%64 = getelementptr inbounds [17 x i8], [17 x i8]* %9, i64 0, i64 0
%65 = getelementptr inbounds [17 x i8], [17 x i8]* %12, i64 0, i64 0
%66 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.4, i64 0, i64 0), i32 %63, i8* %64, i8* %65)
br label %67
67: ; preds = %62, %57
br label %72
68: ; preds = %43
%69 = load i32, i32* %8
%70 = getelementptr inbounds [101 x i8], [101 x i8]* %7, i64 0, i64 0
%71 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.5, i64 0, i64 0), i32 %69, i8* %70)
br label %72
72: ; preds = %68, %67
%73 = bitcast [17 x i8]* %13 to i8*
store i32 1, i32* %11
%74 = getelementptr inbounds [17 x i8], [17 x i8]* %6, i64 0, i64 0
%75 = load i32, i32* %11
%76 = getelementptr inbounds [17 x i8], [17 x i8]* %9, i64 0, i64 0
%77 = getelementptr inbounds [101 x i8], [101 x i8]* %7, i64 0, i64 0
%78 = call i32 @pinValidationData(i8* %74, i32 %75, i8* %76, i8* %77)
store i32 %78, i32* %8
%79 = load i32, i32* %8
%80 = icmp eq i32 %79, 0
br i1 %80, label %81, label %97
81: ; preds = %72
%82 = getelementptr inbounds [17 x i8], [17 x i8]* %9, i64 0, i64 0
%83 = getelementptr inbounds [17 x i8], [17 x i8]* %13, i64 0, i64 0
%84 = call i64 @strcmp(i8* %82, i8* %83)
%85 = icmp eq i64 %84, 0
br i1 %85, label %86, label %91
86: ; preds = %81
%87 = load i32, i32* %11
%88 = getelementptr inbounds [17 x i8], [17 x i8]* %9, i64 0, i64 0
%89 = getelementptr inbounds [17 x i8], [17 x i8]* %13, i64 0, i64 0
%90 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.6, i64 0, i64 0), i32 %87, i8* %88, i8* %89)
br label %96
91: ; preds = %81
%92 = load i32, i32* %11
%93 = getelementptr inbounds [17 x i8], [17 x i8]* %9, i64 0, i64 0
%94 = getelementptr inbounds [17 x i8], [17 x i8]* %13, i64 0, i64 0
%95 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.7, i64 0, i64 0), i32 %92, i8* %93, i8* %94)
br label %96
96: ; preds = %91, %86
br label %101
97: ; preds = %72
%98 = load i32, i32* %8
%99 = getelementptr inbounds [101 x i8], [101 x i8]* %7, i64 0, i64 0
%100 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.8, i64 0, i64 0), i32 %98, i8* %99)
br label %101
101: ; preds = %97, %96
store i32 13, i32* %11
%102 = getelementptr inbounds [17 x i8], [17 x i8]* %6, i64 0, i64 0
%103 = load i32, i32* %11
%104 = getelementptr inbounds [17 x i8], [17 x i8]* %9, i64 0, i64 0
%105 = getelementptr inbounds [101 x i8], [101 x i8]* %7, i64 0, i64 0
%106 = call i32 @pinValidationData(i8* %102, i32 %103, i8* %104, i8* %105)
store i32 %106, i32* %8
%107 = load i32, i32* %8
%108 = icmp eq i32 %107, 0
br i1 %108, label %109, label %125
109: ; preds = %101
%110 = getelementptr inbounds [17 x i8], [17 x i8]* %9, i64 0, i64 0
%111 = getelementptr inbounds [17 x i8], [17 x i8]* %13, i64 0, i64 0
%112 = call i64 @strcmp(i8* %110, i8* %111)
%113 = icmp eq i64 %112, 0
br i1 %113, label %114, label %119
114: ; preds = %109
%115 = load i32, i32* %11
%116 = getelementptr inbounds [17 x i8], [17 x i8]* %9, i64 0, i64 0
%117 = getelementptr inbounds [17 x i8], [17 x i8]* %13, i64 0, i64 0
%118 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.9, i64 0, i64 0), i32 %115, i8* %116, i8* %117)
br label %124
119: ; preds = %109
%120 = load i32, i32* %11
%121 = getelementptr inbounds [17 x i8], [17 x i8]* %9, i64 0, i64 0
%122 = getelementptr inbounds [17 x i8], [17 x i8]* %13, i64 0, i64 0
%123 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.9, i64 0, i64 0), i32 %120, i8* %121, i8* %122)
br label %124
124: ; preds = %119, %114
br label %129
125: ; preds = %101
%126 = load i32, i32* %11
%127 = getelementptr inbounds [101 x i8], [101 x i8]* %7, i64 0, i64 0
%128 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.10, i64 0, i64 0), i32 %126, i8* %127)
br label %129
129: ; preds = %125, %124
ret i32 0
}

LLVM IR (-O2):
@__const.main.pan = [17 x i8] c"4041850002769603\00"
@__const.main.result = [17 x i8] c"1769605000276960\00"
@.str = [51 x i8] c"main.pinValidationData.1 OK position %2d - %s %s \0A\00"
@.str.1 = [51 x i8] c"main.pinValidationData.1 KO position %2d - %s %s \0A\00"
@.str.2 = [37 x i8] c"main.pinValidationData.1 KO %2d %s \0A\00"
@__const.main.result2 = [17 x i8] c"1850002769676960\00"
@.str.3 = [51 x i8] c"main.pinValidationData.2 OK position %2d - %s %s \0A\00"
@.str.4 = [51 x i8] c"main.pinValidationData.2 KO position %2d - %s %s \0A\00"
@.str.5 = [37 x i8] c"main.pinValidationData.2 KO %2d %s \0A\00"
@__const.main.result3 = [17 x i8] c"7696085000276960\00"
@.str.6 = [51 x i8] c"main.pinValidationData.3 OK position %2d - %s %s \0A\00"
@.str.7 = [51 x i8] c"main.pinValidationData.3 KO position %2d - %s %s \0A\00"
@.str.8 = [37 x i8] c"main.pinValidationData.3 KO %2d %s \0A\00"
@.str.9 = [51 x i8] c"main.pinValidationData.4 KO position %2d - %s %s \0A\00"
@.str.10 = [48 x i8] c"main.pinValidationData.4 OK position %2d - %s \0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [17 x i8]
%4 = alloca [101 x i8]
%5 = alloca [17 x i8]
%6 = alloca [17 x i8]
%7 = alloca [17 x i8]
%8 = alloca [17 x i8]
%9 = getelementptr inbounds [17 x i8], [17 x i8]* %3, i64 0, i64 0
%10 = getelementptr inbounds [101 x i8], [101 x i8]* %4, i64 0, i64 0
%11 = getelementptr inbounds [17 x i8], [17 x i8]* %5, i64 0, i64 0
%12 = getelementptr inbounds [17 x i8], [17 x i8]* %6, i64 0, i64 0
%13 = call i32 @pinValidationData(i8* %9, i32 2, i8* %11, i8* %10)
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %22
15: ; preds = %2
%16 = call i64 @strcmp(i8* %11, i8* %12)
%17 = icmp eq i64 %16, 0
br i1 %17, label %18, label %20
18: ; preds = %15
%19 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0), i32 2, i8* %11, i8* %12)
br label %24
20: ; preds = %15
%21 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.1, i64 0, i64 0), i32 2, i8* %11, i8* %12)
br label %24
22: ; preds = %2
%23 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0), i32 %13, i8* %10)
br label %24
24: ; preds = %18, %20, %22
%25 = getelementptr inbounds [17 x i8], [17 x i8]* %7, i64 0, i64 0
%26 = call i32 @pinValidationData(i8* %9, i32 12, i8* %11, i8* %10)
%27 = icmp eq i32 %26, 0
br i1 %27, label %28, label %35
28: ; preds = %24
%29 = call i64 @strcmp(i8* %11, i8* %25)
%30 = icmp eq i64 %29, 0
br i1 %30, label %31, label %33
31: ; preds = %28
%32 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.3, i64 0, i64 0), i32 12, i8* %11, i8* %25)
br label %37
33: ; preds = %28
%34 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.4, i64 0, i64 0), i32 12, i8* %11, i8* %25)
br label %37
35: ; preds = %24
%36 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.5, i64 0, i64 0), i32 %26, i8* %10)
br label %37
37: ; preds = %31, %33, %35
%38 = getelementptr inbounds [17 x i8], [17 x i8]* %8, i64 0, i64 0
%39 = call i32 @pinValidationData(i8* %9, i32 1, i8* %11, i8* %10)
%40 = icmp eq i32 %39, 0
br i1 %40, label %41, label %48
41: ; preds = %37
%42 = call i64 @strcmp(i8* %11, i8* %38)
%43 = icmp eq i64 %42, 0
br i1 %43, label %44, label %46
44: ; preds = %41
%45 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.6, i64 0, i64 0), i32 1, i8* %11, i8* %38)
br label %50
46: ; preds = %41
%47 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.7, i64 0, i64 0), i32 1, i8* %11, i8* %38)
br label %50
48: ; preds = %37
%49 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.8, i64 0, i64 0), i32 %39, i8* %10)
br label %50
50: ; preds = %44, %46, %48
%51 = call i32 @pinValidationData(i8* %9, i32 13, i8* %11, i8* %10)
%52 = icmp eq i32 %51, 0
br i1 %52, label %53, label %56
53: ; preds = %50
%54 = call i64 @strcmp(i8* %11, i8* %38)
%55 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.9, i64 0, i64 0), i32 13, i8* %11, i8* %38)
br label %58
56: ; preds = %50
%57 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.10, i64 0, i64 0), i32 13, i8* %10)
br label %58
58: ; preds = %53, %56
ret i32 0
}