#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 PressionCTN(int, char **);
float conversionCTN(int);
float conversionMPX(int);
int /*<<< orphan*/ printf(char *, float, ...);
float temperature_DS18B20();
int main(int argc, char *argv[]) {
  int retour, var_pression, var_temperature;
  float temp, pres, tempDS18B20;
  retour = PressionCTN(argc, argv);
  var_temperature = retour / 1000;
  var_pression = retour % (var_temperature * 1000);
  temp = conversionCTN(var_temperature);
  pres = conversionMPX(var_pression);
  printf("\n Pression : %f kPa \n Temperature de la CTN: %.2f °C\n", pres,
         temp);
  tempDS18B20 = temperature_DS18B20();
  printf(" \n Temperature du DS18B20: %.2f °C\n", tempDS18B20);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1070 <PressionCTN@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %eax,-0x1c(%rbp)
mov    -0x14(%rbp),%eax
imul   $0x3e8,-0x1c(%rbp),%ecx
cltd
idiv   %ecx
mov    %edx,-0x18(%rbp)
mov    -0x1c(%rbp),%edi
call   1030 <conversionCTN@plt>
movss  %xmm0,-0x20(%rbp)
mov    -0x18(%rbp),%edi
call   1060 <conversionMPX@plt>
movss  %xmm0,-0x24(%rbp)
movss  -0x24(%rbp),%xmm0
movss  -0x20(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xe45(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <temperature_DS18B20@plt>
movss  %xmm0,-0x28(%rbp)
movss  -0x28(%rbp),%xmm0
lea    0xe5d(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
call   1070 <PressionCTN@plt>
cltq
imul   $0x10624dd3,%rax,%rdi
mov    %rdi,%rcx
shr    $0x3f,%rcx
sar    $0x26,%rdi
add    %ecx,%edi
imul   $0x3e8,%edi,%ecx
cltd
idiv   %ecx
mov    %edx,%ebx
call   1030 <conversionCTN@plt>
movss  %xmm0,0xc(%rsp)
mov    %ebx,%edi
call   1060 <conversionMPX@plt>
movss  0xc(%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xe62(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <temperature_DS18B20@plt>
lea    0xe84(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [55 x i8] c"\0A Pression : %f kPa \0A Temperature de la CTN: %.2f \C2\B0C\0A\00"
@.str.1 = [37 x i8] c" \0A Temperature du DS18B20: %.2f \C2\B0C\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca float
%9 = alloca float
%10 = alloca float
store i32 %0, i32* %3
store i8** %1, i8*** %4
%11 = load i32, i32* %3
%12 = load i8**, i8*** %4
%13 = call i32 @PressionCTN(i32 %11, i8** %12)
store i32 %13, i32* %5
%14 = load i32, i32* %5
%15 = sdiv i32 %14, 1000
store i32 %15, i32* %7
%16 = load i32, i32* %5
%17 = load i32, i32* %7
%18 = mul nsw i32 %17, 1000
%19 = srem i32 %16, %18
store i32 %19, i32* %6
%20 = load i32, i32* %7
%21 = call float @conversionCTN(i32 %20)
store float %21, float* %8
%22 = load i32, i32* %6
%23 = call float @conversionMPX(i32 %22)
store float %23, float* %9
%24 = load float, float* %9
%25 = load float, float* %8
%26 = fpext float %25 to double
%27 = call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0), float %24, double %26)
%28 = call float (...) @temperature_DS18B20()
store float %28, float* %10
%29 = load float, float* %10
%30 = call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0), float %29)
ret i32 0
}

LLVM IR (-O2):
@.str = [55 x i8] c"\0A Pression : %f kPa \0A Temperature de la CTN: %.2f \C2\B0C\0A\00"
@.str.1 = [37 x i8] c" \0A Temperature du DS18B20: %.2f \C2\B0C\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @PressionCTN(i32 %0, i8** %1)
%4 = sdiv i32 %3, 1000
%5 = mul nsw i32 %4, 1000
%6 = srem i32 %3, %5
%7 = tail call float @conversionCTN(i32 %4)
%8 = tail call float @conversionMPX(i32 %6)
%9 = fpext float %7 to double
%10 = tail call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0), float %8, double %9)
%11 = tail call float (...) @temperature_DS18B20()
%12 = tail call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0), float %11)
ret i32 0
}