#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 isComment(char const *, char *);
int isWhitespace(char const *, char *);
int isAtmosphere(const char *c, char *value) {
  char whitespace = '\0';
  const int IS_WHITESPACE = isWhitespace(c, &whitespace);
  const int IS_COMMENT = isComment(c, NULL);
  if (c == NULL)
    return 0;
  if (IS_WHITESPACE > 0) {
    if (value != NULL)
      *value = whitespace;
    return 1;
  } else if (IS_COMMENT > 0) {
    if (value != NULL) {
      isComment(c, value);
    }
    return IS_COMMENT;
  } else
    return 0;
}


x86 assembly (clang, -O0):
<isAtmosphere>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movb   $0x0,-0x19(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x19(%rbp),%rsi
call   1040 <isWhitespace@plt>
mov    %eax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <isComment@plt>
mov    %eax,-0x24(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    116b <isAtmosphere+0x4b>
movl   $0x0,-0x4(%rbp)
jmp    11c9 <isAtmosphere+0xa9>
cmpl   $0x0,-0x20(%rbp)
jle    1195 <isAtmosphere+0x75>
cmpq   $0x0,-0x18(%rbp)
je     1189 <isAtmosphere+0x69>
mov    -0x19(%rbp),%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
movl   $0x1,-0x4(%rbp)
jmp    11c9 <isAtmosphere+0xa9>
cmpl   $0x0,-0x24(%rbp)
jle    11c2 <isAtmosphere+0xa2>
cmpq   $0x0,-0x18(%rbp)
je     11b7 <isAtmosphere+0x97>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <isComment@plt>
mov    -0x24(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    11c9 <isAtmosphere+0xa9>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isAtmosphere>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
movb   $0x0,0xf(%rsp)
lea    0xf(%rsp),%rsi
call   1040 <isWhitespace@plt>
mov    %eax,%ebp
xor    %r15d,%r15d
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <isComment@plt>
test   %rbx,%rbx
je     1187 <isAtmosphere+0x67>
test   %ebp,%ebp
jle    116d <isAtmosphere+0x4d>
mov    $0x1,%r15d
test   %r14,%r14
je     1187 <isAtmosphere+0x67>
mov    0xf(%rsp),%al
mov    %al,(%r14)
jmp    1187 <isAtmosphere+0x67>
mov    %eax,%r12d
test   %eax,%eax
jle    1187 <isAtmosphere+0x67>
test   %r14,%r14
je     1184 <isAtmosphere+0x64>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <isComment@plt>
mov    %r12d,%r15d
mov    %r15d,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @isAtmosphere(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8 0, i8* %6
%9 = load i8*, i8** %4
%10 = call i32 @isWhitespace(i8* %9, i8* %6)
store i32 %10, i32* %7
%11 = load i8*, i8** %4
%12 = call i32 @isComment(i8* %11, i8* null)
store i32 %12, i32* %8
%13 = load i8*, i8** %4
%14 = icmp eq i8* %13, null
br i1 %14, label %15, label %16
15: ; preds = %2
store i32 0, i32* %3
br label %39
16: ; preds = %2
%17 = load i32, i32* %7
%18 = icmp sgt i32 %17, 0
br i1 %18, label %19, label %26
19: ; preds = %16
%20 = load i8*, i8** %5
%21 = icmp ne i8* %20, null
br i1 %21, label %22, label %25
22: ; preds = %19
%23 = load i8, i8* %6
%24 = load i8*, i8** %5
store i8 %23, i8* %24
br label %25
25: ; preds = %22, %19
store i32 1, i32* %3
br label %39
26: ; preds = %16
%27 = load i32, i32* %8
%28 = icmp sgt i32 %27, 0
br i1 %28, label %29, label %38
29: ; preds = %26
%30 = load i8*, i8** %5
%31 = icmp ne i8* %30, null
br i1 %31, label %32, label %36
32: ; preds = %29
%33 = load i8*, i8** %4
%34 = load i8*, i8** %5
%35 = call i32 @isComment(i8* %33, i8* %34)
br label %36
36: ; preds = %32, %29
%37 = load i32, i32* %8
store i32 %37, i32* %3
br label %39
38: ; preds = %26
store i32 0, i32* %3
br label %39
39: ; preds = %38, %36, %25, %15
%40 = load i32, i32* %3
ret i32 %40
}

LLVM IR (-O2):
define i32 @isAtmosphere(i8* %0, i8* %1) {
%3 = alloca i8
store i8 0, i8* %3
%4 = call i32 @isWhitespace(i8* %0, i8* %3)
%5 = call i32 @isComment(i8* %0, i8* null)
%6 = icmp eq i8* %0, null
br i1 %6, label %19, label %7
7: ; preds = %2
%8 = icmp sgt i32 %4, 0
br i1 %8, label %9, label %13
9: ; preds = %7
%10 = icmp eq i8* %1, null
br i1 %10, label %19, label %11
11: ; preds = %9
%12 = load i8, i8* %3
store i8 %12, i8* %1
br label %19
13: ; preds = %7
%14 = icmp sgt i32 %5, 0
br i1 %14, label %15, label %19
15: ; preds = %13
%16 = icmp eq i8* %1, null
br i1 %16, label %19, label %17
17: ; preds = %15
%18 = call i32 @isComment(i8* %0, i8* %1)
br label %19
19: ; preds = %13, %15, %17, %9, %11, %2
%20 = phi i32 [ 0, %2 ], [ 1, %11 ], [ 1, %9 ], [ %5, %17 ], [ %5, %15 ], [ 0, %13 ]
ret i32 %20
}