#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 getInt();
int *getPtr();
void testBOComma() {
  int x0 = (getInt(), 0);
  int x1 = (getInt(), getInt());
  int x2 = (getInt(), getInt(), getInt());
  int x3;
  x3 = (getInt(), getInt(), 0);
  int x4 = (getInt(), (getInt(), 0));
  int y;
  int x5 = (getInt(), (y = 0));
  int x6 = (getInt(), (y = getInt()));
  int x7 = 0, x8 = getInt();
  int x9 = getInt(), x10 = 0;
  int m = getInt(), mm, mmm;
  int n, nn = getInt();
  int *p;
  p = (getPtr(), (int *)0);
}


x86 assembly (clang, -O0):
<testBOComma>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    $0x0,%al
call   1030 <getInt@plt>
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <getInt@plt>
mov    $0x0,%al
call   1030 <getInt@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <getInt@plt>
mov    $0x0,%al
call   1030 <getInt@plt>
mov    $0x0,%al
call   1030 <getInt@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <getInt@plt>
mov    $0x0,%al
call   1030 <getInt@plt>
movl   $0x0,-0x10(%rbp)
mov    $0x0,%al
call   1030 <getInt@plt>
mov    $0x0,%al
call   1030 <getInt@plt>
movl   $0x0,-0x14(%rbp)
mov    $0x0,%al
call   1030 <getInt@plt>
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    $0x0,%al
call   1030 <getInt@plt>
mov    $0x0,%al
call   1030 <getInt@plt>
mov    %eax,-0x18(%rbp)
mov    %eax,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
mov    $0x0,%al
call   1030 <getInt@plt>
mov    %eax,-0x28(%rbp)
mov    $0x0,%al
call   1030 <getInt@plt>
mov    %eax,-0x2c(%rbp)
movl   $0x0,-0x30(%rbp)
mov    $0x0,%al
call   1030 <getInt@plt>
mov    %eax,-0x34(%rbp)
mov    $0x0,%al
call   1030 <getInt@plt>
mov    %eax,-0x44(%rbp)
mov    $0x0,%al
call   1040 <getPtr@plt>
movq   $0x0,-0x50(%rbp)
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testBOComma>:
push   %rax
xor    %eax,%eax
call   1030 <getInt@plt>
xor    %eax,%eax
call   1030 <getInt@plt>
xor    %eax,%eax
call   1030 <getInt@plt>
xor    %eax,%eax
call   1030 <getInt@plt>
xor    %eax,%eax
call   1030 <getInt@plt>
xor    %eax,%eax
call   1030 <getInt@plt>
xor    %eax,%eax
call   1030 <getInt@plt>
xor    %eax,%eax
call   1030 <getInt@plt>
xor    %eax,%eax
call   1030 <getInt@plt>
xor    %eax,%eax
call   1030 <getInt@plt>
xor    %eax,%eax
call   1030 <getInt@plt>
xor    %eax,%eax
call   1030 <getInt@plt>
xor    %eax,%eax
call   1030 <getInt@plt>
xor    %eax,%eax
call   1030 <getInt@plt>
xor    %eax,%eax
call   1030 <getInt@plt>
xor    %eax,%eax
call   1030 <getInt@plt>
xor    %eax,%eax
call   1030 <getInt@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <getPtr@plt>

LLVM IR (-O0):
define void @testBOComma() {
%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
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32*
%19 = call i32 (...) @getInt()
store i32 0, i32* %1
%20 = call i32 (...) @getInt()
%21 = call i32 (...) @getInt()
store i32 %21, i32* %2
%22 = call i32 (...) @getInt()
%23 = call i32 (...) @getInt()
%24 = call i32 (...) @getInt()
store i32 %24, i32* %3
%25 = call i32 (...) @getInt()
%26 = call i32 (...) @getInt()
store i32 0, i32* %4
%27 = call i32 (...) @getInt()
%28 = call i32 (...) @getInt()
store i32 0, i32* %5
%29 = call i32 (...) @getInt()
store i32 0, i32* %6
store i32 0, i32* %7
%30 = call i32 (...) @getInt()
%31 = call i32 (...) @getInt()
store i32 %31, i32* %6
store i32 %31, i32* %8
store i32 0, i32* %9
%32 = call i32 (...) @getInt()
store i32 %32, i32* %10
%33 = call i32 (...) @getInt()
store i32 %33, i32* %11
store i32 0, i32* %12
%34 = call i32 (...) @getInt()
store i32 %34, i32* %13
%35 = call i32 (...) @getInt()
store i32 %35, i32* %17
%36 = call i32* (...) @getPtr()
store i32* null, i32** %18
ret void
}

LLVM IR (-O2):
define void @testBOComma() {
%1 = tail call i32 (...) @getInt()
%2 = tail call i32 (...) @getInt()
%3 = tail call i32 (...) @getInt()
%4 = tail call i32 (...) @getInt()
%5 = tail call i32 (...) @getInt()
%6 = tail call i32 (...) @getInt()
%7 = tail call i32 (...) @getInt()
%8 = tail call i32 (...) @getInt()
%9 = tail call i32 (...) @getInt()
%10 = tail call i32 (...) @getInt()
%11 = tail call i32 (...) @getInt()
%12 = tail call i32 (...) @getInt()
%13 = tail call i32 (...) @getInt()
%14 = tail call i32 (...) @getInt()
%15 = tail call i32 (...) @getInt()
%16 = tail call i32 (...) @getInt()
%17 = tail call i32 (...) @getInt()
%18 = tail call i32* (...) @getPtr()
ret void
}