#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 */
struct tm {
  int tm_mday;
  int tm_mon;
  int tm_year;
  int tm_hour;
  int tm_min;
  int tm_sec;
};

/* Variables and functions */
int getpid();
int /*<<< orphan*/ printf(char *, ...);
int info(char **command, struct tm start) {
  printf("Shell von: %s %s\n", "Name", "MatNR");
  printf("PID: %i\n", getpid());
  printf("Läuft seit: %d.%d.%d %d:%d:%d Uhr\n", start.tm_mday, start.tm_mon + 1,
         start.tm_year + 1900, start.tm_hour, start.tm_min, start.tm_sec);
  return 1;
}


x86 assembly (clang, -O0):
<info>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    %rdi,-0x8(%rbp)
lea    0xec5(%rip),%rdi
lea    0xed0(%rip),%rsi
lea    0xece(%rip),%rdx
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,%esi
lea    0xebd(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
mov    0x4(%rax),%edx
add    $0x1,%edx
mov    0x8(%rax),%ecx
add    $0x76c,%ecx
mov    0xc(%rax),%r8d
mov    0x10(%rax),%r9d
mov    0x14(%rax),%eax
lea    0xe98(%rip),%rdi
mov    %eax,(%rsp)
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<info>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xee3(%rip),%rsi
lea    0xee1(%rip),%rdx
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <getpid@plt>
lea    0xed2(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x10(%rsp),%esi
mov    0x14(%rsp),%edx
mov    $0x76c,%ecx
add    0x18(%rsp),%ecx
add    $0x1,%edx
mov    0x1c(%rsp),%r8d
mov    0x20(%rsp),%r9d
mov    0x24(%rsp),%eax
mov    %eax,(%rsp)
lea    0xea6(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.tm = type { i32, i32, i32, i32, i32, i32 }
@.str = [18 x i8] c"Shell von: %s %s\0A\00"
@.str.1 = [5 x i8] c"Name\00"
@.str.2 = [6 x i8] c"MatNR\00"
@.str.3 = [9 x i8] c"PID: %i\0A\00"
@.str.4 = [36 x i8] c"L\C3\A4uft seit: %d.%d.%d %d:%d:%d Uhr\0A\00"
define i32 @info(i8** %0, %struct.tm* byval(%struct.tm) align 8 %1) {
%3 = alloca i8**
store i8** %0, i8*** %3
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 (...) @getpid()
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %5)
%7 = getelementptr inbounds %struct.tm, %struct.tm* %1, i32 0, i32 0
%8 = load i32, i32* %7
%9 = getelementptr inbounds %struct.tm, %struct.tm* %1, i32 0, i32 1
%10 = load i32, i32* %9
%11 = add nsw i32 %10, 1
%12 = getelementptr inbounds %struct.tm, %struct.tm* %1, i32 0, i32 2
%13 = load i32, i32* %12
%14 = add nsw i32 %13, 1900
%15 = getelementptr inbounds %struct.tm, %struct.tm* %1, i32 0, i32 3
%16 = load i32, i32* %15
%17 = getelementptr inbounds %struct.tm, %struct.tm* %1, i32 0, i32 4
%18 = load i32, i32* %17
%19 = getelementptr inbounds %struct.tm, %struct.tm* %1, i32 0, i32 5
%20 = load i32, i32* %19
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.4, i64 0, i64 0), i32 %8, i32 %11, i32 %14, i32 %16, i32 %18, i32 %20)
ret i32 1
}

LLVM IR (-O2):
%struct.tm = type { i32, i32, i32, i32, i32, i32 }
@.str = [18 x i8] c"Shell von: %s %s\0A\00"
@.str.1 = [5 x i8] c"Name\00"
@.str.2 = [6 x i8] c"MatNR\00"
@.str.3 = [9 x i8] c"PID: %i\0A\00"
@.str.4 = [36 x i8] c"L\C3\A4uft seit: %d.%d.%d %d:%d:%d Uhr\0A\00"
define i32 @info(i8** nocapture readnone %0, %struct.tm* nocapture byval(%struct.tm) align 8 %1) {
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 (...) @getpid()
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %4)
%6 = getelementptr inbounds %struct.tm, %struct.tm* %1, i64 0, i32 0
%7 = load i32, i32* %6
%8 = getelementptr inbounds %struct.tm, %struct.tm* %1, i64 0, i32 1
%9 = load i32, i32* %8
%10 = add nsw i32 %9, 1
%11 = getelementptr inbounds %struct.tm, %struct.tm* %1, i64 0, i32 2
%12 = load i32, i32* %11
%13 = add nsw i32 %12, 1900
%14 = getelementptr inbounds %struct.tm, %struct.tm* %1, i64 0, i32 3
%15 = load i32, i32* %14
%16 = getelementptr inbounds %struct.tm, %struct.tm* %1, i64 0, i32 4
%17 = load i32, i32* %16
%18 = getelementptr inbounds %struct.tm, %struct.tm* %1, i64 0, i32 5
%19 = load i32, i32* %18
%20 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.4, i64 0, i64 0), i32 %7, i32 %10, i32 %13, i32 %15, i32 %17, i32 %19)
ret i32 1
}