#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 */
scalar_t__ isnumber(int);
int /*<<< orphan*/ printf(char *, int, int);
int main(void) {
  int c = 9, cc = '9';
  if (isnumber(c)) {
    printf("c is a digit (%d/%c)\n", c, c);
  } else {
    printf("c is not a digit (%d/%c)\n", c, c);
  }
  if (isnumber(cc)) {
    printf("cc is a digit (%d/%c)\n", cc, cc);
  } else {
    printf("cc is not a digit (%d/%c)\n", cc, cc);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x9,-0x8(%rbp)
movl   $0x39,-0xc(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <isnumber@plt>
cmp    $0x0,%rax
je     1166 <main+0x46>
mov    -0x8(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
jmp    1178 <main+0x58>
mov    -0x8(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%edi
call   1040 <isnumber@plt>
cmp    $0x0,%rax
je     11a1 <main+0x81>
mov    -0xc(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xe69(%rip),%rdi
call   1030 <printf@plt>
jmp    11b3 <main+0x93>
mov    -0xc(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xe69(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x9,%edi
call   1040 <isnumber@plt>
test   %rax,%rax
lea    0xee3(%rip),%rax
lea    0xec5(%rip),%rdi
cmove  %rax,%rdi
mov    $0x9,%esi
mov    $0x9,%edx
call   1030 <printf@plt>
mov    $0x39,%edi
call   1040 <isnumber@plt>
test   %rax,%rax
lea    0xeb4(%rip),%rax
lea    0xe96(%rip),%rdi
cmove  %rax,%rdi
mov    $0x39,%esi
mov    $0x39,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [22 x i8] c"c is a digit (%d/%c)\0A\00"
@.str.1 = [26 x i8] c"c is not a digit (%d/%c)\0A\00"
@.str.2 = [23 x i8] c"cc is a digit (%d/%c)\0A\00"
@.str.3 = [27 x i8] c"cc is not a digit (%d/%c)\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 9, i32* %2
store i32 57, i32* %3
%4 = load i32, i32* %2
%5 = call i64 @isnumber(i32 %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %0
%8 = load i32, i32* %2
%9 = load i32, i32* %2
%10 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %8, i32 %9)
br label %15
11: ; preds = %0
%12 = load i32, i32* %2
%13 = load i32, i32* %2
%14 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i32 %12, i32 %13)
br label %15
15: ; preds = %11, %7
%16 = load i32, i32* %3
%17 = call i64 @isnumber(i32 %16)
%18 = icmp ne i64 %17, 0
br i1 %18, label %19, label %23
19: ; preds = %15
%20 = load i32, i32* %3
%21 = load i32, i32* %3
%22 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i32 %20, i32 %21)
br label %27
23: ; preds = %15
%24 = load i32, i32* %3
%25 = load i32, i32* %3
%26 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0), i32 %24, i32 %25)
br label %27
27: ; preds = %23, %19
ret i32 0
}

LLVM IR (-O2):
@.str = [22 x i8] c"c is a digit (%d/%c)\0A\00"
@.str.1 = [26 x i8] c"c is not a digit (%d/%c)\0A\00"
@.str.2 = [23 x i8] c"cc is a digit (%d/%c)\0A\00"
@.str.3 = [27 x i8] c"cc is not a digit (%d/%c)\0A\00"
define i32 @main() {
%1 = tail call i64 @isnumber(i32 9)
%2 = icmp eq i64 %1, 0
%3 = select i1 %2, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0)
%4 = tail call i32 @printf(i8* %3, i32 9, i32 9)
%5 = tail call i64 @isnumber(i32 57)
%6 = icmp eq i64 %5, 0
%7 = select i1 %6, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0)
%8 = tail call i32 @printf(i8* %7, i32 57, i32 57)
ret i32 0
}