#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 *, unsigned char);
int /*<<< orphan*/ setHygrometrie(unsigned char *, float *);
int /*<<< orphan*/ setPoids(unsigned char *, float *);
int /*<<< orphan*/ setTemperature(unsigned char *, float *);
void sendTrame(float *ptTest, float *ptTest2, float *ptTest3) {
  int i = 0;
  unsigned char trame[36];
  trame[0] = 'A';
  trame[1] = 'T';
  trame[2] = '$';
  trame[3] = 'S';
  trame[4] = 'F';
  trame[5] = '=';
  trame[6] = ' ';
  trame[15] = ' ';
  trame[24] = ' ';
  trame[33] = '\n';
  trame[34] = '\r';
  setPoids(trame, ptTest);
  setTemperature(trame, ptTest2);
  setHygrometrie(trame, ptTest3);
  i = 0;
  while (i < 34) {
    if ((i <= 6) || (i == 15) || (i == 24) || (i >= 33)) {
      printf("%c", trame[i]);
    }
    if (((i >= 7) && (i < 11)) || ((i >= 16) && (i < 20)) ||
        ((i >= 25) && (i < 29))) {
      printf("%2.2X", trame[i]);
    }
    i++;
  }
}


x86 assembly (clang, -O0):
<sendTrame>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movb   $0x41,-0x40(%rbp)
movb   $0x54,-0x3f(%rbp)
movb   $0x24,-0x3e(%rbp)
movb   $0x53,-0x3d(%rbp)
movb   $0x46,-0x3c(%rbp)
movb   $0x3d,-0x3b(%rbp)
movb   $0x20,-0x3a(%rbp)
movb   $0x20,-0x31(%rbp)
movb   $0x20,-0x28(%rbp)
movb   $0xa,-0x1f(%rbp)
movb   $0xd,-0x1e(%rbp)
lea    -0x40(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <setPoids@plt>
lea    -0x40(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <setTemperature@plt>
lea    -0x40(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1060 <setHygrometrie@plt>
movl   $0x0,-0x1c(%rbp)
cmpl   $0x22,-0x1c(%rbp)
jge    125b <sendTrame+0x11b>
cmpl   $0x6,-0x1c(%rbp)
jle    11e7 <sendTrame+0xa7>
cmpl   $0xf,-0x1c(%rbp)
je     11e7 <sendTrame+0xa7>
cmpl   $0x18,-0x1c(%rbp)
je     11e7 <sendTrame+0xa7>
cmpl   $0x21,-0x1c(%rbp)
jl     11fc <sendTrame+0xbc>
movslq -0x1c(%rbp),%rax
lea    0xe0e(%rip),%rdi
movzbl -0x40(%rbp,%rax,1),%esi
call   1040 <printf@plt>
cmpl   $0x7,-0x1c(%rbp)
jl     1210 <sendTrame+0xd0>
cmpl   $0xb,-0x1c(%rbp)
jl     1238 <sendTrame+0xf8>
cmpl   $0x10,-0x1c(%rbp)
jl     1224 <sendTrame+0xe4>
cmpl   $0x14,-0x1c(%rbp)
jl     1238 <sendTrame+0xf8>
cmpl   $0x19,-0x1c(%rbp)
jl     124d <sendTrame+0x10d>
cmpl   $0x1d,-0x1c(%rbp)
jge    124d <sendTrame+0x10d>
movslq -0x1c(%rbp),%rax
lea    0xdc0(%rip),%rdi
movzbl -0x40(%rbp,%rax,1),%esi
call   1040 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    11b5 <sendTrame+0x75>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sendTrame>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x30,%rsp
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rsi
movl   $0x53245441,(%rsp)
movw   $0x3d46,0x4(%rsp)
movb   $0x20,0x6(%rsp)
movb   $0x20,0xf(%rsp)
movb   $0x20,0x18(%rsp)
movw   $0xd0a,0x21(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <setPoids@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1050 <setTemperature@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1060 <setHygrometrie@plt>
xor    %ebx,%ebx
lea    0xe60(%rip),%r14
mov    $0x1e000780,%r12d
movabs $0x20100807f,%rbp
lea    0xe46(%rip),%r15
nopw   0x0(%rax,%rax,1)
cmp    $0x21,%ebx
ja     11d9 <sendTrame+0x99>
mov    %ebx,%eax
bt     %rax,%rbp
jae    11d9 <sendTrame+0x99>
movzbl (%rsp,%rbx,1),%esi
mov    %r15,%rdi
call   1040 <printf@plt>
mov    %ebx,%eax
and    $0x7ffffffc,%eax
cmp    $0x10,%eax
je     11f0 <sendTrame+0xb0>
cmp    $0x1c,%ebx
ja     11fc <sendTrame+0xbc>
bt     %ebx,%r12d
jae    11fc <sendTrame+0xbc>
movzbl (%rsp,%rbx,1),%esi
mov    %r14,%rdi
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    $0x22,%rbx
jne    11c0 <sendTrame+0x80>
add    $0x30,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%c\00"
@.str.1 = [6 x i8] c"%2.2X\00"
define void @sendTrame(float* %0, float* %1, float* %2) {
%4 = alloca float*
%5 = alloca float*
%6 = alloca float*
%7 = alloca i32
%8 = alloca [36 x i8]
store float* %0, float** %4
store float* %1, float** %5
store float* %2, float** %6
store i32 0, i32* %7
%9 = getelementptr inbounds [36 x i8], [36 x i8]* %8, i64 0, i64 0
store i8 65, i8* %9
%10 = getelementptr inbounds [36 x i8], [36 x i8]* %8, i64 0, i64 1
store i8 84, i8* %10
%11 = getelementptr inbounds [36 x i8], [36 x i8]* %8, i64 0, i64 2
store i8 36, i8* %11
%12 = getelementptr inbounds [36 x i8], [36 x i8]* %8, i64 0, i64 3
store i8 83, i8* %12
%13 = getelementptr inbounds [36 x i8], [36 x i8]* %8, i64 0, i64 4
store i8 70, i8* %13
%14 = getelementptr inbounds [36 x i8], [36 x i8]* %8, i64 0, i64 5
store i8 61, i8* %14
%15 = getelementptr inbounds [36 x i8], [36 x i8]* %8, i64 0, i64 6
store i8 32, i8* %15
%16 = getelementptr inbounds [36 x i8], [36 x i8]* %8, i64 0, i64 15
store i8 32, i8* %16
%17 = getelementptr inbounds [36 x i8], [36 x i8]* %8, i64 0, i64 24
store i8 32, i8* %17
%18 = getelementptr inbounds [36 x i8], [36 x i8]* %8, i64 0, i64 33
store i8 10, i8* %18
%19 = getelementptr inbounds [36 x i8], [36 x i8]* %8, i64 0, i64 34
store i8 13, i8* %19
%20 = getelementptr inbounds [36 x i8], [36 x i8]* %8, i64 0, i64 0
%21 = load float*, float** %4
%22 = call i32 @setPoids(i8* %20, float* %21)
%23 = getelementptr inbounds [36 x i8], [36 x i8]* %8, i64 0, i64 0
%24 = load float*, float** %5
%25 = call i32 @setTemperature(i8* %23, float* %24)
%26 = getelementptr inbounds [36 x i8], [36 x i8]* %8, i64 0, i64 0
%27 = load float*, float** %6
%28 = call i32 @setHygrometrie(i8* %26, float* %27)
store i32 0, i32* %7
br label %29
29: ; preds = %74, %3
%30 = load i32, i32* %7
%31 = icmp slt i32 %30, 34
br i1 %31, label %32, label %77
32: ; preds = %29
%33 = load i32, i32* %7
%34 = icmp sle i32 %33, 6
br i1 %34, label %44, label %35
35: ; preds = %32
%36 = load i32, i32* %7
%37 = icmp eq i32 %36, 15
br i1 %37, label %44, label %38
38: ; preds = %35
%39 = load i32, i32* %7
%40 = icmp eq i32 %39, 24
br i1 %40, label %44, label %41
41: ; preds = %38
%42 = load i32, i32* %7
%43 = icmp sge i32 %42, 33
br i1 %43, label %44, label %50
44: ; preds = %41, %38, %35, %32
%45 = load i32, i32* %7
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds [36 x i8], [36 x i8]* %8, i64 0, i64 %46
%48 = load i8, i8* %47
%49 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 zeroext %48)
br label %50
50: ; preds = %44, %41
%51 = load i32, i32* %7
%52 = icmp sge i32 %51, 7
br i1 %52, label %53, label %56
53: ; preds = %50
%54 = load i32, i32* %7
%55 = icmp slt i32 %54, 11
br i1 %55, label %68, label %56
56: ; preds = %53, %50
%57 = load i32, i32* %7
%58 = icmp sge i32 %57, 16
br i1 %58, label %59, label %62
59: ; preds = %56
%60 = load i32, i32* %7
%61 = icmp slt i32 %60, 20
br i1 %61, label %68, label %62
62: ; preds = %59, %56
%63 = load i32, i32* %7
%64 = icmp sge i32 %63, 25
br i1 %64, label %65, label %74
65: ; preds = %62
%66 = load i32, i32* %7
%67 = icmp slt i32 %66, 29
br i1 %67, label %68, label %74
68: ; preds = %65, %59, %53
%69 = load i32, i32* %7
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds [36 x i8], [36 x i8]* %8, i64 0, i64 %70
%72 = load i8, i8* %71
%73 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8 zeroext %72)
br label %74
74: ; preds = %68, %65, %62
%75 = load i32, i32* %7
%76 = add nsw i32 %75, 1
store i32 %76, i32* %7
br label %29
77: ; preds = %29
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
@.str.1 = [6 x i8] c"%2.2X\00"
define void @sendTrame(float* %0, float* %1, float* %2) {
%4 = alloca [36 x i8]
%5 = getelementptr inbounds [36 x i8], [36 x i8]* %4, i64 0, i64 0
store i8 65, i8* %5
%6 = getelementptr inbounds [36 x i8], [36 x i8]* %4, i64 0, i64 1
store i8 84, i8* %6
%7 = getelementptr inbounds [36 x i8], [36 x i8]* %4, i64 0, i64 2
store i8 36, i8* %7
%8 = getelementptr inbounds [36 x i8], [36 x i8]* %4, i64 0, i64 3
store i8 83, i8* %8
%9 = getelementptr inbounds [36 x i8], [36 x i8]* %4, i64 0, i64 4
store i8 70, i8* %9
%10 = getelementptr inbounds [36 x i8], [36 x i8]* %4, i64 0, i64 5
store i8 61, i8* %10
%11 = getelementptr inbounds [36 x i8], [36 x i8]* %4, i64 0, i64 6
store i8 32, i8* %11
%12 = getelementptr inbounds [36 x i8], [36 x i8]* %4, i64 0, i64 15
store i8 32, i8* %12
%13 = getelementptr inbounds [36 x i8], [36 x i8]* %4, i64 0, i64 24
store i8 32, i8* %13
%14 = getelementptr inbounds [36 x i8], [36 x i8]* %4, i64 0, i64 33
store i8 10, i8* %14
%15 = getelementptr inbounds [36 x i8], [36 x i8]* %4, i64 0, i64 34
store i8 13, i8* %15
%16 = call i32 @setPoids(i8* %5, float* %0)
%17 = call i32 @setTemperature(i8* %5, float* %1)
%18 = call i32 @setHygrometrie(i8* %5, float* %2)
br label %19
19: ; preds = %3, %34
%20 = phi i64 [ 0, %3 ], [ %35, %34 ]
%21 = trunc i64 %20 to i32
switch i32 %21, label %26 [
i32 33, label %22
i32 24, label %22
i32 15, label %22
i32 6, label %22
i32 5, label %22
i32 4, label %22
i32 3, label %22
i32 2, label %22
i32 1, label %22
i32 0, label %22
]
22: ; preds = %19, %19, %19, %19, %19, %19, %19, %19, %19, %19
%23 = getelementptr inbounds [36 x i8], [36 x i8]* %4, i64 0, i64 %20
%24 = load i8, i8* %23
%25 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 zeroext %24)
br label %26
26: ; preds = %19, %22
%27 = and i32 %21, 2147483644
%28 = icmp eq i32 %27, 16
br i1 %28, label %30, label %29
29: ; preds = %26
switch i32 %21, label %34 [
i32 28, label %30
i32 27, label %30
i32 26, label %30
i32 25, label %30
i32 10, label %30
i32 9, label %30
i32 8, label %30
i32 7, label %30
]
30: ; preds = %29, %29, %29, %29, %29, %29, %29, %29, %26
%31 = getelementptr inbounds [36 x i8], [36 x i8]* %4, i64 0, i64 %20
%32 = load i8, i8* %31
%33 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8 zeroext %32)
br label %34
34: ; preds = %29, %30
%35 = add nuw nsw i64 %20, 1
%36 = icmp eq i64 %35, 34
br i1 %36, label %37, label %19
37: ; preds = %34
ret void
}