#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*/ printf(char *, char *);
int truth_table(char, char *);
void abrute(char *string, char *strhld, int index, int length) {
  char cache = '!';
  while (cache <= '~') {
    string[index] = cache;
    if (truth_table(cache, strhld) == 1) {
      if (index < length - 1)
        abrute(string, strhld, index + 1, length);
      else
        printf("%s\n", string);
    }
    ++cache;
  }
}


x86 assembly (clang, -O0):
<abrute>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
movb   $0x21,-0x19(%rbp)
movsbl -0x19(%rbp),%eax
cmp    $0x7e,%eax
jg     11cb <abrute+0x9b>
mov    -0x19(%rbp),%dl
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x19(%rbp),%al
mov    -0x10(%rbp),%rsi
movsbl %al,%edi
call   1050 <truth_table@plt>
cmp    $0x1,%eax
jne    11be <abrute+0x8e>
mov    -0x14(%rbp),%eax
mov    -0x18(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    11a9 <abrute+0x79>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
add    $0x1,%edx
mov    -0x18(%rbp),%ecx
call   1030 <abrute@plt>
jmp    11b9 <abrute+0x89>
mov    -0x8(%rbp),%rsi
lea    0xe4c(%rip),%rdi
call   1040 <printf@plt>
jmp    11be <abrute+0x8e>
mov    -0x19(%rbp),%al
add    $0x1,%al
mov    %al,-0x19(%rbp)
jmp    114a <abrute+0x1a>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<abrute>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %edx,%r15d
mov    %rsi,%rbx
mov    %rdi,%rbp
movslq %edx,%r13
mov    %rcx,0x10(%rsp)
lea    -0x1(%rcx),%r14d
lea    0x1(%r13),%eax
mov    %eax,0xc(%rsp)
mov    $0x21,%r12b
jmp    1179 <abrute+0x49>
lea    0xe99(%rip),%rdi
mov    %rbp,%rsi
call   1040 <printf@plt>
add    $0x1,%r12b
cmp    $0x7f,%r12b
je     11aa <abrute+0x7a>
mov    %r12b,0x0(%rbp,%r13,1)
movsbl %r12b,%edi
mov    %rbx,%rsi
call   1050 <truth_table@plt>
cmp    $0x1,%eax
jne    116f <abrute+0x3f>
cmp    %r15d,%r14d
jle    1160 <abrute+0x30>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    0xc(%rsp),%edx
mov    0x10(%rsp),%rcx
call   1030 <abrute@plt>
jmp    116f <abrute+0x3f>
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
define void @abrute(i8* %0, i8* %1, i32 %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i8
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
store i8 33, i8* %9
br label %10
10: ; preds = %39, %4
%11 = load i8, i8* %9
%12 = sext i8 %11 to i32
%13 = icmp sle i32 %12, 126
br i1 %13, label %14, label %42
14: ; preds = %10
%15 = load i8, i8* %9
%16 = load i8*, i8** %5
%17 = load i32, i32* %7
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i8, i8* %16, i64 %18
store i8 %15, i8* %19
%20 = load i8, i8* %9
%21 = load i8*, i8** %6
%22 = call i32 @truth_table(i8 signext %20, i8* %21)
%23 = icmp eq i32 %22, 1
br i1 %23, label %24, label %39
24: ; preds = %14
%25 = load i32, i32* %7
%26 = load i32, i32* %8
%27 = sub nsw i32 %26, 1
%28 = icmp slt i32 %25, %27
br i1 %28, label %29, label %35
29: ; preds = %24
%30 = load i8*, i8** %5
%31 = load i8*, i8** %6
%32 = load i32, i32* %7
%33 = add nsw i32 %32, 1
%34 = load i32, i32* %8
br label %38
35: ; preds = %24
%36 = load i8*, i8** %5
%37 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %36)
br label %38
38: ; preds = %35, %29
br label %39
39: ; preds = %38, %14
%40 = load i8, i8* %9
%41 = add i8 %40, 1
store i8 %41, i8* %9
br label %10
42: ; preds = %10
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @abrute(i8* %0, i8* %1, i32 %2, i32 %3) {
%5 = sext i32 %2 to i64
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = add nsw i32 %3, -1
%8 = icmp sgt i32 %7, %2
%9 = add nsw i32 %2, 1
br label %10
10: ; preds = %4, %18
%11 = phi i8 [ 33, %4 ], [ %19, %18 ]
store i8 %11, i8* %6
%12 = tail call i32 @truth_table(i8 signext %11, i8* %1)
%13 = icmp eq i32 %12, 1
br i1 %13, label %14, label %18
14: ; preds = %10
br i1 %8, label %15, label %16
15: ; preds = %14
tail call void @abrute(i8* %0, i8* %1, i32 %9, i32 %3)
br label %18
16: ; preds = %14
%17 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %18
18: ; preds = %15, %16, %10
%19 = add nuw nsw i8 %11, 1
%20 = icmp eq i8 %19, 127
br i1 %20, label %21, label %10
21: ; preds = %18
ret void
}