#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, char);
int /*<<< orphan*/ scanf(char *, char *);
signed char antwort_ja_oder_nein(signed char wahrheitswert,
                                 signed char unwahrheitswert) {
  signed char eingabe;
  do {
    scanf("\n%c", &eingabe);
    if (eingabe != wahrheitswert && eingabe != unwahrheitswert) {
      printf("\nBitte eine Antwort in der Form %c oder %c eingeben!\n",
             wahrheitswert, unwahrheitswert);
    } else {
    }
  } while (eingabe != wahrheitswert && eingabe != unwahrheitswert);
  return eingabe;
}


x86 assembly (clang, -O0):
<antwort_ja_oder_nein>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
lea    0xec5(%rip),%rdi
lea    -0x3(%rbp),%rsi
call   1040 <scanf@plt>
movsbl -0x3(%rbp),%eax
movsbl -0x1(%rbp),%ecx
cmp    %ecx,%eax
je     117f <antwort_ja_oder_nein+0x5f>
movsbl -0x3(%rbp),%eax
movsbl -0x2(%rbp),%ecx
cmp    %ecx,%eax
je     117f <antwort_ja_oder_nein+0x5f>
mov    -0x1(%rbp),%al
lea    0xe96(%rip),%rdi
movsbl %al,%esi
movsbl -0x2(%rbp),%edx
call   1030 <printf@plt>
jmp    1184 <antwort_ja_oder_nein+0x64>
jmp    1184 <antwort_ja_oder_nein+0x64>
jmp    1189 <antwort_ja_oder_nein+0x69>
movsbl -0x3(%rbp),%ecx
movsbl -0x1(%rbp),%edx
xor    %eax,%eax
cmp    %edx,%ecx
mov    %al,-0x4(%rbp)
je     11ae <antwort_ja_oder_nein+0x8e>
movsbl -0x3(%rbp),%eax
movsbl -0x2(%rbp),%ecx
cmp    %ecx,%eax
setne  %al
mov    %al,-0x4(%rbp)
mov    -0x4(%rbp),%al
test   $0x1,%al
jne    1134 <antwort_ja_oder_nein+0x14>
movsbl -0x3(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<antwort_ja_oder_nein>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
lea    0xeca(%rip),%r14
lea    0x7(%rsp),%r15
movsbl %bpl,%r12d
movsbl %bl,%r13d
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r14,%rdi
mov    %r15,%rsi
call   1040 <scanf@plt>
movzbl 0x7(%rsp),%eax
cmp    %bpl,%al
je     1180 <antwort_ja_oder_nein+0x60>
cmp    %bl,%al
je     1180 <antwort_ja_oder_nein+0x60>
lea    0xe94(%rip),%rdi
mov    %r12d,%esi
mov    %r13d,%edx
call   1030 <printf@plt>
movzbl 0x7(%rsp),%eax
cmp    %bpl,%al
je     1189 <antwort_ja_oder_nein+0x69>
cmp    %bl,%al
jne    1150 <antwort_ja_oder_nein+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"\0A%c\00"
@.str.1 = [54 x i8] c"\0ABitte eine Antwort in der Form %c oder %c eingeben!\0A\00"
define signext i8 @antwort_ja_oder_nein(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
br label %6
6: ; preds = %37, %2
%7 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %5)
%8 = load i8, i8* %5
%9 = sext i8 %8 to i32
%10 = load i8, i8* %3
%11 = sext i8 %10 to i32
%12 = icmp ne i32 %9, %11
br i1 %12, label %13, label %23
13: ; preds = %6
%14 = load i8, i8* %5
%15 = sext i8 %14 to i32
%16 = load i8, i8* %4
%17 = sext i8 %16 to i32
%18 = icmp ne i32 %15, %17
br i1 %18, label %19, label %23
19: ; preds = %13
%20 = load i8, i8* %3
%21 = load i8, i8* %4
%22 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.1, i64 0, i64 0), i8 signext %20, i8 signext %21)
br label %24
23: ; preds = %13, %6
br label %24
24: ; preds = %23, %19
br label %25
25: ; preds = %24
%26 = load i8, i8* %5
%27 = sext i8 %26 to i32
%28 = load i8, i8* %3
%29 = sext i8 %28 to i32
%30 = icmp ne i32 %27, %29
br i1 %30, label %31, label %37
31: ; preds = %25
%32 = load i8, i8* %5
%33 = sext i8 %32 to i32
%34 = load i8, i8* %4
%35 = sext i8 %34 to i32
%36 = icmp ne i32 %33, %35
br label %37
37: ; preds = %31, %25
%38 = phi i1 [ false, %25 ], [ %36, %31 ]
br i1 %38, label %6, label %39
39: ; preds = %37
%40 = load i8, i8* %5
ret i8 %40
}

LLVM IR (-O2):
@.str = [4 x i8] c"\0A%c\00"
@.str.1 = [54 x i8] c"\0ABitte eine Antwort in der Form %c oder %c eingeben!\0A\00"
define signext i8 @antwort_ja_oder_nein(i8 signext %0, i8 signext %1) {
%3 = alloca i8
br label %4
4: ; preds = %13, %2
%5 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %3)
%6 = load i8, i8* %3
%7 = icmp eq i8 %6, %0
%8 = icmp eq i8 %6, %1
%9 = or i1 %7, %8
br i1 %9, label %13, label %10
10: ; preds = %4
%11 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.1, i64 0, i64 0), i8 signext %0, i8 signext %1)
%12 = load i8, i8* %3
br label %13
13: ; preds = %10, %4
%14 = phi i8 [ %12, %10 ], [ %6, %4 ]
%15 = icmp ne i8 %14, %0
%16 = icmp ne i8 %14, %1
%17 = and i1 %15, %16
br i1 %17, label %4, label %18
18: ; preds = %13
ret i8 %14
}