#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 *, ...);
int /*<<< orphan*/ scanf(char *, char *);
int main(void) {
  struct Person {
    int id;
    char vname[20], nname[20];
    char telnr[15];
    int alter;
  };
  struct Person hendrik, karin;
  hendrik.id = 1;
  printf("Bitte geben Sie Ihren Vornamen ein (maximal 20 zeichen): \n");
  scanf("%s", hendrik.vname);
  printf("Bitte geben Sie Ihren Nachnamen ein (maximal 20 zeichen): \n");
  scanf("%s", hendrik.nname);
  printf("Bitte geben Sie Ihre Telefonnummer ein (maximal 15 zeichen): \n");
  scanf("%s", hendrik.telnr);
  hendrik.alter = 28;
  printf("Vorname: %s", hendrik.vname);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x1,-0x40(%rbp)
lea    0xec7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x40(%rbp),%rsi
add    $0x4,%rsi
lea    0xf70(%rip),%rdi
call   1040 <scanf@plt>
lea    0xee0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x40(%rbp),%rsi
add    $0x18,%rsi
lea    0xf4e(%rip),%rdi
call   1040 <scanf@plt>
lea    0xefa(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x40(%rbp),%rsi
add    $0x2c,%rsi
lea    0xf2c(%rip),%rdi
call   1040 <scanf@plt>
movl   $0x1c,-0x4(%rbp)
lea    -0x40(%rbp),%rsi
add    $0x4,%rsi
lea    0xf08(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x48,%rsp
movl   $0x1,0x8(%rsp)
lea    0xec6(%rip),%rdi
call   1030 <puts@plt>
lea    0xc(%rsp),%r14
lea    0xeb2(%rip),%rbx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <scanf@plt>
lea    0xedd(%rip),%rdi
call   1030 <puts@plt>
lea    0x20(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xeff(%rip),%rdi
call   1030 <puts@plt>
lea    0x34(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
movl   $0x1c,0x44(%rsp)
lea    0xe5d(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x48,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.Person = type { i32, [20 x i8], [20 x i8], [15 x i8], i32 }
@.str = [59 x i8] c"Bitte geben Sie Ihren Vornamen ein (maximal 20 zeichen): \0A\00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [60 x i8] c"Bitte geben Sie Ihren Nachnamen ein (maximal 20 zeichen): \0A\00"
@.str.3 = [63 x i8] c"Bitte geben Sie Ihre Telefonnummer ein (maximal 15 zeichen): \0A\00"
@.str.4 = [12 x i8] c"Vorname: %s\00"
define i32 @main() {
%1 = alloca %struct.Person
%2 = alloca %struct.Person
%3 = getelementptr inbounds %struct.Person, %struct.Person* %1, i32 0, i32 0
store i32 1, i32* %3
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0))
%5 = getelementptr inbounds %struct.Person, %struct.Person* %1, i32 0, i32 1
%6 = getelementptr inbounds [20 x i8], [20 x i8]* %5, i64 0, i64 0
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %6)
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.2, i64 0, i64 0))
%9 = getelementptr inbounds %struct.Person, %struct.Person* %1, i32 0, i32 2
%10 = getelementptr inbounds [20 x i8], [20 x i8]* %9, i64 0, i64 0
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %10)
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.3, i64 0, i64 0))
%13 = getelementptr inbounds %struct.Person, %struct.Person* %1, i32 0, i32 3
%14 = getelementptr inbounds [15 x i8], [15 x i8]* %13, i64 0, i64 0
%15 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %14)
%16 = getelementptr inbounds %struct.Person, %struct.Person* %1, i32 0, i32 4
store i32 28, i32* %16
%17 = getelementptr inbounds %struct.Person, %struct.Person* %1, i32 0, i32 1
%18 = getelementptr inbounds [20 x i8], [20 x i8]* %17, i64 0, i64 0
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i8* %18)
ret i32 0
}

LLVM IR (-O2):
%struct.Person = type { i32, [20 x i8], [20 x i8], [15 x i8], i32 }
@.str.1 = [3 x i8] c"%s\00"
@.str.4 = [12 x i8] c"Vorname: %s\00"
@str = [58 x i8] c"Bitte geben Sie Ihren Vornamen ein (maximal 20 zeichen): \00"
@str.5 = [59 x i8] c"Bitte geben Sie Ihren Nachnamen ein (maximal 20 zeichen): \00"
@str.6 = [62 x i8] c"Bitte geben Sie Ihre Telefonnummer ein (maximal 15 zeichen): \00"
define i32 @main() {
%1 = alloca %struct.Person
%2 = bitcast %struct.Person* %1 to i8*
%3 = getelementptr inbounds %struct.Person, %struct.Person* %1, i64 0, i32 0
store i32 1, i32* %3
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @str, i64 0, i64 0))
%5 = getelementptr inbounds %struct.Person, %struct.Person* %1, i64 0, i32 1, i64 0
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %5)
%7 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.5, i64 0, i64 0))
%8 = getelementptr inbounds %struct.Person, %struct.Person* %1, i64 0, i32 2, i64 0
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %8)
%10 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @str.6, i64 0, i64 0))
%11 = getelementptr inbounds %struct.Person, %struct.Person* %1, i64 0, i32 3, i64 0
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %11)
%13 = getelementptr inbounds %struct.Person, %struct.Person* %1, i64 0, i32 4
store i32 28, i32* %13
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i8* %5)
ret i32 0
}