#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*/ getNumbers(double *, double *);
char *gettext(char *);
int /*<<< orphan*/ printf(char *);
double divi(double a, double b) {
  while (1) {
    getNumbers(&a, &b);
    if (b != 0) {
      break;
    } else {
      printf(gettext("\t\t\tType b different from 0 "));
    }
  }
  return (a / b);
}


x86 assembly (clang, -O0):
<divi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
lea    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1050 <getNumbers@plt>
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    116c <divi+0x3c>
jp     116c <divi+0x3c>
jmp    1171 <divi+0x41>
jmp    118a <divi+0x5a>
lea    0xe88(%rip),%rdi
call   1030 <gettext@plt>
mov    %rax,%rdi
call   1040 <printf@plt>
jmp    1142 <divi+0x12>
movsd  -0x8(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<divi>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
movsd  %xmm0,0x8(%rsp)
movsd  %xmm1,(%rsp)
lea    0x8(%rsp),%rdi
mov    %rsp,%rsi
call   1050 <getNumbers@plt>
movsd  (%rsp),%xmm1
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm1
jne    11ac <divi+0x7c>
jp     11ac <divi+0x7c>
lea    0xe97(%rip),%r14
lea    0x8(%rsp),%r15
mov    %rsp,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1030 <gettext@plt>
mov    %rax,%rdi
call   1040 <printf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1050 <getNumbers@plt>
xorpd  %xmm0,%xmm0
movsd  (%rsp),%xmm1
ucomisd %xmm0,%xmm1
jne    11ac <divi+0x7c>
jnp    1180 <divi+0x50>
movsd  0x8(%rsp),%xmm0
divsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [28 x i8] c"\09\09\09Type b different from 0 \00"
define double @divi(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
br label %5
5: ; preds = %2, %13
%6 = call i32 @getNumbers(double* %3, double* %4)
%7 = load double, double* %4
%8 = fcmp une double %7, 0.000000e+00
br i1 %8, label %9, label %10
9: ; preds = %5
br label %14
10: ; preds = %5
%11 = call i8* @gettext(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%12 = call i32 @printf(i8* %11)
br label %13
13: ; preds = %10
br label %5
14: ; preds = %9
%15 = load double, double* %3
%16 = load double, double* %4
%17 = fdiv double %15, %16
ret double %17
}

LLVM IR (-O2):
@.str = [28 x i8] c"\09\09\09Type b different from 0 \00"
define double @divi(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = call i32 @getNumbers(double* %3, double* %4)
%6 = load double, double* %4
%7 = fcmp une double %6, 0.000000e+00
br i1 %7, label %14, label %8
8: ; preds = %2, %8
%9 = call i8* @gettext(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @printf(i8* dereferenceable(1) %9)
%11 = call i32 @getNumbers(double* %3, double* %4)
%12 = load double, double* %4
%13 = fcmp une double %12, 0.000000e+00
br i1 %13, label %14, label %8
14: ; preds = %8, %2
%15 = phi double [ %6, %2 ], [ %12, %8 ]
%16 = load double, double* %3
%17 = fdiv double %16, %15
ret double %17
}