#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 */
double fmod(double, double);
char *gettext(char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, double *);
double Fmod(double a, double b, double resultado) {
  printf(gettext("Enter the divisor: "));
  scanf("%lf", &a);
  printf(gettext("Enter the dividend: "));
  scanf("%lf", &b);
  resultado = fmod(a, b);
  printf(gettext("Residue of"));
  printf("%f / %f", a, b);
  printf(gettext("is"));
  printf("%lf \n", resultado);
  return (resultado);
}


x86 assembly (clang, -O0):
<Fmod>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
lea    0xea2(%rip),%rdi
call   1030 <gettext@plt>
mov    %rax,%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xea0(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1060 <scanf@plt>
lea    0xe94(%rip),%rdi
call   1030 <gettext@plt>
mov    %rax,%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe7a(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1060 <scanf@plt>
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1050 <fmod@plt>
movsd  %xmm0,-0x18(%rbp)
lea    0xe6f(%rip),%rdi
call   1030 <gettext@plt>
mov    %rax,%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
lea    0xe5a(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
lea    0xe54(%rip),%rdi
call   1030 <gettext@plt>
mov    %rax,%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movsd  -0x18(%rbp),%xmm0
lea    0xe3c(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Fmod>:
push   %rbx
sub    $0x20,%rsp
movsd  %xmm0,0x10(%rsp)
movsd  %xmm1,0x8(%rsp)
lea    0xea8(%rip),%rdi
call   1030 <gettext@plt>
mov    %rax,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xea6(%rip),%rbx
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
call   1060 <scanf@plt>
lea    0xe96(%rip),%rdi
call   1030 <gettext@plt>
mov    %rax,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1060 <scanf@plt>
movsd  0x10(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
call   1050 <fmod@plt>
movsd  %xmm0,0x18(%rsp)
lea    0xe71(%rip),%rdi
call   1030 <gettext@plt>
mov    %rax,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movsd  0x10(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
lea    0xe5a(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
lea    0xe54(%rip),%rdi
call   1030 <gettext@plt>
mov    %rax,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe41(%rip),%rdi
movsd  0x18(%rsp),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
movsd  0x18(%rsp),%xmm0
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"Enter the divisor: \00"
@.str.1 = [4 x i8] c"%lf\00"
@.str.2 = [21 x i8] c"Enter the dividend: \00"
@.str.3 = [11 x i8] c"Residue of\00"
@.str.4 = [8 x i8] c"%f / %f\00"
@.str.5 = [3 x i8] c"is\00"
@.str.6 = [6 x i8] c"%lf \0A\00"
define double @Fmod(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = call i8* @gettext(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%8 = call i32 (i8*, ...) @printf(i8* %7)
%9 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %4)
%10 = call i8* @gettext(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* %10)
%12 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %5)
%13 = load double, double* %4
%14 = load double, double* %5
%15 = call double @fmod(double %13, double %14)
store double %15, double* %6
%16 = call i8* @gettext(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0))
%17 = call i32 (i8*, ...) @printf(i8* %16)
%18 = load double, double* %4
%19 = load double, double* %5
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), double %18, double %19)
%21 = call i8* @gettext(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
%22 = call i32 (i8*, ...) @printf(i8* %21)
%23 = load double, double* %6
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), double %23)
%25 = load double, double* %6
ret double %25
}

LLVM IR (-O2):
@.str = [20 x i8] c"Enter the divisor: \00"
@.str.1 = [4 x i8] c"%lf\00"
@.str.2 = [21 x i8] c"Enter the dividend: \00"
@.str.3 = [11 x i8] c"Residue of\00"
@.str.4 = [8 x i8] c"%f / %f\00"
@.str.5 = [3 x i8] c"is\00"
@.str.6 = [6 x i8] c"%lf \0A\00"
define double @Fmod(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
store double %0, double* %4
store double %1, double* %5
%6 = tail call i8* @gettext(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %6)
%8 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %4)
%9 = call i8* @gettext(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) %9)
%11 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %5)
%12 = load double, double* %4
%13 = load double, double* %5
%14 = call double @fmod(double %12, double %13)
%15 = call i8* @gettext(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0))
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) %15)
%17 = load double, double* %4
%18 = load double, double* %5
%19 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), double %17, double %18)
%20 = call i8* @gettext(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
%21 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) %20)
%22 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), double %14)
ret double %14
}