#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 EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ setbuf(int /*<<< orphan*/, int /*<<< orphan*/ *);
int /*<<< orphan*/ stdout;
int main(void) {
  setbuf(stdout, NULL);
  int jahr;
  printf("Bitte Jahr eingeben:");
  scanf("%d", &jahr);
  if (jahr % 400 == 0) {
    printf("Jahr ist Schaltjahr");
  } else {
    if (jahr % 4 == 0) {
      if (jahr % 100 == 0) {
        printf("Jahr ist kein Schaltjahr");
      } else {
        printf("Jahr ist Schaltjahr");
      }
    } else {
      printf("Jahr ist kein Schaltjahr");
    }
  }
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2e9a(%rip),%rax
mov    (%rax),%edi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <setbuf@plt>
lea    0xea8(%rip),%rdi
call   1040 <printf@plt>
lea    0xeb1(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    $0x190,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1192 <main+0x62>
lea    0xe90(%rip),%rdi
call   1040 <printf@plt>
jmp    11ed <main+0xbd>
mov    -0x8(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11dc <main+0xac>
mov    -0x8(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11cb <main+0x9b>
lea    0xe6b(%rip),%rdi
call   1040 <printf@plt>
jmp    11d7 <main+0xa7>
lea    0xe46(%rip),%rdi
call   1040 <printf@plt>
jmp    11e8 <main+0xb8>
lea    0xe49(%rip),%rdi
call   1040 <printf@plt>
jmp    11ed <main+0xbd>
mov    0x2de4(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ea8(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
call   1030 <setbuf@plt>
lea    0xeb8(%rip),%rdi
call   1040 <printf@plt>
lea    0xec1(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%ecx
imul   $0xc28f5c29,%ecx,%eax
add    $0x51eb850,%eax
mov    %eax,%edx
ror    $0x4,%edx
cmp    $0xa3d70b,%edx
jb     1188 <main+0x58>
test   $0x3,%cl
je     1191 <main+0x61>
lea    0xea6(%rip),%rdi
jmp    11ab <main+0x7b>
lea    0xe89(%rip),%rdi
jmp    11ab <main+0x7b>
ror    $0x2,%eax
cmp    $0x28f5c29,%eax
lea    0xe8c(%rip),%rax
lea    0xe71(%rip),%rdi
cmovb  %rax,%rdi
call   1040 <printf@plt>
mov    0x2e21(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [21 x i8] c"Bitte Jahr eingeben:\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [20 x i8] c"Jahr ist Schaltjahr\00"
@.str.3 = [25 x i8] c"Jahr ist kein Schaltjahr\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = load i32, i32* @stdout
%4 = call i32 @setbuf(i32 %3, i32* null)
%5 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%7 = load i32, i32* %2
%8 = srem i32 %7, 400
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %0
%11 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
br label %28
12: ; preds = %0
%13 = load i32, i32* %2
%14 = srem i32 %13, 4
%15 = icmp eq i32 %14, 0
br i1 %15, label %16, label %25
16: ; preds = %12
%17 = load i32, i32* %2
%18 = srem i32 %17, 100
%19 = icmp eq i32 %18, 0
br i1 %19, label %20, label %22
20: ; preds = %16
%21 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0))
br label %24
22: ; preds = %16
%23 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
br label %24
24: ; preds = %22, %20
br label %27
25: ; preds = %12
%26 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0))
br label %27
27: ; preds = %25, %24
br label %28
28: ; preds = %27, %10
%29 = load i32, i32* @EXIT_SUCCESS
ret i32 %29
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [21 x i8] c"Bitte Jahr eingeben:\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [20 x i8] c"Jahr ist Schaltjahr\00"
@.str.3 = [25 x i8] c"Jahr ist kein Schaltjahr\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = load i32, i32* @stdout
%3 = tail call i32 @setbuf(i32 %2, i32* null)
%4 = bitcast i32* %1 to i8*
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%7 = load i32, i32* %1
%8 = srem i32 %7, 400
%9 = icmp eq i32 %8, 0
br i1 %9, label %17, label %10
10: ; preds = %0
%11 = and i32 %7, 3
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %17
13: ; preds = %10
%14 = srem i32 %7, 100
%15 = icmp eq i32 %14, 0
%16 = select i1 %15, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0)
br label %17
17: ; preds = %10, %13, %0
%18 = phi i8* [ getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), %0 ], [ %16, %13 ], [ getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0), %10 ]
%19 = call i32 @printf(i8* dereferenceable(1) %18)
%20 = load i32, i32* @EXIT_SUCCESS
ret i32 %20
}