#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*/ lfsr_load(unsigned short);
unsigned short lfsr_next();
int /*<<< orphan*/ lfsr_train(unsigned short);
int /*<<< orphan*/ printf(char *, ...);
int qtoi(unsigned short);
unsigned short validate_rx_datapath(unsigned short buf_hardware[], int num) {
  unsigned short *buf_simulation;
  int i, istart;
  int step = 1;
  int search = 0;
  int qflag = 0;
  int iflag = 0;
  unsigned short sample;
  unsigned short i_samp = 0, q_samp = 0;
  unsigned short i_samp_prev = 0, q_samp_prev = 0;
  int error_cnt = 0;
  for (i = 3; i < num - 2; i += step) {
    if (step == 1) {
      q_samp_prev = i_samp_prev;
      i_samp_prev = q_samp;
      q_samp = i_samp;
      i_samp = buf_hardware[i];
    } else {
      q_samp_prev = q_samp;
      i_samp_prev = i_samp;
      q_samp = buf_hardware[i - 1];
      i_samp = buf_hardware[i];
    }
    if (search == 0) {
      if ((i_samp == qtoi(q_samp)) &&
          ((q_samp & 0x7ffc) == ((q_samp_prev >> 1) & 0x7ffc))) {
        step = 2;
        printf("Found Q\n");
        search++;
        lfsr_load(q_samp);
      }
    } else if (search < 8) {
      lfsr_train(q_samp);
      search++;
    } else {
      unsigned short tmp = lfsr_next();
      if (i_samp != qtoi(tmp)) {
        printf("%6d: I_hw:\t%4x\tI_sw:\t%4x", i, i_samp, qtoi(tmp));
        printf(" <== Error");
        printf("\n");
        error_cnt++;
      }
      if (q_samp != tmp) {
        printf("%6d: Q_hw:\t%4x\tQ_sw:\t%4x", i + 1, q_samp, tmp);
        if (q_samp != tmp)
          printf(" <== Error");
        printf("\n");
        error_cnt++;
      }
    }
  }
  if (error_cnt == 0)
    printf("\nValidate %d samples OK\n", num);
  return 0;
}


x86 assembly (clang, -O0):
<validate_rx_datapath>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x1,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
movl   $0x0,-0x30(%rbp)
movw   $0x0,-0x34(%rbp)
movw   $0x0,-0x36(%rbp)
movw   $0x0,-0x38(%rbp)
movw   $0x0,-0x3a(%rbp)
movl   $0x0,-0x40(%rbp)
movl   $0x3,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    $0x2,%ecx
cmp    %ecx,%eax
jge    13a7 <validate_rx_datapath+0x257>
cmpl   $0x1,-0x24(%rbp)
jne    11e9 <validate_rx_datapath+0x99>
mov    -0x38(%rbp),%ax
mov    %ax,-0x3a(%rbp)
mov    -0x36(%rbp),%ax
mov    %ax,-0x38(%rbp)
mov    -0x34(%rbp),%ax
mov    %ax,-0x36(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,2),%ax
mov    %ax,-0x34(%rbp)
jmp    121e <validate_rx_datapath+0xce>
mov    -0x36(%rbp),%ax
mov    %ax,-0x3a(%rbp)
mov    -0x34(%rbp),%ax
mov    %ax,-0x38(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x1c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,2),%ax
mov    %ax,-0x36(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,2),%ax
mov    %ax,-0x34(%rbp)
cmpl   $0x0,-0x28(%rbp)
jne    128f <validate_rx_datapath+0x13f>
movzwl -0x34(%rbp),%eax
mov    %eax,-0x48(%rbp)
movzwl -0x36(%rbp),%edi
call   1070 <qtoi@plt>
mov    %eax,%ecx
mov    -0x48(%rbp),%eax
cmp    %ecx,%eax
jne    128a <validate_rx_datapath+0x13a>
movzwl -0x36(%rbp),%eax
and    $0x7ffc,%eax
movzwl -0x3a(%rbp),%ecx
sar    $0x1,%ecx
and    $0x7ffc,%ecx
cmp    %ecx,%eax
jne    128a <validate_rx_datapath+0x13a>
movl   $0x2,-0x24(%rbp)
lea    0xd8f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
movzwl -0x36(%rbp),%edi
call   1060 <lfsr_load@plt>
jmp    1394 <validate_rx_datapath+0x244>
cmpl   $0x8,-0x28(%rbp)
jge    12b0 <validate_rx_datapath+0x160>
movzwl -0x36(%rbp),%edi
call   1050 <lfsr_train@plt>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    138f <validate_rx_datapath+0x23f>
mov    $0x0,%al
call   1030 <lfsr_next@plt>
mov    %ax,-0x42(%rbp)
movzwl -0x34(%rbp),%eax
mov    %eax,-0x4c(%rbp)
movzwl -0x42(%rbp),%edi
call   1070 <qtoi@plt>
mov    %eax,%ecx
mov    -0x4c(%rbp),%eax
cmp    %ecx,%eax
je     1329 <validate_rx_datapath+0x1d9>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x54(%rbp)
movzwl -0x34(%rbp),%eax
mov    %eax,-0x50(%rbp)
movzwl -0x42(%rbp),%edi
call   1070 <qtoi@plt>
mov    -0x54(%rbp),%esi
mov    -0x50(%rbp),%edx
mov    %eax,%ecx
lea    0xd0c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xd17(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xd44(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
movzwl -0x36(%rbp),%eax
movzwl -0x42(%rbp),%ecx
cmp    %ecx,%eax
je     138a <validate_rx_datapath+0x23a>
mov    -0x1c(%rbp),%esi
add    $0x1,%esi
movzwl -0x36(%rbp),%edx
movzwl -0x42(%rbp),%ecx
lea    0xcdf(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movzwl -0x36(%rbp),%eax
movzwl -0x42(%rbp),%ecx
cmp    %ecx,%eax
je     1373 <validate_rx_datapath+0x223>
lea    0xcb6(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xce3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    138f <validate_rx_datapath+0x23f>
jmp    1394 <validate_rx_datapath+0x244>
jmp    1399 <validate_rx_datapath+0x249>
mov    -0x24(%rbp),%eax
add    -0x1c(%rbp),%eax
mov    %eax,-0x1c(%rbp)
jmp    11a1 <validate_rx_datapath+0x51>
cmpl   $0x0,-0x40(%rbp)
jne    13c2 <validate_rx_datapath+0x272>
mov    -0xc(%rbp),%esi
lea    0xc8b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
movzwl %ax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<validate_rx_datapath>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
cmp    $0x6,%esi
jl     135e <validate_rx_datapath+0x1ee>
mov    %rdi,%r14
mov    %rsi,0x20(%rsp)
lea    -0x2(%rsi),%eax
mov    %eax,0x1c(%rsp)
mov    $0x1,%edx
mov    $0x3,%ebx
movl   $0x0,0x4(%rsp)
movl   $0x0,0x14(%rsp)
xor    %r12d,%r12d
xor    %r15d,%r15d
xor    %edi,%edi
mov    %r14,0x8(%rsp)
jmp    11e2 <validate_rx_datapath+0x72>
nop
mov    %edi,%r13d
movzwl %r12w,%edi
mov    %edx,%ebp
call   1070 <lfsr_train@plt>
mov    %r13d,%edi
mov    %ebp,%edx
add    $0x1,%edi
add    %edx,%ebx
cmp    0x1c(%rsp),%ebx
jge    1352 <validate_rx_datapath+0x1e2>
movslq %ebx,%rax
cmp    $0x1,%edx
jne    1200 <validate_rx_datapath+0x90>
mov    %r15d,%ecx
mov    %r12d,%r15d
mov    0x14(%rsp),%esi
mov    %esi,%r13d
jmp    1209 <validate_rx_datapath+0x99>
nopl   0x0(%rax)
movzwl -0x2(%r14,%rax,2),%ecx
mov    %r12d,%r13d
mov    %r15d,0x14(%rsp)
mov    %ecx,%r12d
movzwl (%r14,%rax,2),%r15d
movzwl %r15w,%ebp
test   %edi,%edi
je     12e0 <validate_rx_datapath+0x170>
cmp    $0x7,%edi
jle    11c0 <validate_rx_datapath+0x50>
mov    %edi,0x10(%rsp)
mov    %r12d,%r14d
mov    %edx,(%rsp)
xor    %eax,%eax
call   1040 <lfsr_next@plt>
mov    %eax,%r12d
movzwl %ax,%r13d
mov    %r13d,%edi
call   1090 <qtoi@plt>
cmp    %ebp,%eax
mov    %r13d,0x18(%rsp)
je     1289 <validate_rx_datapath+0x119>
mov    %r13d,%edi
call   1090 <qtoi@plt>
lea    0xda1(%rip),%rdi
mov    %ebx,%esi
mov    %ebp,%edx
mov    %eax,%ecx
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xda6(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
addl   $0x1,0x4(%rsp)
mov    %r14d,%ebp
cmp    %r12w,%bp
mov    %r14d,%r12d
je     12cb <validate_rx_datapath+0x15b>
movzwl %r12w,%edx
lea    0x1(%rbx),%esi
lea    0xd81(%rip),%rdi
mov    0x18(%rsp),%ecx
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xd64(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
addl   $0x1,0x4(%rsp)
mov    0x8(%rsp),%r14
mov    (%rsp),%edx
mov    0x10(%rsp),%edi
jmp    11d6 <validate_rx_datapath+0x66>
nopl   0x0(%rax)
mov    %edx,(%rsp)
movzwl %r12w,%r14d
mov    %r14d,%edi
call   1090 <qtoi@plt>
xor    %edi,%edi
cmp    %ebp,%eax
jne    131a <validate_rx_datapath+0x1aa>
movzwl %r13w,%eax
shr    %eax
mov    %r12d,%ebp
xor    %eax,%r12d
test   $0x7ffc,%r12d
je     1327 <validate_rx_datapath+0x1b7>
mov    0x8(%rsp),%r14
mov    (%rsp),%edx
mov    %ebp,%r12d
jmp    11d6 <validate_rx_datapath+0x66>
mov    0x8(%rsp),%r14
mov    (%rsp),%edx
jmp    11d6 <validate_rx_datapath+0x66>
lea    0xd28(%rip),%rdi
call   1050 <puts@plt>
mov    %r14d,%edi
call   1080 <lfsr_load@plt>
mov    $0x2,%edx
mov    $0x1,%edi
mov    0x8(%rsp),%r14
mov    %ebp,%r12d
jmp    11d6 <validate_rx_datapath+0x66>
cmpl   $0x0,0x4(%rsp)
mov    0x20(%rsp),%rsi
jne    136c <validate_rx_datapath+0x1fc>
lea    0xcd8(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [9 x i8] c"Found Q\0A\00"
@.str.1 = [25 x i8] c"%6d: I_hw:\09%4x\09I_sw:\09%4x\00"
@.str.2 = [11 x i8] c" <== Error\00"
@.str.3 = [2 x i8] c"\0A\00"
@.str.4 = [25 x i8] c"%6d: Q_hw:\09%4x\09Q_sw:\09%4x\00"
@.str.5 = [25 x i8] c"\0AValidate %d samples OK\0A\00"
define zeroext i16 @validate_rx_datapath(i16* %0, i32 %1) {
%3 = alloca i16*
%4 = alloca i32
%5 = alloca i16*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i16
%13 = alloca i16
%14 = alloca i16
%15 = alloca i16
%16 = alloca i16
%17 = alloca i32
%18 = alloca i16
store i16* %0, i16** %3
store i32 %1, i32* %4
store i32 1, i32* %8
store i32 0, i32* %9
store i32 0, i32* %10
store i32 0, i32* %11
store i16 0, i16* %13
store i16 0, i16* %14
store i16 0, i16* %15
store i16 0, i16* %16
store i32 0, i32* %17
store i32 3, i32* %6
br label %19
19: ; preds = %129, %2
%20 = load i32, i32* %6
%21 = load i32, i32* %4
%22 = sub nsw i32 %21, 2
%23 = icmp slt i32 %20, %22
br i1 %23, label %24, label %133
24: ; preds = %19
%25 = load i32, i32* %8
%26 = icmp eq i32 %25, 1
br i1 %26, label %27, label %36
27: ; preds = %24
%28 = load i16, i16* %15
store i16 %28, i16* %16
%29 = load i16, i16* %14
store i16 %29, i16* %15
%30 = load i16, i16* %13
store i16 %30, i16* %14
%31 = load i16*, i16** %3
%32 = load i32, i32* %6
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds i16, i16* %31, i64 %33
%35 = load i16, i16* %34
store i16 %35, i16* %13
br label %50
36: ; preds = %24
%37 = load i16, i16* %14
store i16 %37, i16* %16
%38 = load i16, i16* %13
store i16 %38, i16* %15
%39 = load i16*, i16** %3
%40 = load i32, i32* %6
%41 = sub nsw i32 %40, 1
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds i16, i16* %39, i64 %42
%44 = load i16, i16* %43
store i16 %44, i16* %14
%45 = load i16*, i16** %3
%46 = load i32, i32* %6
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds i16, i16* %45, i64 %47
%49 = load i16, i16* %48
store i16 %49, i16* %13
br label %50
50: ; preds = %36, %27
%51 = load i32, i32* %9
%52 = icmp eq i32 %51, 0
br i1 %52, label %53, label %75
53: ; preds = %50
%54 = load i16, i16* %13
%55 = zext i16 %54 to i32
%56 = load i16, i16* %14
%57 = call i32 @qtoi(i16 zeroext %56)
%58 = icmp eq i32 %55, %57
br i1 %58, label %59, label %74
59: ; preds = %53
%60 = load i16, i16* %14
%61 = zext i16 %60 to i32
%62 = and i32 %61, 32764
%63 = load i16, i16* %16
%64 = zext i16 %63 to i32
%65 = ashr i32 %64, 1
%66 = and i32 %65, 32764
%67 = icmp eq i32 %62, %66
br i1 %67, label %68, label %74
68: ; preds = %59
store i32 2, i32* %8
%69 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%70 = load i32, i32* %9
%71 = add nsw i32 %70, 1
store i32 %71, i32* %9
%72 = load i16, i16* %14
%73 = call i32 @lfsr_load(i16 zeroext %72)
br label %74
74: ; preds = %68, %59, %53
br label %128
75: ; preds = %50
%76 = load i32, i32* %9
%77 = icmp slt i32 %76, 8
br i1 %77, label %78, label %83
78: ; preds = %75
%79 = load i16, i16* %14
%80 = call i32 @lfsr_train(i16 zeroext %79)
%81 = load i32, i32* %9
%82 = add nsw i32 %81, 1
store i32 %82, i32* %9
br label %127
83: ; preds = %75
%84 = call zeroext i16 (...) @lfsr_next()
store i16 %84, i16* %18
%85 = load i16, i16* %13
%86 = zext i16 %85 to i32
%87 = load i16, i16* %18
%88 = call i32 @qtoi(i16 zeroext %87)
%89 = icmp ne i32 %86, %88
br i1 %89, label %90, label %101
90: ; preds = %83
%91 = load i32, i32* %6
%92 = load i16, i16* %13
%93 = zext i16 %92 to i32
%94 = load i16, i16* %18
%95 = call i32 @qtoi(i16 zeroext %94)
%96 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i32 %91, i32 %93, i32 %95)
%97 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%98 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%99 = load i32, i32* %17
%100 = add nsw i32 %99, 1
store i32 %100, i32* %17
br label %101
101: ; preds = %90, %83
%102 = load i16, i16* %14
%103 = zext i16 %102 to i32
%104 = load i16, i16* %18
%105 = zext i16 %104 to i32
%106 = icmp ne i32 %103, %105
br i1 %106, label %107, label %126
107: ; preds = %101
%108 = load i32, i32* %6
%109 = add nsw i32 %108, 1
%110 = load i16, i16* %14
%111 = zext i16 %110 to i32
%112 = load i16, i16* %18
%113 = zext i16 %112 to i32
%114 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0), i32 %109, i32 %111, i32 %113)
%115 = load i16, i16* %14
%116 = zext i16 %115 to i32
%117 = load i16, i16* %18
%118 = zext i16 %117 to i32
%119 = icmp ne i32 %116, %118
br i1 %119, label %120, label %122
120: ; preds = %107
%121 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
br label %122
122: ; preds = %120, %107
%123 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%124 = load i32, i32* %17
%125 = add nsw i32 %124, 1
store i32 %125, i32* %17
br label %126
126: ; preds = %122, %101
br label %127
127: ; preds = %126, %78
br label %128
128: ; preds = %127, %74
br label %129
129: ; preds = %128
%130 = load i32, i32* %8
%131 = load i32, i32* %6
%132 = add nsw i32 %131, %130
store i32 %132, i32* %6
br label %19
133: ; preds = %19
%134 = load i32, i32* %17
%135 = icmp eq i32 %134, 0
br i1 %135, label %136, label %139
136: ; preds = %133
%137 = load i32, i32* %4
%138 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.5, i64 0, i64 0), i32 %137)
br label %139
139: ; preds = %136, %133
ret i16 0
}

LLVM IR (-O2):
@.str.1 = [25 x i8] c"%6d: I_hw:\09%4x\09I_sw:\09%4x\00"
@.str.2 = [11 x i8] c" <== Error\00"
@.str.4 = [25 x i8] c"%6d: Q_hw:\09%4x\09Q_sw:\09%4x\00"
@.str.5 = [25 x i8] c"\0AValidate %d samples OK\0A\00"
@str = [8 x i8] c"Found Q\00"
define zeroext i16 @validate_rx_datapath(i16* nocapture %0, i32 %1) {
%3 = add nsw i32 %1, -2
%4 = icmp sgt i32 %1, 5
br i1 %4, label %5, label %74
5: ; preds = %2, %66
%6 = phi i32 [ %70, %66 ], [ 3, %2 ]
%7 = phi i32 [ %69, %66 ], [ 0, %2 ]
%8 = phi i16 [ %21, %66 ], [ 0, %2 ]
%9 = phi i16 [ %20, %66 ], [ 0, %2 ]
%10 = phi i16 [ %25, %66 ], [ 0, %2 ]
%11 = phi i32 [ %68, %66 ], [ 1, %2 ]
%12 = phi i32 [ %67, %66 ], [ 0, %2 ]
%13 = icmp eq i32 %11, 1
br i1 %13, label %19, label %14
14: ; preds = %5
%15 = add nsw i32 %6, -1
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i16, i16* %0, i64 %16
%18 = load i16, i16* %17
br label %19
19: ; preds = %5, %14
%20 = phi i16 [ %18, %14 ], [ %10, %5 ]
%21 = phi i16 [ %10, %14 ], [ %9, %5 ]
%22 = phi i16 [ %9, %14 ], [ %8, %5 ]
%23 = sext i32 %6 to i64
%24 = getelementptr inbounds i16, i16* %0, i64 %23
%25 = load i16, i16* %24
%26 = icmp eq i32 %12, 0
br i1 %26, label %27, label %39
27: ; preds = %19
%28 = zext i16 %25 to i32
%29 = tail call i32 @qtoi(i16 zeroext %20)
%30 = icmp eq i32 %29, %28
br i1 %30, label %31, label %66
31: ; preds = %27
%32 = lshr i16 %22, 1
%33 = xor i16 %32, %20
%34 = and i16 %33, 32764
%35 = icmp eq i16 %34, 0
br i1 %35, label %36, label %66
36: ; preds = %31
%37 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
%38 = tail call i32 @lfsr_load(i16 zeroext %20)
br label %66
39: ; preds = %19
%40 = icmp slt i32 %12, 8
br i1 %40, label %41, label %44
41: ; preds = %39
%42 = tail call i32 @lfsr_train(i16 zeroext %20)
%43 = add nsw i32 %12, 1
br label %66
44: ; preds = %39
%45 = tail call zeroext i16 (...) @lfsr_next()
%46 = zext i16 %25 to i32
%47 = tail call i32 @qtoi(i16 zeroext %45)
%48 = icmp eq i32 %47, %46
br i1 %48, label %55, label %49
49: ; preds = %44
%50 = tail call i32 @qtoi(i16 zeroext %45)
%51 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i32 %6, i32 %46, i32 %50)
%52 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%53 = tail call i32 @putchar(i32 10)
%54 = add nsw i32 %7, 1
br label %55
55: ; preds = %49, %44
%56 = phi i32 [ %54, %49 ], [ %7, %44 ]
%57 = icmp eq i16 %20, %45
br i1 %57, label %66, label %58
58: ; preds = %55
%59 = zext i16 %45 to i32
%60 = zext i16 %20 to i32
%61 = add nsw i32 %6, 1
%62 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0), i32 %61, i32 %60, i32 %59)
%63 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%64 = tail call i32 @putchar(i32 10)
%65 = add nsw i32 %56, 1
br label %66
66: ; preds = %55, %58, %36, %31, %27, %41
%67 = phi i32 [ 1, %36 ], [ 0, %31 ], [ 0, %27 ], [ %43, %41 ], [ %12, %58 ], [ %12, %55 ]
%68 = phi i32 [ 2, %36 ], [ %11, %31 ], [ %11, %27 ], [ %11, %41 ], [ %11, %58 ], [ %11, %55 ]
%69 = phi i32 [ %7, %36 ], [ %7, %31 ], [ %7, %27 ], [ %7, %41 ], [ %65, %58 ], [ %56, %55 ]
%70 = add nsw i32 %68, %6
%71 = icmp slt i32 %70, %3
br i1 %71, label %5, label %72
72: ; preds = %66
%73 = icmp eq i32 %69, 0
br i1 %73, label %74, label %76
74: ; preds = %2, %72
%75 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.5, i64 0, i64 0), i32 %1)
br label %76
76: ; preds = %74, %72
ret i16 0
}