#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 % 4 == 0) && (jahr % 100 != 0)) || (jahr % 400 == 0)) {
    printf("%d ist ein Schaltjahr", jahr);
  } else {
    { printf("%d ist kein Schaltjahr", jahr); }
  }
  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
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xeaf(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1197 <main+0x67>
mov    -0x8(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11ab <main+0x7b>
mov    -0x8(%rbp),%eax
mov    $0x190,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11c1 <main+0x91>
mov    -0x8(%rbp),%esi
lea    0xe63(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    11d2 <main+0xa2>
mov    -0x8(%rbp),%esi
lea    0xe63(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    0x2dff(%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
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xebf(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%esi
imul   $0xc28f5c29,%esi,%eax
add    $0x51eb850,%eax
mov    %eax,%ecx
ror    $0x2,%ecx
ror    $0x4,%eax
cmp    $0xa3d70b,%eax
lea    0xe95(%rip),%rdi
lea    0xea4(%rip),%rax
cmovb  %rdi,%rax
cmp    $0x28f5c29,%ecx
cmovb  %rax,%rdi
test   $0x3,%sil
cmovne %rax,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2e2a(%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 = [22 x i8] c"%d ist ein Schaltjahr\00"
@.str.3 = [23 x i8] c"%d 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 (i8*, ...) @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, 4
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %14
10: ; preds = %0
%11 = load i32, i32* %2
%12 = srem i32 %11, 100
%13 = icmp ne i32 %12, 0
br i1 %13, label %18, label %14
14: ; preds = %10, %0
%15 = load i32, i32* %2
%16 = srem i32 %15, 400
%17 = icmp eq i32 %16, 0
br i1 %17, label %18, label %21
18: ; preds = %14, %10
%19 = load i32, i32* %2
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i32 %19)
br label %24
21: ; preds = %14
%22 = load i32, i32* %2
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0), i32 %22)
br label %24
24: ; preds = %21, %18
%25 = load i32, i32* @EXIT_SUCCESS
ret i32 %25
}

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 = [22 x i8] c"%d ist ein Schaltjahr\00"
@.str.3 = [23 x i8] c"%d 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 (i8*, ...) @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 = and i32 %7, 3
%9 = icmp eq i32 %8, 0
%10 = srem i32 %7, 100
%11 = icmp ne i32 %10, 0
%12 = and i1 %9, %11
%13 = srem i32 %7, 400
%14 = icmp eq i32 %13, 0
%15 = or i1 %12, %14
%16 = select i1 %15, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0)
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) %16, i32 %7)
%18 = load i32, i32* @EXIT_SUCCESS
ret i32 %18
}