#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 */
float maior(float, float);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, float *);
int main(int argc, const char *argv[]) {
  float prime, sege, func;
  printf("Digite o primeiro valor» \n");
  scanf("%f", &prime);
  printf("Digite o segundo valor» \n");
  scanf("%f", &sege);
  func = maior(prime, sege);
  printf("O maior número é %.2f.\n", func);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec8(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1050 <scanf@plt>
lea    0xebb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeaa(%rip),%rdi
lea    -0x18(%rbp),%rsi
call   1050 <scanf@plt>
movss  -0x14(%rbp),%xmm0
movss  -0x18(%rbp),%xmm1
call   1040 <maior@plt>
movss  %xmm0,-0x1c(%rbp)
movss  -0x1c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe9b(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <puts@plt>
lea    0xea8(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1060 <scanf@plt>
lea    0xecc(%rip),%rdi
call   1030 <puts@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1060 <scanf@plt>
movss  0xc(%rsp),%xmm0
movss  0x8(%rsp),%xmm1
call   1050 <maior@plt>
cvtss2sd %xmm0,%xmm0
lea    0xe69(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [28 x i8] c"Digite o primeiro valor\C2\BB \0A\00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [27 x i8] c"Digite o segundo valor\C2\BB \0A\00"
@.str.3 = [26 x i8] c"O maior n\C3\BAmero \C3\A9 %.2f.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca float
%6 = alloca float
%7 = alloca float
store i32 %0, i32* %3
store i8** %1, i8*** %4
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %5)
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %6)
%12 = load float, float* %5
%13 = load float, float* %6
%14 = call float @maior(float %12, float %13)
store float %14, float* %7
%15 = load float, float* %7
%16 = fpext float %15 to double
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0), double %16)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%f\00"
@.str.3 = [26 x i8] c"O maior n\C3\BAmero \C3\A9 %.2f.\0A\00"
@str = [27 x i8] c"Digite o primeiro valor\C2\BB \00"
@str.4 = [26 x i8] c"Digite o segundo valor\C2\BB \00"
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*
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %3)
%9 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.4, i64 0, i64 0))
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %4)
%11 = load float, float* %3
%12 = load float, float* %4
%13 = call float @maior(float %11, float %12)
%14 = fpext float %13 to double
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0), double %14)
ret i32 0
}