#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*/ getchar();
int /*<<< orphan*/ printf(char *, ...);
main() {
  int i, j, k;
  int ia = 5, ib = 10, iaib = 0;
  i = 3;
  j = 7;
  k = ((i++) > (j++) ? (i++) : (j++));
  printf("i=%d, j=%d, k=%d\n", i, j, k);
  printf("square=%d, %d, %d\n", ia * ia, ia + 1 * ia + 1, ia + 2 * ia + 2);
  printf("max(ia, ib)"
         " = %d\n",
         ((ia) > (ib) ? (ia) : (ib)));
  printf("%d", iaib);
  printf("\nPress any key to end...");
  getchar();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x14(%rbp)
movl   $0xa,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x3,-0x8(%rbp)
movl   $0x7,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x8(%rbp)
mov    -0xc(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0xc(%rbp)
cmp    %ecx,%eax
jle    1183 <main+0x63>
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x8(%rbp)
mov    %eax,-0x20(%rbp)
jmp    1191 <main+0x71>
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0xc(%rbp)
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
lea    0xe59(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%esi
imul   -0x14(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x14(%rbp),%eax
shl    $0x0,%eax
add    %eax,%edx
add    $0x1,%edx
mov    -0x14(%rbp),%ecx
mov    -0x14(%rbp),%eax
shl    $0x1,%eax
add    %eax,%ecx
add    $0x2,%ecx
lea    0xe3a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jle    11f6 <main+0xd6>
mov    -0x14(%rbp),%eax
mov    %eax,-0x24(%rbp)
jmp    11fc <main+0xdc>
mov    -0x18(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%esi
lea    0xe1f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x1c(%rbp),%esi
lea    0xe20(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe15(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
mov    $0x4,%esi
mov    $0x9,%edx
mov    $0x8,%ecx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xecd(%rip),%rdi
mov    $0x19,%esi
mov    $0xb,%edx
mov    $0x11,%ecx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xec3(%rip),%rdi
mov    $0xa,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xec2(%rip),%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeb5(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"i=%d, j=%d, k=%d\0A\00"
@.str.1 = [19 x i8] c"square=%d, %d, %d\0A\00"
@.str.2 = [18 x i8] c"max(ia, ib) = %d\0A\00"
@.str.3 = [3 x i8] c"%d\00"
@.str.4 = [25 x i8] c"\0APress any key to end...\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %1
store i32 5, i32* %5
store i32 10, i32* %6
store i32 0, i32* %7
store i32 3, i32* %2
store i32 7, i32* %3
%8 = load i32, i32* %2
%9 = add nsw i32 %8, 1
store i32 %9, i32* %2
%10 = load i32, i32* %3
%11 = add nsw i32 %10, 1
store i32 %11, i32* %3
%12 = icmp sgt i32 %8, %10
br i1 %12, label %13, label %16
13: ; preds = %0
%14 = load i32, i32* %2
%15 = add nsw i32 %14, 1
store i32 %15, i32* %2
br label %19
16: ; preds = %0
%17 = load i32, i32* %3
%18 = add nsw i32 %17, 1
store i32 %18, i32* %3
br label %19
19: ; preds = %16, %13
%20 = phi i32 [ %14, %13 ], [ %17, %16 ]
store i32 %20, i32* %4
%21 = load i32, i32* %2
%22 = load i32, i32* %3
%23 = load i32, i32* %4
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %21, i32 %22, i32 %23)
%25 = load i32, i32* %5
%26 = load i32, i32* %5
%27 = mul nsw i32 %25, %26
%28 = load i32, i32* %5
%29 = load i32, i32* %5
%30 = mul nsw i32 1, %29
%31 = add nsw i32 %28, %30
%32 = add nsw i32 %31, 1
%33 = load i32, i32* %5
%34 = load i32, i32* %5
%35 = mul nsw i32 2, %34
%36 = add nsw i32 %33, %35
%37 = add nsw i32 %36, 2
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %27, i32 %32, i32 %37)
%39 = load i32, i32* %5
%40 = load i32, i32* %6
%41 = icmp sgt i32 %39, %40
br i1 %41, label %42, label %44
42: ; preds = %19
%43 = load i32, i32* %5
br label %46
44: ; preds = %19
%45 = load i32, i32* %6
br label %46
46: ; preds = %44, %42
%47 = phi i32 [ %43, %42 ], [ %45, %44 ]
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 %47)
%49 = load i32, i32* %7
%50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32 %49)
%51 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0))
%52 = call i32 (...) @getchar()
%53 = load i32, i32* %1
ret i32 %53
}

LLVM IR (-O2):
@.str = [18 x i8] c"i=%d, j=%d, k=%d\0A\00"
@.str.1 = [19 x i8] c"square=%d, %d, %d\0A\00"
@.str.2 = [18 x i8] c"max(ia, ib) = %d\0A\00"
@.str.3 = [3 x i8] c"%d\00"
@.str.4 = [25 x i8] c"\0APress any key to end...\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 4, i32 9, i32 8)
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 25, i32 11, i32 17)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 10)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32 0)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0))
%6 = tail call i32 (...) @getchar()
ret i32 0
}