void main() {
  float x;
  printf("Informe o valor de X: ");
  scanf("%f", &x);
  x = (sqrt(x)) + (x / 2) + (pow(x, x));
  printf("O valor de X na funcao eh: %.2f\n", x);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xeb5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xebe(%rip),%rdi
lea    -0x4(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
call   1060 <sqrt@plt>
movss  -0x4(%rbp),%xmm1
movss  0xe7d(%rip),%xmm2
divss  %xmm2,%xmm1
cvtss2sd %xmm1,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x4(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
call   1050 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe4e(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xeb9(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xec2(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
movss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     117f <main+0x3f>
sqrtsd %xmm0,%xmm0
jmp    1184 <main+0x44>
call   1060 <sqrt@plt>
movss  0xc(%rsp),%xmm1
movss  0xe6e(%rip),%xmm2
mulss  %xmm1,%xmm2
cvtss2sd %xmm2,%xmm2
addsd  %xmm0,%xmm2
movsd  %xmm2,0x10(%rsp)
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
movaps %xmm0,%xmm1
call   1050 <pow@plt>
addsd  0x10(%rsp),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0xc(%rsp)
cvtss2sd %xmm0,%xmm0
lea    0xe50(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [23 x i8] c"Informe o valor de X: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [33 x i8] c"O valor de X na funcao eh: %.2f\0A\00"
define void @main() {
%1 = alloca float
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%4 = load float, float* %1
%5 = fpext float %4 to double
%6 = call double @sqrt(double %5)
%7 = load float, float* %1
%8 = fdiv float %7, 2.000000e+00
%9 = fpext float %8 to double
%10 = fadd double %6, %9
%11 = load float, float* %1
%12 = fpext float %11 to double
%13 = load float, float* %1
%14 = fpext float %13 to double
%15 = call double @pow(double %12, double %14)
%16 = fadd double %10, %15
%17 = fptrunc double %16 to float
store float %17, float* %1
%18 = load float, float* %1
%19 = fpext float %18 to double
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0), double %19)
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"Informe o valor de X: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [33 x i8] c"O valor de X na funcao eh: %.2f\0A\00"
define void @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%5 = load float, float* %1
%6 = fpext float %5 to double
%7 = call double @sqrt(double %6)
%8 = load float, float* %1
%9 = fmul float %8, 5.000000e-01
%10 = fpext float %9 to double
%11 = fadd double %7, %10
%12 = fpext float %8 to double
%13 = call double @pow(double %12, double %12)
%14 = fadd double %13, %11
%15 = fptrunc double %14 to float
store float %15, float* %1
%16 = fpext float %15 to double
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0), double %16)
ret void
}