#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 *, double);
int /*<<< orphan*/ setbuf(int /*<<< orphan*/, int /*<<< orphan*/ *);
int /*<<< orphan*/ stdout;
int main(void) {
  setbuf(stdout, NULL);
  printf("5 + 3 ergibt: %i\n", 5 + 3);
  printf("10 * 10 ergibt: %i\n", 10 * 10);
  printf("10 / 3 ergibt als Int: %i\n", 10 / 3);
  printf("10 / 3 ergibt als Float: %f\n", 10.0 / 3);
  printf("10 / 3 ergibt als Double: %lf\n", 10.0 / 3);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <setbuf@plt>
lea    0xed8(%rip),%rdi
movsd  0xec8(%rip),%xmm0
call   1040 <printf@plt>
lea    0xed6(%rip),%rdi
movsd  0xeac(%rip),%xmm0
call   1040 <printf@plt>
lea    0xed6(%rip),%rdi
movsd  0xe90(%rip),%xmm0
call   1040 <printf@plt>
lea    0xedd(%rip),%rdi
movsd  0xe74(%rip),%xmm0
call   1040 <printf@plt>
lea    0xee6(%rip),%rdi
movsd  0xe60(%rip),%xmm0
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
call   1030 <setbuf@plt>
lea    0xee8(%rip),%rdi
movsd  0xec0(%rip),%xmm0
call   1040 <printf@plt>
lea    0xee6(%rip),%rdi
movsd  0xeb4(%rip),%xmm0
call   1040 <printf@plt>
lea    0xee6(%rip),%rdi
movsd  0xea8(%rip),%xmm0
call   1040 <printf@plt>
lea    0xeed(%rip),%rdi
movsd  0xe9c(%rip),%xmm0
call   1040 <printf@plt>
lea    0xef6(%rip),%rdi
movsd  0xe88(%rip),%xmm0
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [18 x i8] c"5 + 3 ergibt: %i\0A\00"
@.str.1 = [20 x i8] c"10 * 10 ergibt: %i\0A\00"
@.str.2 = [27 x i8] c"10 / 3 ergibt als Int: %i\0A\00"
@.str.3 = [29 x i8] c"10 / 3 ergibt als Float: %f\0A\00"
@.str.4 = [31 x i8] c"10 / 3 ergibt als Double: %lf\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @stdout
%3 = call i32 @setbuf(i32 %2, i32* null)
%4 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), double 8.000000e+00)
%5 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), double 1.000000e+02)
%6 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0), double 3.000000e+00)
%7 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0), double 0x400AAAAAAAAAAAAB)
%8 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.4, i64 0, i64 0), double 0x400AAAAAAAAAAAAB)
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [18 x i8] c"5 + 3 ergibt: %i\0A\00"
@.str.1 = [20 x i8] c"10 * 10 ergibt: %i\0A\00"
@.str.2 = [27 x i8] c"10 / 3 ergibt als Int: %i\0A\00"
@.str.3 = [29 x i8] c"10 / 3 ergibt als Float: %f\0A\00"
@.str.4 = [31 x i8] c"10 / 3 ergibt als Double: %lf\0A\00"
define i32 @main() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @setbuf(i32 %1, i32* null)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), double 8.000000e+00)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), double 1.000000e+02)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0), double 3.000000e+00)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0), double 0x400AAAAAAAAAAAAB)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.4, i64 0, i64 0), double 0x400AAAAAAAAAAAAB)
ret i32 0
}