#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 */
scalar_t__ fun(long);
int /*<<< orphan*/ printf(char *, long, long);
void main() {
  long i, v;
  for (i = 95859 + 1; i <= 99999; i++) {
    v = (i - 95859) / 2;
    if (fun(i) && v >= 60 && v <= 120)
      break;
  }
  printf("%ld:%d", i, v);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x17674,-0x8(%rbp)
cmpq   $0x1869f,-0x8(%rbp)
jg     119a <main+0x7a>
mov    -0x8(%rbp),%rax
sub    $0x17673,%rax
mov    $0x2,%ecx
cqto
idiv   %rcx
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <fun@plt>
cmp    $0x0,%rax
je     1184 <main+0x64>
cmpq   $0x3c,-0x10(%rbp)
jl     1184 <main+0x64>
cmpq   $0x78,-0x10(%rbp)
jg     1184 <main+0x64>
jmp    119a <main+0x7a>
jmp    1189 <main+0x69>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1130 <main+0x10>
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    0xe57(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x17674,%eax
jmp    113c <main+0x1c>
nopl   0x0(%rax,%rax,1)
lea    0x1(%rbx),%rax
cmp    $0x186a0,%rax
je     115e <main+0x3e>
mov    %rax,%rbx
mov    %rax,%rdi
call   1030 <fun@plt>
lea    -0x176eb(%rbx),%rcx
cmp    $0x79,%rcx
ja     1130 <main+0x10>
test   %rax,%rax
je     1130 <main+0x10>
mov    %rbx,%rsi
jmp    1163 <main+0x43>
mov    $0x186a0,%esi
add    $0x898d,%ebx
shr    %ebx
and    $0x7fff,%ebx
lea    0xe88(%rip),%rdi
mov    %rbx,%rdx
pop    %rbx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"%ld:%d\00"
define void @main() {
%1 = alloca i64
%2 = alloca i64
store i64 95860, i64* %1
br label %3
3: ; preds = %21, %0
%4 = load i64, i64* %1
%5 = icmp sle i64 %4, 99999
br i1 %5, label %6, label %24
6: ; preds = %3
%7 = load i64, i64* %1
%8 = sub nsw i64 %7, 95859
%9 = sdiv i64 %8, 2
store i64 %9, i64* %2
%10 = load i64, i64* %1
%11 = call i64 @fun(i64 %10)
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %20
13: ; preds = %6
%14 = load i64, i64* %2
%15 = icmp sge i64 %14, 60
br i1 %15, label %16, label %20
16: ; preds = %13
%17 = load i64, i64* %2
%18 = icmp sle i64 %17, 120
br i1 %18, label %19, label %20
19: ; preds = %16
br label %24
20: ; preds = %16, %13, %6
br label %21
21: ; preds = %20
%22 = load i64, i64* %1
%23 = add nsw i64 %22, 1
store i64 %23, i64* %1
br label %3
24: ; preds = %19, %3
%25 = load i64, i64* %1
%26 = load i64, i64* %2
%27 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i64 %25, i64 %26)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"%ld:%d\00"
define void @main() {
br label %1
1: ; preds = %0, %8
%2 = phi i64 [ 95860, %0 ], [ %9, %8 ]
%3 = tail call i64 @fun(i64 %2)
%4 = icmp ne i64 %3, 0
%5 = add nsw i64 %2, -95979
%6 = icmp ult i64 %5, 122
%7 = and i1 %6, %4
br i1 %7, label %11, label %8
8: ; preds = %1
%9 = add nuw nsw i64 %2, 1
%10 = icmp eq i64 %9, 100000
br i1 %10, label %11, label %1
11: ; preds = %1, %8
%12 = phi i64 [ %2, %1 ], [ 100000, %8 ]
%13 = add nuw i64 %2, 35213
%14 = lshr i64 %13, 1
%15 = and i64 %14, 32767
%16 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i64 %12, i64 %15)
ret void
}