#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*/ printf(char *, int, ...);
int main() {
  int a;
  int b;
  int c;
  a = 1, b = 2;
  printf("%d, %d\n", a, b);
  a = 42, b = 24, c = 12;
  printf("%d, %d, %d\n", a, b, c);
  int x, y, z;
  x = 3, y = 4, z = 5;
  printf("%d, %d, %d\n", x, y, z);
  int d = 6, e = 7, f = 8, g = 9;
  printf("%d, %d, %d, %d\n", d, e, f, g);
  int h;
  h = a, b;
  printf("%d\n", h);
  h = (a, b);
  printf("%d\n", h);
  for (int i = 0, j = 5; i < j; i++, j--) {
    printf("%d, %d\n", i, j);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xece(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x2a,-0x8(%rbp)
movl   $0x18,-0xc(%rbp)
movl   $0xc,-0x10(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
lea    0xe9e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x3,-0x14(%rbp)
movl   $0x4,-0x18(%rbp)
movl   $0x5,-0x1c(%rbp)
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    -0x1c(%rbp),%ecx
lea    0xe72(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x6,-0x20(%rbp)
movl   $0x7,-0x24(%rbp)
movl   $0x8,-0x28(%rbp)
movl   $0x9,-0x2c(%rbp)
mov    -0x20(%rbp),%esi
mov    -0x24(%rbp),%edx
mov    -0x28(%rbp),%ecx
mov    -0x2c(%rbp),%r8d
lea    0xe37(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    -0x30(%rbp),%esi
lea    0xe2c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    -0x30(%rbp),%esi
lea    0xe15(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x34(%rbp)
movl   $0x5,-0x38(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x38(%rbp),%eax
jge    1243 <main+0x133>
mov    -0x34(%rbp),%esi
mov    -0x38(%rbp),%edx
lea    0xde3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
mov    -0x38(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x38(%rbp)
jmp    120c <main+0xfc>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
lea    0xeea(%rip),%r15
mov    $0x1,%ebx
mov    %r15,%rdi
mov    $0x1,%esi
mov    $0x2,%edx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xec6(%rip),%r14
mov    %r14,%rdi
mov    $0x2a,%esi
mov    $0x18,%edx
mov    $0xc,%ecx
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x5,%ebp
mov    %r14,%rdi
mov    $0x3,%esi
mov    $0x4,%edx
mov    $0x5,%ecx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe84(%rip),%rdi
mov    $0x6,%esi
mov    $0x7,%edx
mov    $0x8,%ecx
mov    $0x9,%r8d
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe6d(%rip),%r14
mov    %r14,%rdi
mov    $0x2a,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %r14,%rdi
mov    $0x18,%esi
xor    %eax,%eax
call   1030 <printf@plt>
nopl   (%rax)
lea    -0x1(%rbx),%esi
mov    %r15,%rdi
mov    %ebp,%edx
xor    %eax,%eax
call   1030 <printf@plt>
add    $0xffffffff,%ebp
lea    0x1(%rbx),%eax
cmp    %ebp,%ebx
mov    %eax,%ebx
jl     11c0 <main+0xb0>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [8 x i8] c"%d, %d\0A\00"
@.str.1 = [12 x i8] c"%d, %d, %d\0A\00"
@.str.2 = [16 x i8] c"%d, %d, %d, %d\0A\00"
@.str.3 = [4 x i8] c"%d\0A\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
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
store i32 2, i32* %3
%15 = load i32, i32* %2
%16 = load i32, i32* %3
%17 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %15, i32 %16)
store i32 42, i32* %2
store i32 24, i32* %3
store i32 12, i32* %4
%18 = load i32, i32* %2
%19 = load i32, i32* %3
%20 = load i32, i32* %4
%21 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %18, i32 %19, i32 %20)
store i32 3, i32* %5
store i32 4, i32* %6
store i32 5, i32* %7
%22 = load i32, i32* %5
%23 = load i32, i32* %6
%24 = load i32, i32* %7
%25 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %22, i32 %23, i32 %24)
store i32 6, i32* %8
store i32 7, i32* %9
store i32 8, i32* %10
store i32 9, i32* %11
%26 = load i32, i32* %8
%27 = load i32, i32* %9
%28 = load i32, i32* %10
%29 = load i32, i32* %11
%30 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 %26, i32 %27, i32 %28, i32 %29)
%31 = load i32, i32* %2
store i32 %31, i32* %12
%32 = load i32, i32* %3
%33 = load i32, i32* %12
%34 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %33)
%35 = load i32, i32* %2
%36 = load i32, i32* %3
store i32 %36, i32* %12
%37 = load i32, i32* %12
%38 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %37)
store i32 0, i32* %13
store i32 5, i32* %14
br label %39
39: ; preds = %47, %0
%40 = load i32, i32* %13
%41 = load i32, i32* %14
%42 = icmp slt i32 %40, %41
br i1 %42, label %43, label %52
43: ; preds = %39
%44 = load i32, i32* %13
%45 = load i32, i32* %14
%46 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %44, i32 %45)
br label %47
47: ; preds = %43
%48 = load i32, i32* %13
%49 = add nsw i32 %48, 1
store i32 %49, i32* %13
%50 = load i32, i32* %14
%51 = add nsw i32 %50, -1
store i32 %51, i32* %14
br label %39
52: ; preds = %39
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"%d, %d\0A\00"
@.str.1 = [12 x i8] c"%d, %d, %d\0A\00"
@.str.2 = [16 x i8] c"%d, %d, %d, %d\0A\00"
@.str.3 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 1, i32 2)
%2 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 42, i32 24, i32 12)
%3 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 3, i32 4, i32 5)
%4 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 6, i32 7, i32 8, i32 9)
%5 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 42)
%6 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 24)
br label %8
7: ; preds = %8
ret i32 0
8: ; preds = %0, %8
%9 = phi i32 [ 5, %0 ], [ %13, %8 ]
%10 = phi i32 [ 0, %0 ], [ %12, %8 ]
%11 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %10, i32 %9)
%12 = add nuw nsw i32 %10, 1
%13 = add nsw i32 %9, -1
%14 = icmp slt i32 %12, %13
br i1 %14, label %8, label %7
}