#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*/ print(char *);
int /*<<< orphan*/ printid(int);
int main() {
  int i = 0, j = 9;
  do {
    i++;
  } while (i != 10);
  print("i  10");
  printid(i);
  do
    j++;
  while (i != 10);
  print("j  10");
  printid(j);
  i = 8;
  j = 0;
  do {
    j++;
    i--;
    if (i % 2 == 0)
      continue;
    j++;
    if (i == 1)
      break;
  } while (i != 10);
  print("j  11");
  printid(j);
  print("i  1");
  printid(i);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x9,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jne    113d <main+0x1d>
lea    0xea9(%rip),%rdi
call   1030 <print@plt>
mov    -0x8(%rbp),%edi
call   1040 <printid@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0xa,-0x8(%rbp)
jne    1164 <main+0x44>
lea    0xe88(%rip),%rdi
call   1030 <print@plt>
mov    -0xc(%rbp),%edi
call   1040 <printid@plt>
movl   $0x8,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11c4 <main+0xa4>
jmp    11e1 <main+0xc1>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    11dc <main+0xbc>
jmp    11eb <main+0xcb>
jmp    11e1 <main+0xc1>
cmpl   $0xa,-0x8(%rbp)
jne    1199 <main+0x79>
lea    0xe1a(%rip),%rdi
call   1030 <print@plt>
mov    -0xc(%rbp),%edi
call   1040 <printid@plt>
lea    0xe0c(%rip),%rdi
call   1030 <print@plt>
mov    -0x8(%rbp),%edi
call   1040 <printid@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
lea    0xed6(%rip),%rdi
call   1030 <print@plt>
mov    $0xa,%edi
call   1040 <printid@plt>
lea    0xec6(%rip),%rdi
call   1030 <print@plt>
mov    $0xa,%edi
call   1040 <printid@plt>
xor    %ebx,%ebx
mov    $0x8,%eax
jmp    116b <main+0x4b>
nopl   0x0(%rax,%rax,1)
add    $0x1,%ebx
cmp    $0xb,%eax
je     1183 <main+0x63>
add    $0xffffffff,%eax
lea    -0x1(%rax),%ebp
test   $0x1,%bpl
je     1160 <main+0x40>
add    $0x2,%ebx
cmp    $0x2,%eax
je     1188 <main+0x68>
cmp    $0xb,%eax
jne    1168 <main+0x48>
jmp    1188 <main+0x68>
mov    $0xa,%ebp
lea    0xe7d(%rip),%rdi
call   1030 <print@plt>
mov    %ebx,%edi
call   1040 <printid@plt>
lea    0xe70(%rip),%rdi
call   1030 <print@plt>
mov    %ebp,%edi
call   1040 <printid@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [6 x i8] c"i 10\00"
@.str.1 = [6 x i8] c"j 10\00"
@.str.2 = [6 x i8] c"j 11\00"
@.str.3 = [5 x i8] c"i 1\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
store i32 9, i32* %3
br label %4
4: ; preds = %7, %0
%5 = load i32, i32* %2
%6 = add nsw i32 %5, 1
store i32 %6, i32* %2
br label %7
7: ; preds = %4
%8 = load i32, i32* %2
%9 = icmp ne i32 %8, 10
br i1 %9, label %4, label %10
10: ; preds = %7
%11 = call i32 @print(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%12 = load i32, i32* %2
%13 = call i32 @printid(i32 %12)
br label %14
14: ; preds = %17, %10
%15 = load i32, i32* %3
%16 = add nsw i32 %15, 1
store i32 %16, i32* %3
br label %17
17: ; preds = %14
%18 = load i32, i32* %2
%19 = icmp ne i32 %18, 10
br i1 %19, label %14, label %20
20: ; preds = %17
%21 = call i32 @print(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%22 = load i32, i32* %3
%23 = call i32 @printid(i32 %22)
store i32 8, i32* %2
store i32 0, i32* %3
br label %24
24: ; preds = %40, %20
%25 = load i32, i32* %3
%26 = add nsw i32 %25, 1
store i32 %26, i32* %3
%27 = load i32, i32* %2
%28 = add nsw i32 %27, -1
store i32 %28, i32* %2
%29 = load i32, i32* %2
%30 = srem i32 %29, 2
%31 = icmp eq i32 %30, 0
br i1 %31, label %32, label %33
32: ; preds = %24
br label %40
33: ; preds = %24
%34 = load i32, i32* %3
%35 = add nsw i32 %34, 1
store i32 %35, i32* %3
%36 = load i32, i32* %2
%37 = icmp eq i32 %36, 1
br i1 %37, label %38, label %39
38: ; preds = %33
br label %43
39: ; preds = %33
br label %40
40: ; preds = %39, %32
%41 = load i32, i32* %2
%42 = icmp ne i32 %41, 10
br i1 %42, label %24, label %43
43: ; preds = %40, %38
%44 = call i32 @print(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%45 = load i32, i32* %3
%46 = call i32 @printid(i32 %45)
%47 = call i32 @print(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%48 = load i32, i32* %2
%49 = call i32 @printid(i32 %48)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"i 10\00"
@.str.1 = [6 x i8] c"j 10\00"
@.str.2 = [6 x i8] c"j 11\00"
@.str.3 = [5 x i8] c"i 1\00"
define i32 @main() {
%1 = tail call i32 @print(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printid(i32 10)
%3 = tail call i32 @print(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @printid(i32 10)
br label %5
5: ; preds = %16, %0
%6 = phi i32 [ 8, %0 ], [ %9, %16 ]
%7 = phi i32 [ 0, %0 ], [ %17, %16 ]
%8 = add nsw i32 %7, 1
%9 = add nsw i32 %6, -1
%10 = and i32 %9, 1
%11 = icmp eq i32 %10, 0
br i1 %11, label %14, label %12
12: ; preds = %5
%13 = add nsw i32 %7, 2
switch i32 %6, label %16 [
i32 11, label %18
i32 2, label %18
]
14: ; preds = %5
%15 = icmp eq i32 %9, 10
br i1 %15, label %18, label %16
16: ; preds = %14, %12
%17 = phi i32 [ %8, %14 ], [ %13, %12 ]
br label %5
18: ; preds = %12, %12, %14
%19 = phi i32 [ %9, %12 ], [ %9, %12 ], [ 10, %14 ]
%20 = phi i32 [ %13, %12 ], [ %13, %12 ], [ %8, %14 ]
%21 = tail call i32 @print(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%22 = tail call i32 @printid(i32 %20)
%23 = tail call i32 @print(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%24 = tail call i32 @printid(i32 %19)
ret i32 0
}