#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 char_to_int(char);
int delta(int, int);
int /*<<< orphan*/ exchange(int, int);
int /*<<< orphan*/ exchange2(int *, int *);
int /*<<< orphan*/ printf(char *, double, ...);
int main() {
  int i = 0;
  int a = 5;
  int b = 7;
  char c = 'X';
  int d = 75;
  double e = 0.0007;
  int result = delta(a, b);
  printf("Der Unterschied zwischen %d und %d beträgt %d\n", a, b, delta(a, b));
  exchange(a, b);
  printf("Der Unterschied zwischen %d und %d beträgt %d\n", a, b, delta(a, b));
  exchange2(&a, &b);
  printf("Der Unterschied zwischen %d und %d beträgt %d\n", a, b, delta(a, b));
  printf("Das Zeichen %c hat den Wert %d\n", c, char_to_int(c));
  printf("Die Zahl %d gehört zu Zeichen %c\n", d, d);
  printf("%.3f\n", e);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x5,-0xc(%rbp)
movl   $0x7,-0x10(%rbp)
movb   $0x58,-0x11(%rbp)
movl   $0x4b,-0x18(%rbp)
movabs $0x3f46f0068db8bac7,%rax
f0 46 3f
mov    %rax,-0x20(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
call   1030 <delta@plt>
mov    %eax,-0x24(%rbp)
mov    -0xc(%rbp),%edi
cvtsi2sd %edi,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x10(%rbp),%esi
mov    %esi,-0x5c(%rbp)
call   1030 <delta@plt>
movsd  -0x68(%rbp),%xmm0
mov    -0x5c(%rbp),%esi
mov    %eax,%edx
lea    0xe3d(%rip),%rdi
mov    %rdi,-0x48(%rbp)
mov    $0x1,%al
mov    %al,-0x31(%rbp)
call   1040 <printf@plt>
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
call   1070 <exchange@plt>
mov    -0xc(%rbp),%edi
cvtsi2sd %edi,%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x10(%rbp),%esi
mov    %esi,-0x4c(%rbp)
call   1030 <delta@plt>
movsd  -0x58(%rbp),%xmm0
mov    -0x4c(%rbp),%esi
mov    -0x48(%rbp),%rdi
mov    %eax,%edx
mov    -0x31(%rbp),%al
call   1040 <printf@plt>
lea    -0xc(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1050 <exchange2@plt>
mov    -0xc(%rbp),%edi
cvtsi2sd %edi,%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x10(%rbp),%esi
mov    %esi,-0x38(%rbp)
call   1030 <delta@plt>
mov    -0x48(%rbp),%rdi
movsd  -0x40(%rbp),%xmm0
mov    -0x38(%rbp),%esi
mov    %eax,%edx
mov    -0x31(%rbp),%al
call   1040 <printf@plt>
movsbl -0x11(%rbp),%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsbl -0x11(%rbp),%edi
call   1060 <char_to_int@plt>
movsd  -0x30(%rbp),%xmm0
mov    %eax,%esi
lea    0xdc9(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
cvtsi2sdl -0x18(%rbp),%xmm0
mov    -0x18(%rbp),%esi
lea    0xdd3(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  -0x20(%rbp),%xmm0
lea    0xde3(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
sub    $0x18,%rsp
movl   $0x5,0xc(%rsp)
movl   $0x7,0x8(%rsp)
mov    $0x5,%edi
mov    $0x7,%esi
call   1030 <delta@plt>
mov    $0x5,%edi
mov    $0x7,%esi
call   1030 <delta@plt>
lea    0xe95(%rip),%rbx
movsd  0xe6d(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x7,%esi
mov    %eax,%edx
mov    $0x1,%al
call   1040 <printf@plt>
mov    $0x5,%edi
mov    $0x7,%esi
call   1070 <exchange@plt>
mov    $0x5,%edi
mov    $0x7,%esi
call   1030 <delta@plt>
mov    %rbx,%rdi
movsd  0xe33(%rip),%xmm0
mov    $0x7,%esi
mov    %eax,%edx
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xc(%rsp),%rdi
lea    0x8(%rsp),%rsi
call   1050 <exchange2@plt>
mov    0xc(%rsp),%edi
xorps  %xmm0,%xmm0
cvtsi2sd %edi,%xmm0
movsd  %xmm0,0x10(%rsp)
mov    0x8(%rsp),%ebp
mov    %ebp,%esi
call   1030 <delta@plt>
mov    %rbx,%rdi
movsd  0x10(%rsp),%xmm0
mov    %ebp,%esi
mov    %eax,%edx
mov    $0x1,%al
call   1040 <printf@plt>
mov    $0x58,%edi
call   1060 <char_to_int@plt>
lea    0xe25(%rip),%rdi
movsd  0xdd5(%rip),%xmm0
mov    %eax,%esi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xe2d(%rip),%rdi
movsd  0xdc5(%rip),%xmm0
mov    $0x4b,%esi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xe35(%rip),%rdi
movsd  0xdb2(%rip),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [48 x i8] c"Der Unterschied zwischen %d und %d betr\C3\A4gt %d\0A\00"
@.str.1 = [32 x i8] c"Das Zeichen %c hat den Wert %d\0A\00"
@.str.2 = [35 x i8] c"Die Zahl %d geh\C3\B6rt zu Zeichen %c\0A\00"
@.str.3 = [6 x i8] c"%.3f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8
%6 = alloca i32
%7 = alloca double
%8 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
store i32 5, i32* %3
store i32 7, i32* %4
store i8 88, i8* %5
store i32 75, i32* %6
store double 7.000000e-04, double* %7
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = call i32 @delta(i32 %9, i32 %10)
store i32 %11, i32* %8
%12 = load i32, i32* %3
%13 = sitofp i32 %12 to double
%14 = load i32, i32* %4
%15 = load i32, i32* %3
%16 = load i32, i32* %4
%17 = call i32 @delta(i32 %15, i32 %16)
%18 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), double %13, i32 %14, i32 %17)
%19 = load i32, i32* %3
%20 = load i32, i32* %4
%21 = call i32 @exchange(i32 %19, i32 %20)
%22 = load i32, i32* %3
%23 = sitofp i32 %22 to double
%24 = load i32, i32* %4
%25 = load i32, i32* %3
%26 = load i32, i32* %4
%27 = call i32 @delta(i32 %25, i32 %26)
%28 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), double %23, i32 %24, i32 %27)
%29 = call i32 @exchange2(i32* %3, i32* %4)
%30 = load i32, i32* %3
%31 = sitofp i32 %30 to double
%32 = load i32, i32* %4
%33 = load i32, i32* %3
%34 = load i32, i32* %4
%35 = call i32 @delta(i32 %33, i32 %34)
%36 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), double %31, i32 %32, i32 %35)
%37 = load i8, i8* %5
%38 = sitofp i8 %37 to double
%39 = load i8, i8* %5
%40 = call i32 @char_to_int(i8 signext %39)
%41 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), double %38, i32 %40)
%42 = load i32, i32* %6
%43 = sitofp i32 %42 to double
%44 = load i32, i32* %6
%45 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), double %43, i32 %44)
%46 = load double, double* %7
%47 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), double %46)
ret i32 0
}

LLVM IR (-O2):
@.str = [48 x i8] c"Der Unterschied zwischen %d und %d betr\C3\A4gt %d\0A\00"
@.str.1 = [32 x i8] c"Das Zeichen %c hat den Wert %d\0A\00"
@.str.2 = [35 x i8] c"Die Zahl %d geh\C3\B6rt zu Zeichen %c\0A\00"
@.str.3 = [6 x i8] c"%.3f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
store i32 5, i32* %1
%4 = bitcast i32* %2 to i8*
store i32 7, i32* %2
%5 = tail call i32 @delta(i32 5, i32 7)
%6 = tail call i32 @delta(i32 5, i32 7)
%7 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), double 5.000000e+00, i32 7, i32 %6)
%8 = tail call i32 @exchange(i32 5, i32 7)
%9 = tail call i32 @delta(i32 5, i32 7)
%10 = tail call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), double 5.000000e+00, i32 7, i32 %9)
%11 = call i32 @exchange2(i32* %1, i32* %2)
%12 = load i32, i32* %1
%13 = sitofp i32 %12 to double
%14 = load i32, i32* %2
%15 = call i32 @delta(i32 %12, i32 %14)
%16 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), double %13, i32 %14, i32 %15)
%17 = call i32 @char_to_int(i8 signext 88)
%18 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), double 8.800000e+01, i32 %17)
%19 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), double 7.500000e+01, i32 75)
%20 = call i32 (i8*, double, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), double 7.000000e-04)
ret i32 0
}