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


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   1060 <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   1050 <conversionMPX@plt>
movss  %xmm0,-0x24(%rbp)
movss  -0x24(%rbp),%xmm0
movss  -0x20(%rbp),%xmm1
lea    0xe59(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
call   1060 <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   1050 <conversionMPX@plt>
lea    0xe7c(%rip),%rdi
movss  0xc(%rsp),%xmm1
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [54 x i8] c" Pression : %f kPa \0A Temperature de la CTN: %.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
store i32 %0, i32* %3
store i8** %1, i8*** %4
%10 = load i32, i32* %3
%11 = load i8**, i8*** %4
%12 = call i32 @PressionCTN(i32 %10, i8** %11)
store i32 %12, i32* %5
%13 = load i32, i32* %5
%14 = sdiv i32 %13, 1000
store i32 %14, i32* %7
%15 = load i32, i32* %5
%16 = load i32, i32* %7
%17 = mul nsw i32 %16, 1000
%18 = srem i32 %15, %17
store i32 %18, i32* %6
%19 = load i32, i32* %7
%20 = call float @conversionCTN(i32 %19)
store float %20, float* %8
%21 = load i32, i32* %6
%22 = call float @conversionMPX(i32 %21)
store float %22, float* %9
%23 = load float, float* %9
%24 = load float, float* %8
%25 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0), float %23, float %24)
ret i32 0
}

LLVM IR (-O2):
@.str = [54 x i8] c" Pression : %f kPa \0A Temperature de la CTN: %.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 = tail call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0), float %8, float %7)
ret i32 0
}