#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_eval(int /*<<< orphan*/);
int /*<<< orphan*/ isalnum(int);
scalar_t__ isascii(int);
int /*<<< orphan*/ isblank(int);
scalar_t__ isdigit(int);
int /*<<< orphan*/ isgraph(int);
int /*<<< orphan*/ isprint(int);
void test_mixed_branches(int x) {
  if (isdigit(x)) {
    clang_analyzer_eval(isgraph(x));
    clang_analyzer_eval(isblank(x));
  } else if (isascii(x)) {
    clang_analyzer_eval(isalnum(x));
    clang_analyzer_eval(isprint(x));
  }
}


x86 assembly (clang, -O0):
<test_mixed_branches>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     11b0 <test_mixed_branches+0x40>
mov    -0x4(%rbp),%edi
call   1090 <isgraph@plt>
mov    %eax,%edi
call   1080 <clang_analyzer_eval@plt>
mov    -0x4(%rbp),%edi
call   1050 <isblank@plt>
mov    %eax,%edi
call   1080 <clang_analyzer_eval@plt>
jmp    11e5 <test_mixed_branches+0x75>
mov    -0x4(%rbp),%edi
call   1070 <isascii@plt>
cmp    $0x0,%rax
je     11e0 <test_mixed_branches+0x70>
mov    -0x4(%rbp),%edi
call   1040 <isalnum@plt>
mov    %eax,%edi
call   1080 <clang_analyzer_eval@plt>
mov    -0x4(%rbp),%edi
call   1060 <isprint@plt>
mov    %eax,%edi
call   1080 <clang_analyzer_eval@plt>
jmp    11e5 <test_mixed_branches+0x75>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_mixed_branches>:
push   %rbx
mov    %edi,%ebx
call   1030 <isdigit@plt>
mov    %ebx,%edi
test   %rax,%rax
je     1194 <test_mixed_branches+0x24>
call   1090 <isgraph@plt>
mov    %eax,%edi
call   1080 <clang_analyzer_eval@plt>
mov    %ebx,%edi
call   1050 <isblank@plt>
jmp    11b3 <test_mixed_branches+0x43>
call   1070 <isascii@plt>
test   %rax,%rax
je     11bb <test_mixed_branches+0x4b>
mov    %ebx,%edi
call   1040 <isalnum@plt>
mov    %eax,%edi
call   1080 <clang_analyzer_eval@plt>
mov    %ebx,%edi
call   1060 <isprint@plt>
mov    %eax,%edi
pop    %rbx
jmp    1080 <clang_analyzer_eval@plt>
pop    %rbx
ret

LLVM IR (-O0):
define void @test_mixed_branches(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @isdigit(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %13
6: ; preds = %1
%7 = load i32, i32* %2
%8 = call i32 @isgraph(i32 %7)
%9 = call i32 @clang_analyzer_eval(i32 %8)
%10 = load i32, i32* %2
%11 = call i32 @isblank(i32 %10)
%12 = call i32 @clang_analyzer_eval(i32 %11)
br label %25
13: ; preds = %1
%14 = load i32, i32* %2
%15 = call i64 @isascii(i32 %14)
%16 = icmp ne i64 %15, 0
br i1 %16, label %17, label %24
17: ; preds = %13
%18 = load i32, i32* %2
%19 = call i32 @isalnum(i32 %18)
%20 = call i32 @clang_analyzer_eval(i32 %19)
%21 = load i32, i32* %2
%22 = call i32 @isprint(i32 %21)
%23 = call i32 @clang_analyzer_eval(i32 %22)
br label %24
24: ; preds = %17, %13
br label %25
25: ; preds = %24, %6
ret void
}

LLVM IR (-O2):
define void @test_mixed_branches(i32 %0) {
%2 = tail call i64 @isdigit(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i32 @isgraph(i32 %0)
%6 = tail call i32 @clang_analyzer_eval(i32 %5)
%7 = tail call i32 @isblank(i32 %0)
br label %15
8: ; preds = %1
%9 = tail call i64 @isascii(i32 %0)
%10 = icmp eq i64 %9, 0
br i1 %10, label %18, label %11
11: ; preds = %8
%12 = tail call i32 @isalnum(i32 %0)
%13 = tail call i32 @clang_analyzer_eval(i32 %12)
%14 = tail call i32 @isprint(i32 %0)
br label %15
15: ; preds = %4, %11
%16 = phi i32 [ %14, %11 ], [ %7, %4 ]
%17 = tail call i32 @clang_analyzer_eval(i32 %16)
br label %18
18: ; preds = %15, %8
ret void
}