#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
scalar_t__ fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ strcmp(char *, char *);
int strlen(char *);
int /*<<< orphan*/ system(char *);
void executeNextBlock(FILE *fd) {
  char line[1000];
  bool done, isComment = false;
  while (!done && fgets(line, 1000, fd)) {
    done = !strcmp(line, "\n");
    isComment = strlen(line) >= 1 && line[0] == '#';
    if (!done && !isComment) {
      printf("%s\n", line);
      system(line);
    }
  }
}


x86 assembly (clang, -O0):
<executeNextBlock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x400,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x3f8(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x3f4(%rbp)
mov    %al,-0x3f9(%rbp)
jne    11a0 <executeNextBlock+0x50>
lea    -0x3f0(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    $0x3e8,%esi
call   1060 <fgets@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x3f9(%rbp)
mov    -0x3f9(%rbp),%al
test   $0x1,%al
jne    11b3 <executeNextBlock+0x63>
jmp    125a <executeNextBlock+0x10a>
lea    -0x3f0(%rbp),%rdi
lea    0xe41(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x3f4(%rbp)
lea    -0x3f0(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x1,%ecx
mov    %al,-0x3fa(%rbp)
jl     120b <executeNextBlock+0xbb>
movsbl -0x3f0(%rbp),%eax
cmp    $0x23,%eax
sete   %al
mov    %al,-0x3fa(%rbp)
mov    -0x3fa(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x3f8(%rbp)
cmpl   $0x0,-0x3f4(%rbp)
jne    1255 <executeNextBlock+0x105>
cmpl   $0x0,-0x3f8(%rbp)
jne    1255 <executeNextBlock+0x105>
lea    -0x3f0(%rbp),%rsi
lea    0xdbc(%rip),%rdi
call   1050 <printf@plt>
lea    -0x3f0(%rbp),%rdi
call   1040 <system@plt>
jmp    1169 <executeNextBlock+0x19>
add    $0x400,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<executeNextBlock>:
ret

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define void @executeNextBlock(i32* %0) {
%2 = alloca i32*
%3 = alloca [1000 x i8]
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %2
store i32 0, i32* %5
br label %6
6: ; preds = %43, %1
%7 = load i32, i32* %4
%8 = icmp ne i32 %7, 0
br i1 %8, label %14, label %9
9: ; preds = %6
%10 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%11 = load i32*, i32** %2
%12 = call i64 @fgets(i8* %10, i32 1000, i32* %11)
%13 = icmp ne i64 %12, 0
br label %14
14: ; preds = %9, %6
%15 = phi i1 [ false, %6 ], [ %13, %9 ]
br i1 %15, label %16, label %44
16: ; preds = %14
%17 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%18 = call i32 @strcmp(i8* %17, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%19 = icmp ne i32 %18, 0
%20 = xor i1 %19, true
%21 = zext i1 %20 to i32
store i32 %21, i32* %4
%22 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%23 = call i32 @strlen(i8* %22)
%24 = icmp sge i32 %23, 1
br i1 %24, label %25, label %30
25: ; preds = %16
%26 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%27 = load i8, i8* %26
%28 = sext i8 %27 to i32
%29 = icmp eq i32 %28, 35
br label %30
30: ; preds = %25, %16
%31 = phi i1 [ false, %16 ], [ %29, %25 ]
%32 = zext i1 %31 to i32
store i32 %32, i32* %5
%33 = load i32, i32* %4
%34 = icmp ne i32 %33, 0
br i1 %34, label %43, label %35
35: ; preds = %30
%36 = load i32, i32* %5
%37 = icmp ne i32 %36, 0
br i1 %37, label %43, label %38
38: ; preds = %35
%39 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%40 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %39)
%41 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%42 = call i32 @system(i8* %41)
br label %43
43: ; preds = %38, %35, %30
br label %6
44: ; preds = %14
ret void
}

LLVM IR (-O2):
define void @executeNextBlock(i32* nocapture %0) {
ret void
}