#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 */
typedef int uint16_t;

/* Variables and functions */
int find_trailing_zero_num(int);
int find_trailing_zero_num2(int);
int /*<<< orphan*/ printf(char *, ...);
void print_factorial_zero_num(uint16_t num) {
  uint16_t zero_num = find_trailing_zero_num(num);
  uint16_t zero_num2 = find_trailing_zero_num2(num);
  printf("%d! has %d <-> %d trailing zeros.\n", num, zero_num, zero_num2);
  if (zero_num != zero_num2) {
    printf("----------------------ther must be something "
           "wrong!--------------------\n");
  }
}


x86 assembly (clang, -O0):
<print_factorial_zero_num>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <find_trailing_zero_num@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <find_trailing_zero_num2@plt>
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
lea    0xe9f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
je     1182 <print_factorial_zero_num+0x52>
lea    0xea8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_factorial_zero_num>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%ebx
call   1060 <find_trailing_zero_num@plt>
mov    %eax,%r14d
mov    %ebx,%edi
call   1050 <find_trailing_zero_num2@plt>
mov    %eax,%ebp
lea    0xea2(%rip),%rdi
mov    %ebx,%esi
mov    %r14d,%edx
mov    %eax,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
cmp    %ebp,%r14d
jne    1176 <print_factorial_zero_num+0x36>
pop    %rbx
pop    %r14
pop    %rbp
ret
lea    0xea6(%rip),%rdi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [35 x i8] c"%d! has %d <-> %d trailing zeros.\0A\00"
@.str.1 = [73 x i8] c"----------------------ther must be something wrong!--------------------\0A\00"
define void @print_factorial_zero_num(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = call i32 @find_trailing_zero_num(i32 %5)
store i32 %6, i32* %3
%7 = load i32, i32* %2
%8 = call i32 @find_trailing_zero_num2(i32 %7)
store i32 %8, i32* %4
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = load i32, i32* %4
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %10, i32 %11)
%13 = load i32, i32* %3
%14 = load i32, i32* %4
%15 = icmp ne i32 %13, %14
br i1 %15, label %16, label %18
16: ; preds = %1
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.1, i64 0, i64 0))
br label %18
18: ; preds = %16, %1
ret void
}

LLVM IR (-O2):
@.str = [35 x i8] c"%d! has %d <-> %d trailing zeros.\0A\00"
@str = [72 x i8] c"----------------------ther must be something wrong!--------------------\00"
define void @print_factorial_zero_num(i32 %0) {
%2 = tail call i32 @find_trailing_zero_num(i32 %0)
%3 = tail call i32 @find_trailing_zero_num2(i32 %0)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %2, i32 %3)
%5 = icmp eq i32 %2, %3
br i1 %5, label %8, label %6
6: ; preds = %1
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([72 x i8], [72 x i8]* @str, i64 0, i64 0))
br label %8
8: ; preds = %6, %1
ret void
}