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

/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ caesar(char *, int);
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stdin;
int main(void) {
  for (int i = 0; i < 20; i++) {
    int a = i;
    int b = 2;
    int erg = a / b;
    int erg2 = erg * b;
    int erg3 = a - erg2;
    if (erg3 == 0) {
      printf("%d \n", i);
    }
  }
  for (int i = 2; i < 20; i++) {
    int primzahl = 1;
    for (int j = 2; primzahl == 1 && j < i; j++) {
      if (i != j) {
        primzahl = !!(i % j);
      }
    }
    if (primzahl) {
      printf("%d \n", i);
    }
  }
  char string[100];
  printf("Geben Sie ein paar Wörter ein : ");
  fgets(string, 100, stdin);
  printf("Ihre Eingabe: %s\n", string);
  for (int i = 0; i < (sizeof(string) / sizeof(char)); i++) {
    caesar(&string[i], 2);
  }
  printf("%s\n\n", string);
  char string2[1000];
  printf("Geben Sie ein paar Wörter ein : ");
  fgets(string2, 1000, stdin);
  printf("Ihre Eingabe: %s\n", string2);
  for (int i = 0; i < (sizeof(string2) / sizeof(char)); i++) {
    caesar(&string2[i], 3);
  }
  printf("%s\n\n", string2);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x490,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x14,-0x8(%rbp)
jge    11ab <main+0x7b>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
movl   $0x2,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cltd
idivl  -0x10(%rbp)
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
imul   -0x10(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
sub    -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jne    1198 <main+0x68>
mov    -0x8(%rbp),%esi
lea    0xe6f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    119d <main+0x6d>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1149 <main+0x19>
movl   $0x2,-0x20(%rbp)
cmpl   $0x14,-0x20(%rbp)
jge    1264 <main+0x134>
movl   $0x1,-0x24(%rbp)
movl   $0x2,-0x28(%rbp)
xor    %eax,%eax
cmpl   $0x1,-0x24(%rbp)
mov    %al,-0x485(%rbp)
jne    11eb <main+0xbb>
mov    -0x28(%rbp),%eax
cmp    -0x20(%rbp),%eax
setl   %al
mov    %al,-0x485(%rbp)
mov    -0x485(%rbp),%al
test   $0x1,%al
jne    11fe <main+0xce>
jmp    1236 <main+0x106>
mov    -0x20(%rbp),%eax
cmp    -0x28(%rbp),%eax
je     1223 <main+0xf3>
mov    -0x20(%rbp),%eax
cltd
idivl  -0x28(%rbp)
cmp    $0x0,%edx
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x24(%rbp)
jmp    1228 <main+0xf8>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    11ca <main+0x9a>
cmpl   $0x0,-0x24(%rbp)
je     1251 <main+0x121>
mov    -0x20(%rbp),%esi
lea    0xdb6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1256 <main+0x126>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    11b2 <main+0x82>
lea    0xd9a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x90(%rbp),%rdi
mov    0x2d68(%rip),%rax
mov    (%rax),%edx
mov    $0x64,%esi
call   1050 <fgets@plt>
lea    -0x90(%rbp),%rsi
lea    0xd8d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x94(%rbp)
movslq -0x94(%rbp),%rax
cmp    $0x64,%rax
jae    12eb <main+0x1bb>
movslq -0x94(%rbp),%rax
lea    -0x90(%rbp),%rdi
add    %rax,%rdi
mov    $0x2,%esi
call   1040 <caesar@plt>
mov    -0x94(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x94(%rbp)
jmp    12ab <main+0x17b>
lea    -0x90(%rbp),%rsi
lea    0xd40(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xcfe(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x480(%rbp),%rdi
mov    0x2ccc(%rip),%rax
mov    (%rax),%edx
mov    $0x3e8,%esi
call   1050 <fgets@plt>
lea    -0x480(%rbp),%rsi
lea    0xcf1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x484(%rbp)
movslq -0x484(%rbp),%rax
cmp    $0x3e8,%rax
jae    1389 <main+0x259>
movslq -0x484(%rbp),%rax
lea    -0x480(%rbp),%rdi
add    %rax,%rdi
mov    $0x3,%esi
call   1040 <caesar@plt>
mov    -0x484(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x484(%rbp)
jmp    1347 <main+0x217>
lea    -0x480(%rbp),%rsi
lea    0xca2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2c33(%rip),%rax
mov    (%rax),%eax
add    $0x490,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x460,%rsp
lea    0xebe(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x2,%ebp
mov    %rbx,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x6,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xc,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xe,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x10,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x12,%esi
xor    %eax,%eax
call   1030 <printf@plt>
jmp    11f4 <main+0xc4>
nopl   0x0(%rax)
mov    %rbx,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1030 <printf@plt>
add    $0x1,%ebp
cmp    $0x14,%ebp
je     121c <main+0xec>
cmp    $0x3,%ebp
jb     11e0 <main+0xb0>
mov    $0x3,%ecx
xchg   %ax,%ax
lea    -0x1(%rcx),%esi
mov    %ebp,%eax
xor    %edx,%edx
div    %esi
test   %edx,%edx
je     1216 <main+0xe6>
lea    0x1(%rcx),%eax
cmp    %ebp,%ecx
mov    %eax,%ecx
jb     1200 <main+0xd0>
test   %edx,%edx
jne    11e0 <main+0xb0>
jmp    11ec <main+0xbc>
lea    0xde2(%rip),%rdi
xor    %ebp,%ebp
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x2db5(%rip),%r14
mov    (%r14),%edx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x64,%esi
call   1050 <fgets@plt>
lea    0xdda(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
nopw   0x0(%rax,%rax,1)
lea    (%rsp,%rbp,1),%rdi
mov    $0x2,%esi
call   1040 <caesar@plt>
add    $0x1,%rbp
cmp    $0x64,%rbp
jne    1260 <main+0x130>
lea    0xdba(%rip),%rdi
xor    %ebp,%ebp
mov    %rsp,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xd73(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    (%r14),%edx
lea    0x70(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x3e8,%esi
call   1050 <fgets@plt>
lea    0xd72(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
nop
lea    (%rsp,%rbp,1),%rdi
add    $0x70,%rdi
mov    $0x3,%esi
call   1040 <caesar@plt>
add    $0x1,%rbp
cmp    $0x3e8,%rbp
jne    12c0 <main+0x190>
lea    0xd53(%rip),%rdi
lea    0x70(%rsp),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x2cdf(%rip),%rax
mov    (%rax),%eax
add    $0x460,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%d \0A\00"
@.str.1 = [34 x i8] c"Geben Sie ein paar W\C3\B6rter ein : \00"
@stdin = global i32 0
@.str.2 = [18 x i8] c"Ihre Eingabe: %s\0A\00"
@.str.3 = [5 x i8] c"%s\0A\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca [100 x i8]
%12 = alloca i32
%13 = alloca [1000 x i8]
%14 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %15
15: ; preds = %35, %0
%16 = load i32, i32* %2
%17 = icmp slt i32 %16, 20
br i1 %17, label %18, label %38
18: ; preds = %15
%19 = load i32, i32* %2
store i32 %19, i32* %3
store i32 2, i32* %4
%20 = load i32, i32* %3
%21 = load i32, i32* %4
%22 = sdiv i32 %20, %21
store i32 %22, i32* %5
%23 = load i32, i32* %5
%24 = load i32, i32* %4
%25 = mul nsw i32 %23, %24
store i32 %25, i32* %6
%26 = load i32, i32* %3
%27 = load i32, i32* %6
%28 = sub nsw i32 %26, %27
store i32 %28, i32* %7
%29 = load i32, i32* %7
%30 = icmp eq i32 %29, 0
br i1 %30, label %31, label %34
31: ; preds = %18
%32 = load i32, i32* %2
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %32)
br label %34
34: ; preds = %31, %18
br label %35
35: ; preds = %34
%36 = load i32, i32* %2
%37 = add nsw i32 %36, 1
store i32 %37, i32* %2
br label %15
38: ; preds = %15
store i32 2, i32* %8
br label %39
39: ; preds = %75, %38
%40 = load i32, i32* %8
%41 = icmp slt i32 %40, 20
br i1 %41, label %42, label %78
42: ; preds = %39
store i32 1, i32* %9
store i32 2, i32* %10
br label %43
43: ; preds = %65, %42
%44 = load i32, i32* %9
%45 = icmp eq i32 %44, 1
br i1 %45, label %46, label %50
46: ; preds = %43
%47 = load i32, i32* %10
%48 = load i32, i32* %8
%49 = icmp slt i32 %47, %48
br label %50
50: ; preds = %46, %43
%51 = phi i1 [ false, %43 ], [ %49, %46 ]
br i1 %51, label %52, label %68
52: ; preds = %50
%53 = load i32, i32* %8
%54 = load i32, i32* %10
%55 = icmp ne i32 %53, %54
br i1 %55, label %56, label %64
56: ; preds = %52
%57 = load i32, i32* %8
%58 = load i32, i32* %10
%59 = srem i32 %57, %58
%60 = icmp ne i32 %59, 0
%61 = xor i1 %60, true
%62 = xor i1 %61, true
%63 = zext i1 %62 to i32
store i32 %63, i32* %9
br label %64
64: ; preds = %56, %52
br label %65
65: ; preds = %64
%66 = load i32, i32* %10
%67 = add nsw i32 %66, 1
store i32 %67, i32* %10
br label %43
68: ; preds = %50
%69 = load i32, i32* %9
%70 = icmp ne i32 %69, 0
br i1 %70, label %71, label %74
71: ; preds = %68
%72 = load i32, i32* %8
%73 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %72)
br label %74
74: ; preds = %71, %68
br label %75
75: ; preds = %74
%76 = load i32, i32* %8
%77 = add nsw i32 %76, 1
store i32 %77, i32* %8
br label %39
78: ; preds = %39
%79 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0))
%80 = getelementptr inbounds [100 x i8], [100 x i8]* %11, i64 0, i64 0
%81 = load i32, i32* @stdin
%82 = call i32 @fgets(i8* %80, i32 100, i32 %81)
%83 = getelementptr inbounds [100 x i8], [100 x i8]* %11, i64 0, i64 0
%84 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i8* %83)
store i32 0, i32* %12
br label %85
85: ; preds = %94, %78
%86 = load i32, i32* %12
%87 = sext i32 %86 to i64
%88 = icmp ult i64 %87, 100
br i1 %88, label %89, label %97
89: ; preds = %85
%90 = load i32, i32* %12
%91 = sext i32 %90 to i64
%92 = getelementptr inbounds [100 x i8], [100 x i8]* %11, i64 0, i64 %91
%93 = call i32 @caesar(i8* %92, i32 2)
br label %94
94: ; preds = %89
%95 = load i32, i32* %12
%96 = add nsw i32 %95, 1
store i32 %96, i32* %12
br label %85
97: ; preds = %85
%98 = getelementptr inbounds [100 x i8], [100 x i8]* %11, i64 0, i64 0
%99 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* %98)
%100 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0))
%101 = getelementptr inbounds [1000 x i8], [1000 x i8]* %13, i64 0, i64 0
%102 = load i32, i32* @stdin
%103 = call i32 @fgets(i8* %101, i32 1000, i32 %102)
%104 = getelementptr inbounds [1000 x i8], [1000 x i8]* %13, i64 0, i64 0
%105 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i8* %104)
store i32 0, i32* %14
br label %106
106: ; preds = %115, %97
%107 = load i32, i32* %14
%108 = sext i32 %107 to i64
%109 = icmp ult i64 %108, 1000
br i1 %109, label %110, label %118
110: ; preds = %106
%111 = load i32, i32* %14
%112 = sext i32 %111 to i64
%113 = getelementptr inbounds [1000 x i8], [1000 x i8]* %13, i64 0, i64 %112
%114 = call i32 @caesar(i8* %113, i32 3)
br label %115
115: ; preds = %110
%116 = load i32, i32* %14
%117 = add nsw i32 %116, 1
store i32 %117, i32* %14
br label %106
118: ; preds = %106
%119 = getelementptr inbounds [1000 x i8], [1000 x i8]* %13, i64 0, i64 0
%120 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* %119)
%121 = load i32, i32* @EXIT_SUCCESS
ret i32 %121
}

LLVM IR (-O2):
@.str = [5 x i8] c"%d \0A\00"
@.str.1 = [34 x i8] c"Geben Sie ein paar W\C3\B6rter ein : \00"
@stdin = global i32 0
@.str.2 = [18 x i8] c"Ihre Eingabe: %s\0A\00"
@.str.3 = [5 x i8] c"%s\0A\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca [100 x i8]
%2 = alloca [1000 x i8]
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 0)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 2)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 4)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 6)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 8)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 10)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 12)
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 14)
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 16)
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 18)
br label %13
13: ; preds = %0, %32
%14 = phi i32 [ %33, %32 ], [ 2, %0 ]
%15 = icmp ugt i32 %14, 2
br i1 %15, label %23, label %30
16: ; preds = %32
%17 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0))
%19 = load i32, i32* @stdin
%20 = call i32 @fgets(i8* %17, i32 100, i32 %19)
%21 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i8* %17)
br label %42
22: ; preds = %23
br i1 %26, label %30, label %32
23: ; preds = %13, %23
%24 = phi i32 [ %27, %23 ], [ 2, %13 ]
%25 = urem i32 %14, %24
%26 = icmp ne i32 %25, 0
%27 = add nuw nsw i32 %24, 1
%28 = icmp ult i32 %27, %14
%29 = select i1 %26, i1 %28, i1 false
br i1 %29, label %23, label %22
30: ; preds = %13, %22
%31 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %14)
br label %32
32: ; preds = %30, %22
%33 = add nuw nsw i32 %14, 1
%34 = icmp eq i32 %33, 20
br i1 %34, label %16, label %13
35: ; preds = %42
%36 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* %17)
%37 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%38 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0))
%39 = load i32, i32* @stdin
%40 = call i32 @fgets(i8* %37, i32 1000, i32 %39)
%41 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i8* %37)
br label %51
42: ; preds = %16, %42
%43 = phi i64 [ 0, %16 ], [ %46, %42 ]
%44 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 %43
%45 = call i32 @caesar(i8* %44, i32 2)
%46 = add nuw nsw i64 %43, 1
%47 = icmp eq i64 %46, 100
br i1 %47, label %35, label %42
48: ; preds = %51
%49 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* %37)
%50 = load i32, i32* @EXIT_SUCCESS
ret i32 %50
51: ; preds = %35, %51
%52 = phi i64 [ 0, %35 ], [ %55, %51 ]
%53 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 %52
%54 = call i32 @caesar(i8* %53, i32 3)
%55 = add nuw nsw i64 %52, 1
%56 = icmp eq i64 %55, 1000
br i1 %56, label %48, label %51
}