#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 run_timeout(char **, int /*<<< orphan*/);
int /*<<< orphan*/ strtof(char *, int /*<<< orphan*/ *);
int main(int argc, char **argv) {
  if (argc < 3)
    return 100 + (- -1);
  int r = run_timeout(argv + 2, strtof(argv[1], NULL));
  return r >= 0 ? r : (-3 == r) ? 100 : 100 + (-r);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x3,-0x8(%rbp)
jge    114c <main+0x2c>
movl   $0x65,-0x4(%rbp)
jmp    11be <main+0x9e>
mov    -0x10(%rbp),%rax
add    $0x10,%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <strtof@plt>
mov    -0x20(%rbp),%rdi
mov    %eax,%esi
call   1040 <run_timeout@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jl     118c <main+0x6c>
mov    -0x14(%rbp),%eax
mov    %eax,-0x24(%rbp)
jmp    11b8 <main+0x98>
mov    $0xfffffffd,%eax
cmp    -0x14(%rbp),%eax
jne    11a7 <main+0x87>
mov    $0x64,%eax
mov    %eax,-0x28(%rbp)
jmp    11b2 <main+0x92>
xor    %eax,%eax
sub    -0x14(%rbp),%eax
add    $0x64,%eax
mov    %eax,-0x28(%rbp)
mov    -0x28(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0x65,%eax
cmp    $0x3,%edi
jl     1161 <main+0x41>
push   %rbx
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
add    $0x10,%rbx
xor    %esi,%esi
call   1030 <strtof@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <run_timeout@plt>
mov    %eax,%ecx
mov    $0x64,%edx
mov    $0x64,%eax
sub    %ecx,%eax
cmp    $0xfffffffd,%ecx
cmove  %edx,%eax
test   %ecx,%ecx
cmovns %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = icmp slt i32 %7, 3
br i1 %8, label %9, label %10
9: ; preds = %2
store i32 101, i32* %3
br label %34
10: ; preds = %2
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 2
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 1
%15 = load i8*, i8** %14
%16 = call i32 @strtof(i8* %15, i32* null)
%17 = call i32 @run_timeout(i8** %12, i32 %16)
store i32 %17, i32* %6
%18 = load i32, i32* %6
%19 = icmp sge i32 %18, 0
br i1 %19, label %20, label %22
20: ; preds = %10
%21 = load i32, i32* %6
br label %32
22: ; preds = %10
%23 = load i32, i32* %6
%24 = icmp eq i32 -3, %23
br i1 %24, label %25, label %26
25: ; preds = %22
br label %30
26: ; preds = %22
%27 = load i32, i32* %6
%28 = sub nsw i32 0, %27
%29 = add nsw i32 100, %28
br label %30
30: ; preds = %26, %25
%31 = phi i32 [ 100, %25 ], [ %29, %26 ]
br label %32
32: ; preds = %30, %20
%33 = phi i32 [ %21, %20 ], [ %31, %30 ]
store i32 %33, i32* %3
br label %34
34: ; preds = %32, %9
%35 = load i32, i32* %3
ret i32 %35
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = icmp slt i32 %0, 3
br i1 %3, label %15, label %4
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 2
%6 = getelementptr inbounds i8*, i8** %1, i64 1
%7 = load i8*, i8** %6
%8 = tail call i32 @strtof(i8* nocapture %7, i32* null)
%9 = tail call i32 @run_timeout(i8** %5, i32 %8)
%10 = icmp sgt i32 %9, -1
%11 = icmp eq i32 %9, -3
%12 = sub i32 100, %9
%13 = select i1 %11, i32 100, i32 %12
%14 = select i1 %10, i32 %9, i32 %13
br label %15
15: ; preds = %2, %4
%16 = phi i32 [ %14, %4 ], [ 101, %2 ]
ret i32 %16
}