int main() {
  char ch[2][5] = {"6937", "8254"}, *p[2];
  int i, j, s = 0;
  for (i = 0; i < 2; i++)
    p[i] = ch[i];
  for (i = 0; i < 2; i++)
    for (j = 0; p[i][j] > '\0' && p[i][j] <= '9'; j += 2) {
      s = 10 * s + p[i][j] - '0';
      printf("First: %d, Second %d\n", s, p[i][j]);
    }
  printf("Finally: %d\n", s);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeda(%rip),%rax
mov    %rax,-0xe(%rbp)
mov    0xed7(%rip),%ax
mov    %ax,-0x6(%rbp)
movl   $0x0,-0x2c(%rbp)
movl   $0x0,-0x24(%rbp)
cmpl   $0x2,-0x24(%rbp)
jge    1173 <main+0x63>
movslq -0x24(%rbp),%rax
lea    -0xe(%rbp),%rcx
imul   $0x5,%rax,%rax
add    %rax,%rcx
movslq -0x24(%rbp),%rax
mov    %rcx,-0x20(%rbp,%rax,8)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1143 <main+0x33>
movl   $0x0,-0x24(%rbp)
cmpl   $0x2,-0x24(%rbp)
jge    1234 <main+0x124>
movl   $0x0,-0x28(%rbp)
movslq -0x24(%rbp),%rax
mov    -0x20(%rbp,%rax,8),%rax
movslq -0x28(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x2d(%rbp)
jle    11c4 <main+0xb4>
movslq -0x24(%rbp),%rax
mov    -0x20(%rbp,%rax,8),%rax
movslq -0x28(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x39,%eax
setle  %al
mov    %al,-0x2d(%rbp)
mov    -0x2d(%rbp),%al
test   $0x1,%al
jne    11d4 <main+0xc4>
jmp    1221 <main+0x111>
imul   $0xa,-0x2c(%rbp),%eax
movslq -0x24(%rbp),%rcx
mov    -0x20(%rbp,%rcx,8),%rcx
movslq -0x28(%rbp),%rdx
movsbl (%rcx,%rdx,1),%ecx
add    %ecx,%eax
sub    $0x30,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%esi
movslq -0x24(%rbp),%rax
mov    -0x20(%rbp,%rax,8),%rax
movslq -0x28(%rbp),%rcx
movsbl (%rax,%rcx,1),%edx
lea    0xdfe(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x28(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x28(%rbp)
jmp    118b <main+0x7b>
jmp    1226 <main+0x116>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    117a <main+0x6a>
mov    -0x2c(%rbp),%esi
lea    0xde2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
mov    $0x6,%esi
mov    $0x36,%edx
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x3f,%esi
mov    $0x33,%edx
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x27e,%esi
mov    $0x38,%edx
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x18f1,%esi
mov    $0x35,%edx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xea7(%rip),%rdi
mov    $0x18f1,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.ch = [2 x [5 x i8]] [[5 x i8] c"6937\00", [5 x i8] c"8254\00"]
@.str = [22 x i8] c"First: %d, Second %d\0A\00"
@.str.1 = [13 x i8] c"Finally: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [2 x [5 x i8]]
%3 = alloca [2 x i8*]
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
%7 = bitcast [2 x [5 x i8]]* %2 to i8*
store i32 0, i32* %6
store i32 0, i32* %4
br label %8
8: ; preds = %19, %0
%9 = load i32, i32* %4
%10 = icmp slt i32 %9, 2
br i1 %10, label %11, label %22
11: ; preds = %8
%12 = load i32, i32* %4
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds [2 x [5 x i8]], [2 x [5 x i8]]* %2, i64 0, i64 %13
%15 = getelementptr inbounds [5 x i8], [5 x i8]* %14, i64 0, i64 0
%16 = load i32, i32* %4
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds [2 x i8*], [2 x i8*]* %3, i64 0, i64 %17
store i8* %15, i8** %18
br label %19
19: ; preds = %11
%20 = load i32, i32* %4
%21 = add nsw i32 %20, 1
store i32 %21, i32* %4
br label %8
22: ; preds = %8
store i32 0, i32* %4
br label %23
23: ; preds = %80, %22
%24 = load i32, i32* %4
%25 = icmp slt i32 %24, 2
br i1 %25, label %26, label %83
26: ; preds = %23
store i32 0, i32* %5
br label %27
27: ; preds = %76, %26
%28 = load i32, i32* %4
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds [2 x i8*], [2 x i8*]* %3, i64 0, i64 %29
%31 = load i8*, i8** %30
%32 = load i32, i32* %5
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds i8, i8* %31, i64 %33
%35 = load i8, i8* %34
%36 = sext i8 %35 to i32
%37 = icmp sgt i32 %36, 0
br i1 %37, label %38, label %49
38: ; preds = %27
%39 = load i32, i32* %4
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds [2 x i8*], [2 x i8*]* %3, i64 0, i64 %40
%42 = load i8*, i8** %41
%43 = load i32, i32* %5
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds i8, i8* %42, i64 %44
%46 = load i8, i8* %45
%47 = sext i8 %46 to i32
%48 = icmp sle i32 %47, 57
br label %49
49: ; preds = %38, %27
%50 = phi i1 [ false, %27 ], [ %48, %38 ]
br i1 %50, label %51, label %79
51: ; preds = %49
%52 = load i32, i32* %6
%53 = mul nsw i32 10, %52
%54 = load i32, i32* %4
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds [2 x i8*], [2 x i8*]* %3, i64 0, i64 %55
%57 = load i8*, i8** %56
%58 = load i32, i32* %5
%59 = sext i32 %58 to i64
%60 = getelementptr inbounds i8, i8* %57, i64 %59
%61 = load i8, i8* %60
%62 = sext i8 %61 to i32
%63 = add nsw i32 %53, %62
%64 = sub nsw i32 %63, 48
store i32 %64, i32* %6
%65 = load i32, i32* %6
%66 = load i32, i32* %4
%67 = sext i32 %66 to i64
%68 = getelementptr inbounds [2 x i8*], [2 x i8*]* %3, i64 0, i64 %67
%69 = load i8*, i8** %68
%70 = load i32, i32* %5
%71 = sext i32 %70 to i64
%72 = getelementptr inbounds i8, i8* %69, i64 %71
%73 = load i8, i8* %72
%74 = sext i8 %73 to i32
%75 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %65, i32 %74)
br label %76
76: ; preds = %51
%77 = load i32, i32* %5
%78 = add nsw i32 %77, 2
store i32 %78, i32* %5
br label %27
79: ; preds = %49
br label %80
80: ; preds = %79
%81 = load i32, i32* %4
%82 = add nsw i32 %81, 1
store i32 %82, i32* %4
br label %23
83: ; preds = %23
%84 = load i32, i32* %6
%85 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 %84)
ret i32 0
}

LLVM IR (-O2):
@.str = [22 x i8] c"First: %d, Second %d\0A\00"
@.str.1 = [13 x i8] c"Finally: %d\0A\00"
define i32 @main() {
%1 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 6, i32 54)
%2 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 63, i32 51)
%3 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 638, i32 56)
%4 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 6385, i32 53)
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 6385)
ret i32 0
}