#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*/ clang_analyzer_warnIfReached();
void multiple_exit_test() {
  int x = 0;
  int i = 0;
  while (i < 50) {
    if (x) {
      i = 10;
      break;
    }
    ++i;
  }
  if (i == 50)
    clang_analyzer_warnIfReached();
  if (i == 10)
    clang_analyzer_warnIfReached();
  if (i < 10)
    clang_analyzer_warnIfReached();
  if (i > 10 && i < 50)
    clang_analyzer_warnIfReached();
}


x86 assembly (clang, -O0):
<multiple_exit_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x32,-0x8(%rbp)
jge    1154 <multiple_exit_test+0x44>
cmpl   $0x0,-0x4(%rbp)
je     1146 <multiple_exit_test+0x36>
movl   $0xa,-0x8(%rbp)
jmp    1154 <multiple_exit_test+0x44>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <multiple_exit_test+0x16>
cmpl   $0x32,-0x8(%rbp)
jne    1165 <multiple_exit_test+0x55>
mov    $0x0,%al
call   1030 <clang_analyzer_warnIfReached@plt>
cmpl   $0xa,-0x8(%rbp)
jne    1176 <multiple_exit_test+0x66>
mov    $0x0,%al
call   1030 <clang_analyzer_warnIfReached@plt>
cmpl   $0xa,-0x8(%rbp)
jge    1187 <multiple_exit_test+0x77>
mov    $0x0,%al
call   1030 <clang_analyzer_warnIfReached@plt>
cmpl   $0xa,-0x8(%rbp)
jle    11a2 <multiple_exit_test+0x92>
cmpl   $0x32,-0x8(%rbp)
jge    11a2 <multiple_exit_test+0x92>
mov    $0x0,%al
call   1030 <clang_analyzer_warnIfReached@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<multiple_exit_test>:
xor    %eax,%eax
jmp    1030 <clang_analyzer_warnIfReached@plt>

LLVM IR (-O0):
define void @multiple_exit_test() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %10, %0
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 50
br i1 %5, label %6, label %13
6: ; preds = %3
%7 = load i32, i32* %1
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %6
store i32 10, i32* %2
br label %13
10: ; preds = %6
%11 = load i32, i32* %2
%12 = add nsw i32 %11, 1
store i32 %12, i32* %2
br label %3
13: ; preds = %9, %3
%14 = load i32, i32* %2
%15 = icmp eq i32 %14, 50
br i1 %15, label %16, label %18
16: ; preds = %13
%17 = call i32 (...) @clang_analyzer_warnIfReached()
br label %18
18: ; preds = %16, %13
%19 = load i32, i32* %2
%20 = icmp eq i32 %19, 10
br i1 %20, label %21, label %23
21: ; preds = %18
%22 = call i32 (...) @clang_analyzer_warnIfReached()
br label %23
23: ; preds = %21, %18
%24 = load i32, i32* %2
%25 = icmp slt i32 %24, 10
br i1 %25, label %26, label %28
26: ; preds = %23
%27 = call i32 (...) @clang_analyzer_warnIfReached()
br label %28
28: ; preds = %26, %23
%29 = load i32, i32* %2
%30 = icmp sgt i32 %29, 10
br i1 %30, label %31, label %36
31: ; preds = %28
%32 = load i32, i32* %2
%33 = icmp slt i32 %32, 50
br i1 %33, label %34, label %36
34: ; preds = %31
%35 = call i32 (...) @clang_analyzer_warnIfReached()
br label %36
36: ; preds = %34, %31, %28
ret void
}

LLVM IR (-O2):
define void @multiple_exit_test() {
%1 = tail call i32 (...) @clang_analyzer_warnIfReached()
ret void
}