#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 EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *, float, float);
int /*<<< orphan*/ troca(float *, float *);
int main(int argc, char *argv[]) {
  float x, y;
  x = 54;
  y = 43;
  printf("x= %f y= %f\n", x, y);
  troca(&x, &y);
  printf("x= %f y= %f\n", x, y);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movss  0xec6(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  0xeb5(%rip),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x14(%rbp),%xmm0
movss  -0x18(%rbp),%xmm1
lea    0xea7(%rip),%rdi
call   1030 <printf@plt>
lea    -0x14(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <troca@plt>
movss  -0x14(%rbp),%xmm0
movss  -0x18(%rbp),%xmm1
lea    0xe84(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e50(%rip),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movl   $0x42580000,0xc(%rsp)
42
movl   $0x422c0000,0x8(%rsp)
42
lea    0xecc(%rip),%rbx
movss  0xebc(%rip),%xmm0
movss  0xeb8(%rip),%xmm1
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xc(%rsp),%rdi
lea    0x8(%rsp),%rsi
call   1040 <troca@plt>
movss  0xc(%rsp),%xmm0
movss  0x8(%rsp),%xmm1
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    0x2e62(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"x= %f y= %f\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca float
%7 = alloca float
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store float 5.400000e+01, float* %6
store float 4.300000e+01, float* %7
%8 = load float, float* %6
%9 = load float, float* %7
%10 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), float %8, float %9)
%11 = call i32 @troca(float* %6, float* %7)
%12 = load float, float* %6
%13 = load float, float* %7
%14 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), float %12, float %13)
%15 = load i32, i32* @EXIT_SUCCESS
ret i32 %15
}

LLVM IR (-O2):
@.str = [13 x i8] c"x= %f y= %f\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca float
%4 = alloca float
%5 = bitcast float* %3 to i8*
%6 = bitcast float* %4 to i8*
store float 5.400000e+01, float* %3
store float 4.300000e+01, float* %4
%7 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), float 5.400000e+01, float 4.300000e+01)
%8 = call i32 @troca(float* %3, float* %4)
%9 = load float, float* %3
%10 = load float, float* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), float %9, float %10)
%12 = load i32, i32* @EXIT_SUCCESS
ret i32 %12
}