#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*/ printf(char *, int, ...);
void output_print(int value, int status, int inside, int outside) {
  if (status == -1)
    printf("%d is prime\n", value);
  else if (outside == 1)
    printf("%d not possible to factor\n", inside);
  else if (inside == 1)
    printf("Sqrt of %d = %d\n", value, outside);
  else
    printf("    __\n%d \\/%d\n", outside, inside);
}


x86 assembly (clang, -O0):
<output_print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
cmpl   $0xffffffff,-0x8(%rbp)
jne    1144 <output_print+0x34>
mov    -0x4(%rbp),%esi
lea    0xec8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11a5 <output_print+0x95>
cmpl   $0x1,-0x10(%rbp)
jne    1164 <output_print+0x54>
mov    -0xc(%rbp),%esi
lea    0xeb5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11a0 <output_print+0x90>
cmpl   $0x1,-0xc(%rbp)
jne    1187 <output_print+0x77>
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%edx
lea    0xead(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    119b <output_print+0x8b>
mov    -0x10(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xea5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11a0 <output_print+0x90>
jmp    11a5 <output_print+0x95>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<output_print>:
mov    %edi,%eax
cmp    $0xffffffff,%esi
je     112c <output_print+0x1c>
cmp    $0x1,%ecx
jne    113c <output_print+0x2c>
lea    0xeea(%rip),%rdi
mov    %edx,%esi
xor    %eax,%eax
jmp    1030 <printf@plt>
lea    0xecd(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
jmp    1030 <printf@plt>
cmp    $0x1,%edx
jne    1153 <output_print+0x43>
lea    0xee0(%rip),%rdi
mov    %eax,%esi
mov    %ecx,%edx
xor    %eax,%eax
jmp    1030 <printf@plt>
lea    0xedf(%rip),%rdi
mov    %ecx,%esi
xor    %eax,%eax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"%d is prime\0A\00"
@.str.1 = [27 x i8] c"%d not possible to factor\0A\00"
@.str.2 = [17 x i8] c"Sqrt of %d = %d\0A\00"
@.str.3 = [16 x i8] c" __\0A%d \\/%d\0A\00"
define void @output_print(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %6
%10 = icmp eq i32 %9, -1
br i1 %10, label %11, label %14
11: ; preds = %4
%12 = load i32, i32* %5
%13 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %12)
br label %33
14: ; preds = %4
%15 = load i32, i32* %8
%16 = icmp eq i32 %15, 1
br i1 %16, label %17, label %20
17: ; preds = %14
%18 = load i32, i32* %7
%19 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i32 %18)
br label %32
20: ; preds = %14
%21 = load i32, i32* %7
%22 = icmp eq i32 %21, 1
br i1 %22, label %23, label %27
23: ; preds = %20
%24 = load i32, i32* %5
%25 = load i32, i32* %8
%26 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 %24, i32 %25)
br label %31
27: ; preds = %20
%28 = load i32, i32* %8
%29 = load i32, i32* %7
%30 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i32 %28, i32 %29)
br label %31
31: ; preds = %27, %23
br label %32
32: ; preds = %31, %17
br label %33
33: ; preds = %32, %11
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"%d is prime\0A\00"
@.str.1 = [27 x i8] c"%d not possible to factor\0A\00"
@.str.2 = [17 x i8] c"Sqrt of %d = %d\0A\00"
@.str.3 = [16 x i8] c" __\0A%d \\/%d\0A\00"
define void @output_print(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = icmp eq i32 %1, -1
br i1 %5, label %6, label %8
6: ; preds = %4
%7 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %0)
br label %18
8: ; preds = %4
%9 = icmp eq i32 %3, 1
br i1 %9, label %10, label %12
10: ; preds = %8
%11 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i32 %2)
br label %18
12: ; preds = %8
%13 = icmp eq i32 %2, 1
br i1 %13, label %14, label %16
14: ; preds = %12
%15 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 %0, i32 %3)
br label %18
16: ; preds = %12
%17 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i32 %3, i32 %2)
br label %18
18: ; preds = %10, %16, %14, %6
ret void
}