#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__ RAND_MAX;
int getpid();
int /*<<< orphan*/ printf(char *, double, double);
scalar_t__ rand();
int /*<<< orphan*/ srand(int);
int sscanf(char *, char *, ...);
int time(int /*<<< orphan*/);
int /*<<< orphan*/ usage(char *);
int main(int argc, char **argv) {
  double chomp = 0.5;
  int n = 100000;
  int mash_x = 0;
  int mash_y = 0;
  if (argc == 2) {
    if (sscanf(argv[1], "%lf", &chomp) != 1)
      usage(argv[0]);
  } else if (argc == 3) {
    if (sscanf(argv[1], "%lf", &chomp) != 1)
      usage(argv[0]);
    if (sscanf(argv[2], "%d", &n) != 1)
      usage(argv[0]);
  } else if (argc == 5) {
    if (sscanf(argv[1], "%lf", &chomp) != 1)
      usage(argv[0]);
    if (sscanf(argv[2], "%d", &n) != 1)
      usage(argv[0]);
    if (sscanf(argv[3], "%d", &mash_x) != 1)
      usage(argv[0]);
    if (sscanf(argv[4], "%d", &mash_y) != 1)
      usage(argv[0]);
  } else {
    usage(argv[0]);
  }
  srand(time(0) ^ getpid());
  if (chomp > 0.0) {
    double lo = 1.0 - chomp;
    double hi = chomp;
    for (int i = 0; i < n;) {
      double x = (double)rand() / (double)RAND_MAX;
      double y = (double)rand() / (double)RAND_MAX;
      if ((x < lo && y < lo) || (x > hi && y > hi)) {
        if (mash_x) {
          if (x < lo)
            x = 0.0;
          else
            x = 1.0;
        }
        if (mash_y) {
          if (y < lo)
            y = 0.0;
          else
            y = 1.0;
        }
        i++;
        printf("x=%.18lf,y=%.18lf\n", x, y);
      }
    }
  } else {
    double lo = 1 + chomp;
    double hi = -chomp;
    for (int i = 0; i < n;) {
      double x = (double)rand() / (double)RAND_MAX;
      double y = (double)rand() / (double)RAND_MAX;
      if ((x < lo && y > hi) || (x > hi && y < lo)) {
        if (mash_x) {
          if (x < lo)
            x = 0.0;
          else
            x = 1.0;
        }
        if (mash_y) {
          if (y < lo)
            y = 0.0;
          else
            y = 1.0;
        }
        i++;
        printf("x=%.18lf,y=%.18lf\n", x, y);
      }
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  0xe6f(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movl   $0x186a0,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
cmpl   $0x2,-0x8(%rbp)
jne    11e9 <main+0x79>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe4c(%rip),%rsi
lea    -0x18(%rbp),%rdx
mov    $0x0,%al
call   1070 <sscanf@plt>
cmp    $0x1,%eax
je     11e4 <main+0x74>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1080 <usage@plt>
jmp    1337 <main+0x1c7>
cmpl   $0x3,-0x8(%rbp)
jne    1256 <main+0xe6>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe0e(%rip),%rsi
lea    -0x18(%rbp),%rdx
mov    $0x0,%al
call   1070 <sscanf@plt>
cmp    $0x1,%eax
je     1222 <main+0xb2>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1080 <usage@plt>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
lea    0xde3(%rip),%rsi
lea    -0x1c(%rbp),%rdx
mov    $0x0,%al
call   1070 <sscanf@plt>
cmp    $0x1,%eax
je     1251 <main+0xe1>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1080 <usage@plt>
jmp    1332 <main+0x1c2>
cmpl   $0x5,-0x8(%rbp)
jne    1321 <main+0x1b1>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xda1(%rip),%rsi
lea    -0x18(%rbp),%rdx
mov    $0x0,%al
call   1070 <sscanf@plt>
cmp    $0x1,%eax
je     128f <main+0x11f>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1080 <usage@plt>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
lea    0xd76(%rip),%rsi
lea    -0x1c(%rbp),%rdx
mov    $0x0,%al
call   1070 <sscanf@plt>
cmp    $0x1,%eax
je     12be <main+0x14e>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1080 <usage@plt>
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
lea    0xd47(%rip),%rsi
lea    -0x20(%rbp),%rdx
mov    $0x0,%al
call   1070 <sscanf@plt>
cmp    $0x1,%eax
je     12ed <main+0x17d>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1080 <usage@plt>
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rdi
lea    0xd18(%rip),%rsi
lea    -0x24(%rbp),%rdx
mov    $0x0,%al
call   1070 <sscanf@plt>
cmp    $0x1,%eax
je     131c <main+0x1ac>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1080 <usage@plt>
jmp    132d <main+0x1bd>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1080 <usage@plt>
jmp    1332 <main+0x1c2>
jmp    1337 <main+0x1c7>
xor    %edi,%edi
call   1060 <time@plt>
mov    %eax,-0x7c(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    -0x7c(%rbp),%edi
xor    %eax,%edi
call   1050 <srand@plt>
movsd  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    14c0 <main+0x350>
movsd  0xc9c(%rip),%xmm0
subsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    14bb <main+0x34b>
mov    $0x0,%al
call   1090 <rand@plt>
cvtsi2sd %rax,%xmm0
mov    0x2c42(%rip),%rax
cvtsi2sdq (%rax),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    $0x0,%al
call   1090 <rand@plt>
cvtsi2sd %rax,%xmm0
mov    0x2c21(%rip),%rax
cvtsi2sdq (%rax),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x48(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    13fd <main+0x28d>
movsd  -0x50(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm0
ucomisd %xmm1,%xmm0
ja     141d <main+0x2ad>
movsd  -0x48(%rbp),%xmm0
ucomisd -0x38(%rbp),%xmm0
jbe    14b6 <main+0x346>
movsd  -0x50(%rbp),%xmm0
ucomisd -0x38(%rbp),%xmm0
jbe    14b6 <main+0x346>
cmpl   $0x0,-0x20(%rbp)
je     145a <main+0x2ea>
movsd  -0x48(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1448 <main+0x2d8>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x48(%rbp)
jmp    1455 <main+0x2e5>
movsd  0xbb8(%rip),%xmm0
movsd  %xmm0,-0x48(%rbp)
jmp    145a <main+0x2ea>
cmpl   $0x0,-0x24(%rbp)
je     1497 <main+0x327>
movsd  -0x50(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1485 <main+0x315>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x50(%rbp)
jmp    1492 <main+0x322>
movsd  0xb7b(%rip),%xmm0
movsd  %xmm0,-0x50(%rbp)
jmp    1497 <main+0x327>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm1
lea    0xb66(%rip),%rdi
call   1040 <printf@plt>
jmp    1387 <main+0x217>
jmp    1633 <main+0x4c3>
movsd  0xb40(%rip),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x18(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x60(%rbp)
movl   $0x0,-0x64(%rbp)
mov    -0x64(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    162e <main+0x4be>
mov    $0x0,%al
call   1090 <rand@plt>
cvtsi2sd %rax,%xmm0
mov    0x2acf(%rip),%rax
cvtsi2sdq (%rax),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    $0x0,%al
call   1090 <rand@plt>
cvtsi2sd %rax,%xmm0
mov    0x2aae(%rip),%rax
cvtsi2sdq (%rax),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x70(%rbp),%xmm1
movsd  -0x58(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    156c <main+0x3fc>
movsd  -0x78(%rbp),%xmm0
ucomisd -0x60(%rbp),%xmm0
ja     1590 <main+0x420>
movsd  -0x70(%rbp),%xmm0
ucomisd -0x60(%rbp),%xmm0
jbe    1629 <main+0x4b9>
movsd  -0x78(%rbp),%xmm1
movsd  -0x58(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1629 <main+0x4b9>
cmpl   $0x0,-0x20(%rbp)
je     15cd <main+0x45d>
movsd  -0x70(%rbp),%xmm1
movsd  -0x58(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    15bb <main+0x44b>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x70(%rbp)
jmp    15c8 <main+0x458>
movsd  0xa45(%rip),%xmm0
movsd  %xmm0,-0x70(%rbp)
jmp    15cd <main+0x45d>
cmpl   $0x0,-0x24(%rbp)
je     160a <main+0x49a>
movsd  -0x78(%rbp),%xmm1
movsd  -0x58(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    15f8 <main+0x488>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x78(%rbp)
jmp    1605 <main+0x495>
movsd  0xa08(%rip),%xmm0
movsd  %xmm0,-0x78(%rbp)
jmp    160a <main+0x49a>
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
movsd  -0x70(%rbp),%xmm0
movsd  -0x78(%rbp),%xmm1
lea    0x9f3(%rip),%rdi
call   1040 <printf@plt>
jmp    14fa <main+0x38a>
jmp    1633 <main+0x4c3>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x40,%rsp
mov    %rsi,%rbx
movabs $0x3fe0000000000000,%rax
mov    %rax,0x10(%rsp)
movl   $0x186a0,0x4(%rsp)
movl   $0x0,0xc(%rsp)
movl   $0x0,0x8(%rsp)
cmp    $0x5,%edi
je     1200 <main+0x90>
cmp    $0x3,%edi
je     11ca <main+0x5a>
cmp    $0x2,%edi
jne    1288 <main+0x118>
mov    0x8(%rbx),%rdi
lea    0xe60(%rip),%rsi
lea    0x10(%rsp),%rdx
jmp    127c <main+0x10c>
mov    0x8(%rbx),%rdi
lea    0xe4b(%rip),%rsi
lea    0x10(%rsp),%rdx
xor    %eax,%eax
call   1070 <sscanf@plt>
cmp    $0x1,%eax
je     11ee <main+0x7e>
mov    (%rbx),%rdi
call   1080 <usage@plt>
mov    0x10(%rbx),%rdi
lea    0xe2b(%rip),%rsi
lea    0x4(%rsp),%rdx
jmp    127c <main+0x10c>
mov    0x8(%rbx),%rdi
lea    0xe15(%rip),%rsi
lea    0x10(%rsp),%rdx
xor    %eax,%eax
call   1070 <sscanf@plt>
cmp    $0x1,%eax
je     1224 <main+0xb4>
mov    (%rbx),%rdi
call   1080 <usage@plt>
mov    0x10(%rbx),%rdi
lea    0xdf5(%rip),%rsi
lea    0x4(%rsp),%rdx
xor    %eax,%eax
call   1070 <sscanf@plt>
cmp    $0x1,%eax
je     1248 <main+0xd8>
mov    (%rbx),%rdi
call   1080 <usage@plt>
mov    0x18(%rbx),%rdi
lea    0xdd1(%rip),%rsi
lea    0xc(%rsp),%rdx
xor    %eax,%eax
call   1070 <sscanf@plt>
cmp    $0x1,%eax
je     126c <main+0xfc>
mov    (%rbx),%rdi
call   1080 <usage@plt>
mov    0x20(%rbx),%rdi
lea    0xdad(%rip),%rsi
lea    0x8(%rsp),%rdx
xor    %eax,%eax
call   1070 <sscanf@plt>
cmp    $0x1,%eax
je     1290 <main+0x120>
mov    (%rbx),%rdi
call   1080 <usage@plt>
xor    %edi,%edi
call   1060 <time@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <getpid@plt>
xor    %eax,%ebx
mov    %ebx,%edi
call   1050 <srand@plt>
movsd  0x10(%rsp),%xmm2
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm2
jbe    13b8 <main+0x248>
cmpl   $0x0,0x4(%rsp)
jle    14b8 <main+0x348>
movsd  0xd30(%rip),%xmm0
subsd  %xmm2,%xmm0
movsd  %xmm0,0x18(%rsp)
mov    0x2d07(%rip),%rbx
lea    0xd3f(%rip),%r14
xor    %ebp,%ebp
movapd %xmm2,0x30(%rsp)
jmp    1319 <main+0x1a9>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%ebp
mov    %r14,%rdi
movapd %xmm3,%xmm0
call   1040 <printf@plt>
cmp    0x4(%rsp),%ebp
jge    14b8 <main+0x348>
xor    %eax,%eax
call   1090 <rand@plt>
xorps  %xmm1,%xmm1
cvtsi2sd %rax,%xmm1
xorps  %xmm0,%xmm0
cvtsi2sdq (%rbx),%xmm0
divsd  %xmm0,%xmm1
movapd %xmm1,0x20(%rsp)
xor    %eax,%eax
call   1090 <rand@plt>
movapd 0x20(%rsp),%xmm3
movapd 0x30(%rsp),%xmm2
xorps  %xmm1,%xmm1
cvtsi2sd %rax,%xmm1
xorps  %xmm0,%xmm0
cvtsi2sdq (%rbx),%xmm0
divsd  %xmm0,%xmm1
movsd  0x18(%rsp),%xmm0
ucomisd %xmm3,%xmm0
jbe    1373 <main+0x203>
ucomisd %xmm1,%xmm0
ja     137f <main+0x20f>
ucomisd %xmm2,%xmm3
jbe    130f <main+0x19f>
ucomisd %xmm2,%xmm1
jbe    130f <main+0x19f>
cmpl   $0x0,0xc(%rsp)
je     1397 <main+0x227>
cmpltsd %xmm0,%xmm3
movsd  0xc6d(%rip),%xmm2
andnpd %xmm2,%xmm3
cmpl   $0x0,0x8(%rsp)
je     1300 <main+0x190>
cmpltsd %xmm0,%xmm1
movsd  0xc51(%rip),%xmm0
andnpd %xmm0,%xmm1
jmp    1300 <main+0x190>
cmpl   $0x0,0x4(%rsp)
jle    14b8 <main+0x348>
movsd  0xc35(%rip),%xmm0
addsd  %xmm2,%xmm0
movsd  %xmm0,0x18(%rsp)
xorpd  0xc33(%rip),%xmm2
mov    0x2c04(%rip),%rbx
lea    0xc3c(%rip),%r14
xor    %ebp,%ebp
movapd %xmm2,0x30(%rsp)
jmp    1419 <main+0x2a9>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%ebp
mov    %r14,%rdi
movapd %xmm3,%xmm0
call   1040 <printf@plt>
cmp    0x4(%rsp),%ebp
jge    14b8 <main+0x348>
xor    %eax,%eax
call   1090 <rand@plt>
xorps  %xmm1,%xmm1
cvtsi2sd %rax,%xmm1
xorps  %xmm0,%xmm0
cvtsi2sdq (%rbx),%xmm0
divsd  %xmm0,%xmm1
movapd %xmm1,0x20(%rsp)
xor    %eax,%eax
call   1090 <rand@plt>
movapd 0x20(%rsp),%xmm3
movapd 0x30(%rsp),%xmm2
xorps  %xmm1,%xmm1
cvtsi2sd %rax,%xmm1
xorps  %xmm0,%xmm0
cvtsi2sdq (%rbx),%xmm0
divsd  %xmm0,%xmm1
movsd  0x18(%rsp),%xmm0
ucomisd %xmm3,%xmm0
jbe    1473 <main+0x303>
ucomisd %xmm2,%xmm1
ja     147f <main+0x30f>
ucomisd %xmm2,%xmm3
jbe    140f <main+0x29f>
ucomisd %xmm1,%xmm0
jbe    140f <main+0x29f>
cmpl   $0x0,0xc(%rsp)
je     1497 <main+0x327>
cmpltsd %xmm0,%xmm3
movsd  0xb6d(%rip),%xmm2
andnpd %xmm2,%xmm3
cmpl   $0x0,0x8(%rsp)
je     1400 <main+0x290>
cmpltsd %xmm0,%xmm1
movsd  0xb51(%rip),%xmm0
andnpd %xmm0,%xmm1
jmp    1400 <main+0x290>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%lf\00"
@.str.1 = [3 x i8] c"%d\00"
@RAND_MAX = global i64 0
@.str.2 = [19 x i8] c"x=%.18lf,y=%.18lf\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca double
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca double
%11 = alloca double
%12 = alloca i32
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca i32
%18 = alloca double
%19 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store double 5.000000e-01, double* %6
store i32 100000, i32* %7
store i32 0, i32* %8
store i32 0, i32* %9
%20 = load i32, i32* %4
%21 = icmp eq i32 %20, 2
br i1 %21, label %22, label %34
22: ; preds = %2
%23 = load i8**, i8*** %5
%24 = getelementptr inbounds i8*, i8** %23, i64 1
%25 = load i8*, i8** %24
%26 = call i32 (i8*, i8*, ...) @sscanf(i8* %25, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %6)
%27 = icmp ne i32 %26, 1
br i1 %27, label %28, label %33
28: ; preds = %22
%29 = load i8**, i8*** %5
%30 = getelementptr inbounds i8*, i8** %29, i64 0
%31 = load i8*, i8** %30
%32 = call i32 @usage(i8* %31)
br label %33
33: ; preds = %28, %22
br label %115
34: ; preds = %2
%35 = load i32, i32* %4
%36 = icmp eq i32 %35, 3
br i1 %36, label %37, label %60
37: ; preds = %34
%38 = load i8**, i8*** %5
%39 = getelementptr inbounds i8*, i8** %38, i64 1
%40 = load i8*, i8** %39
%41 = call i32 (i8*, i8*, ...) @sscanf(i8* %40, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %6)
%42 = icmp ne i32 %41, 1
br i1 %42, label %43, label %48
43: ; preds = %37
%44 = load i8**, i8*** %5
%45 = getelementptr inbounds i8*, i8** %44, i64 0
%46 = load i8*, i8** %45
%47 = call i32 @usage(i8* %46)
br label %48
48: ; preds = %43, %37
%49 = load i8**, i8*** %5
%50 = getelementptr inbounds i8*, i8** %49, i64 2
%51 = load i8*, i8** %50
%52 = call i32 (i8*, i8*, ...) @sscanf(i8* %51, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %7)
%53 = icmp ne i32 %52, 1
br i1 %53, label %54, label %59
54: ; preds = %48
%55 = load i8**, i8*** %5
%56 = getelementptr inbounds i8*, i8** %55, i64 0
%57 = load i8*, i8** %56
%58 = call i32 @usage(i8* %57)
br label %59
59: ; preds = %54, %48
br label %114
60: ; preds = %34
%61 = load i32, i32* %4
%62 = icmp eq i32 %61, 5
br i1 %62, label %63, label %108
63: ; preds = %60
%64 = load i8**, i8*** %5
%65 = getelementptr inbounds i8*, i8** %64, i64 1
%66 = load i8*, i8** %65
%67 = call i32 (i8*, i8*, ...) @sscanf(i8* %66, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %6)
%68 = icmp ne i32 %67, 1
br i1 %68, label %69, label %74
69: ; preds = %63
%70 = load i8**, i8*** %5
%71 = getelementptr inbounds i8*, i8** %70, i64 0
%72 = load i8*, i8** %71
%73 = call i32 @usage(i8* %72)
br label %74
74: ; preds = %69, %63
%75 = load i8**, i8*** %5
%76 = getelementptr inbounds i8*, i8** %75, i64 2
%77 = load i8*, i8** %76
%78 = call i32 (i8*, i8*, ...) @sscanf(i8* %77, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %7)
%79 = icmp ne i32 %78, 1
br i1 %79, label %80, label %85
80: ; preds = %74
%81 = load i8**, i8*** %5
%82 = getelementptr inbounds i8*, i8** %81, i64 0
%83 = load i8*, i8** %82
%84 = call i32 @usage(i8* %83)
br label %85
85: ; preds = %80, %74
%86 = load i8**, i8*** %5
%87 = getelementptr inbounds i8*, i8** %86, i64 3
%88 = load i8*, i8** %87
%89 = call i32 (i8*, i8*, ...) @sscanf(i8* %88, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %8)
%90 = icmp ne i32 %89, 1
br i1 %90, label %91, label %96
91: ; preds = %85
%92 = load i8**, i8*** %5
%93 = getelementptr inbounds i8*, i8** %92, i64 0
%94 = load i8*, i8** %93
%95 = call i32 @usage(i8* %94)
br label %96
96: ; preds = %91, %85
%97 = load i8**, i8*** %5
%98 = getelementptr inbounds i8*, i8** %97, i64 4
%99 = load i8*, i8** %98
%100 = call i32 (i8*, i8*, ...) @sscanf(i8* %99, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %9)
%101 = icmp ne i32 %100, 1
br i1 %101, label %102, label %107
102: ; preds = %96
%103 = load i8**, i8*** %5
%104 = getelementptr inbounds i8*, i8** %103, i64 0
%105 = load i8*, i8** %104
%106 = call i32 @usage(i8* %105)
br label %107
107: ; preds = %102, %96
br label %113
108: ; preds = %60
%109 = load i8**, i8*** %5
%110 = getelementptr inbounds i8*, i8** %109, i64 0
%111 = load i8*, i8** %110
%112 = call i32 @usage(i8* %111)
br label %113
113: ; preds = %108, %107
br label %114
114: ; preds = %113, %59
br label %115
115: ; preds = %114, %33
%116 = call i32 @time(i32 0)
%117 = call i32 (...) @getpid()
%118 = xor i32 %116, %117
%119 = call i32 @srand(i32 %118)
%120 = load double, double* %6
%121 = fcmp ogt double %120, 0.000000e+00
br i1 %121, label %122, label %184
122: ; preds = %115
%123 = load double, double* %6
%124 = fsub double 1.000000e+00, %123
store double %124, double* %10
%125 = load double, double* %6
store double %125, double* %11
store i32 0, i32* %12
br label %126
126: ; preds = %182, %122
%127 = load i32, i32* %12
%128 = load i32, i32* %7
%129 = icmp slt i32 %127, %128
br i1 %129, label %130, label %183
130: ; preds = %126
%131 = call i64 (...) @rand()
%132 = sitofp i64 %131 to double
%133 = load i64, i64* @RAND_MAX
%134 = sitofp i64 %133 to double
%135 = fdiv double %132, %134
store double %135, double* %13
%136 = call i64 (...) @rand()
%137 = sitofp i64 %136 to double
%138 = load i64, i64* @RAND_MAX
%139 = sitofp i64 %138 to double
%140 = fdiv double %137, %139
store double %140, double* %14
%141 = load double, double* %13
%142 = load double, double* %10
%143 = fcmp olt double %141, %142
br i1 %143, label %144, label %148
144: ; preds = %130
%145 = load double, double* %14
%146 = load double, double* %10
%147 = fcmp olt double %145, %146
br i1 %147, label %156, label %148
148: ; preds = %144, %130
%149 = load double, double* %13
%150 = load double, double* %11
%151 = fcmp ogt double %149, %150
br i1 %151, label %152, label %182
152: ; preds = %148
%153 = load double, double* %14
%154 = load double, double* %11
%155 = fcmp ogt double %153, %154
br i1 %155, label %156, label %182
156: ; preds = %152, %144
%157 = load i32, i32* %8
%158 = icmp ne i32 %157, 0
br i1 %158, label %159, label %166
159: ; preds = %156
%160 = load double, double* %13
%161 = load double, double* %10
%162 = fcmp olt double %160, %161
br i1 %162, label %163, label %164
163: ; preds = %159
store double 0.000000e+00, double* %13
br label %165
164: ; preds = %159
store double 1.000000e+00, double* %13
br label %165
165: ; preds = %164, %163
br label %166
166: ; preds = %165, %156
%167 = load i32, i32* %9
%168 = icmp ne i32 %167, 0
br i1 %168, label %169, label %176
169: ; preds = %166
%170 = load double, double* %14
%171 = load double, double* %10
%172 = fcmp olt double %170, %171
br i1 %172, label %173, label %174
173: ; preds = %169
store double 0.000000e+00, double* %14
br label %175
174: ; preds = %169
store double 1.000000e+00, double* %14
br label %175
175: ; preds = %174, %173
br label %176
176: ; preds = %175, %166
%177 = load i32, i32* %12
%178 = add nsw i32 %177, 1
store i32 %178, i32* %12
%179 = load double, double* %13
%180 = load double, double* %14
%181 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), double %179, double %180)
br label %182
182: ; preds = %176, %152, %148
br label %126
183: ; preds = %126
br label %247
184: ; preds = %115
%185 = load double, double* %6
%186 = fadd double 1.000000e+00, %185
store double %186, double* %15
%187 = load double, double* %6
%188 = fneg double %187
store double %188, double* %16
store i32 0, i32* %17
br label %189
189: ; preds = %245, %184
%190 = load i32, i32* %17
%191 = load i32, i32* %7
%192 = icmp slt i32 %190, %191
br i1 %192, label %193, label %246
193: ; preds = %189
%194 = call i64 (...) @rand()
%195 = sitofp i64 %194 to double
%196 = load i64, i64* @RAND_MAX
%197 = sitofp i64 %196 to double
%198 = fdiv double %195, %197
store double %198, double* %18
%199 = call i64 (...) @rand()
%200 = sitofp i64 %199 to double
%201 = load i64, i64* @RAND_MAX
%202 = sitofp i64 %201 to double
%203 = fdiv double %200, %202
store double %203, double* %19
%204 = load double, double* %18
%205 = load double, double* %15
%206 = fcmp olt double %204, %205
br i1 %206, label %207, label %211
207: ; preds = %193
%208 = load double, double* %19
%209 = load double, double* %16
%210 = fcmp ogt double %208, %209
br i1 %210, label %219, label %211
211: ; preds = %207, %193
%212 = load double, double* %18
%213 = load double, double* %16
%214 = fcmp ogt double %212, %213
br i1 %214, label %215, label %245
215: ; preds = %211
%216 = load double, double* %19
%217 = load double, double* %15
%218 = fcmp olt double %216, %217
br i1 %218, label %219, label %245
219: ; preds = %215, %207
%220 = load i32, i32* %8
%221 = icmp ne i32 %220, 0
br i1 %221, label %222, label %229
222: ; preds = %219
%223 = load double, double* %18
%224 = load double, double* %15
%225 = fcmp olt double %223, %224
br i1 %225, label %226, label %227
226: ; preds = %222
store double 0.000000e+00, double* %18
br label %228
227: ; preds = %222
store double 1.000000e+00, double* %18
br label %228
228: ; preds = %227, %226
br label %229
229: ; preds = %228, %219
%230 = load i32, i32* %9
%231 = icmp ne i32 %230, 0
br i1 %231, label %232, label %239
232: ; preds = %229
%233 = load double, double* %19
%234 = load double, double* %15
%235 = fcmp olt double %233, %234
br i1 %235, label %236, label %237
236: ; preds = %232
store double 0.000000e+00, double* %19
br label %238
237: ; preds = %232
store double 1.000000e+00, double* %19
br label %238
238: ; preds = %237, %236
br label %239
239: ; preds = %238, %229
%240 = load i32, i32* %17
%241 = add nsw i32 %240, 1
store i32 %241, i32* %17
%242 = load double, double* %18
%243 = load double, double* %19
%244 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), double %242, double %243)
br label %245
245: ; preds = %239, %215, %211
br label %189
246: ; preds = %189
br label %247
247: ; preds = %246, %183
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%lf\00"
@.str.1 = [3 x i8] c"%d\00"
@RAND_MAX = global i64 0
@.str.2 = [19 x i8] c"x=%.18lf,y=%.18lf\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca double
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = bitcast double* %3 to i8*
store double 5.000000e-01, double* %3
%8 = bitcast i32* %4 to i8*
store i32 100000, i32* %4
%9 = bitcast i32* %5 to i8*
store i32 0, i32* %5
%10 = bitcast i32* %6 to i8*
store i32 0, i32* %6
switch i32 %0, label %67 [
i32 2, label %11
i32 3, label %19
i32 5, label %35
]
11: ; preds = %2
%12 = getelementptr inbounds i8*, i8** %1, i64 1
%13 = load i8*, i8** %12
%14 = call i32 (i8*, i8*, ...) @sscanf(i8* %13, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %3)
%15 = icmp eq i32 %14, 1
br i1 %15, label %70, label %16
16: ; preds = %11
%17 = load i8*, i8** %1
%18 = call i32 @usage(i8* %17)
br label %70
19: ; preds = %2
%20 = getelementptr inbounds i8*, i8** %1, i64 1
%21 = load i8*, i8** %20
%22 = call i32 (i8*, i8*, ...) @sscanf(i8* %21, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %3)
%23 = icmp eq i32 %22, 1
br i1 %23, label %27, label %24
24: ; preds = %19
%25 = load i8*, i8** %1
%26 = call i32 @usage(i8* %25)
br label %27
27: ; preds = %24, %19
%28 = getelementptr inbounds i8*, i8** %1, i64 2
%29 = load i8*, i8** %28
%30 = call i32 (i8*, i8*, ...) @sscanf(i8* %29, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %4)
%31 = icmp eq i32 %30, 1
br i1 %31, label %70, label %32
32: ; preds = %27
%33 = load i8*, i8** %1
%34 = call i32 @usage(i8* %33)
br label %70
35: ; preds = %2
%36 = getelementptr inbounds i8*, i8** %1, i64 1
%37 = load i8*, i8** %36
%38 = call i32 (i8*, i8*, ...) @sscanf(i8* %37, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %3)
%39 = icmp eq i32 %38, 1
br i1 %39, label %43, label %40
40: ; preds = %35
%41 = load i8*, i8** %1
%42 = call i32 @usage(i8* %41)
br label %43
43: ; preds = %40, %35
%44 = getelementptr inbounds i8*, i8** %1, i64 2
%45 = load i8*, i8** %44
%46 = call i32 (i8*, i8*, ...) @sscanf(i8* %45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %4)
%47 = icmp eq i32 %46, 1
br i1 %47, label %51, label %48
48: ; preds = %43
%49 = load i8*, i8** %1
%50 = call i32 @usage(i8* %49)
br label %51
51: ; preds = %48, %43
%52 = getelementptr inbounds i8*, i8** %1, i64 3
%53 = load i8*, i8** %52
%54 = call i32 (i8*, i8*, ...) @sscanf(i8* %53, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %5)
%55 = icmp eq i32 %54, 1
br i1 %55, label %59, label %56
56: ; preds = %51
%57 = load i8*, i8** %1
%58 = call i32 @usage(i8* %57)
br label %59
59: ; preds = %56, %51
%60 = getelementptr inbounds i8*, i8** %1, i64 4
%61 = load i8*, i8** %60
%62 = call i32 (i8*, i8*, ...) @sscanf(i8* %61, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %6)
%63 = icmp eq i32 %62, 1
br i1 %63, label %70, label %64
64: ; preds = %59
%65 = load i8*, i8** %1
%66 = call i32 @usage(i8* %65)
br label %70
67: ; preds = %2
%68 = load i8*, i8** %1
%69 = tail call i32 @usage(i8* %68)
br label %70
70: ; preds = %32, %27, %59, %64, %67, %11, %16
%71 = call i32 @time(i32 0)
%72 = call i32 (...) @getpid()
%73 = xor i32 %72, %71
%74 = call i32 @srand(i32 %73)
%75 = load double, double* %3
%76 = fcmp ogt double %75, 0.000000e+00
br i1 %76, label %77, label %115
77: ; preds = %70
%78 = fsub double 1.000000e+00, %75
%79 = load i32, i32* %4
%80 = icmp sgt i32 %79, 0
br i1 %80, label %81, label %155
81: ; preds = %77, %111
%82 = phi i32 [ %112, %111 ], [ 0, %77 ]
%83 = call i64 (...) @rand()
%84 = sitofp i64 %83 to double
%85 = load i64, i64* @RAND_MAX
%86 = sitofp i64 %85 to double
%87 = fdiv double %84, %86
%88 = call i64 (...) @rand()
%89 = sitofp i64 %88 to double
%90 = load i64, i64* @RAND_MAX
%91 = sitofp i64 %90 to double
%92 = fdiv double %89, %91
%93 = fcmp olt double %87, %78
%94 = fcmp olt double %92, %78
%95 = select i1 %93, i1 %94, i1 false
br i1 %95, label %100, label %96
96: ; preds = %81
%97 = fcmp ogt double %87, %75
%98 = fcmp ogt double %92, %75
%99 = select i1 %97, i1 %98, i1 false
br i1 %99, label %100, label %111
100: ; preds = %96, %81
%101 = load i32, i32* %5
%102 = icmp eq i32 %101, 0
%103 = select i1 %93, double 0.000000e+00, double 1.000000e+00
%104 = select i1 %102, double %87, double %103
%105 = load i32, i32* %6
%106 = icmp eq i32 %105, 0
%107 = select i1 %94, double 0.000000e+00, double 1.000000e+00
%108 = select i1 %106, double %92, double %107
%109 = add nsw i32 %82, 1
%110 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), double %104, double %108)
br label %111
111: ; preds = %100, %96
%112 = phi i32 [ %109, %100 ], [ %82, %96 ]
%113 = load i32, i32* %4
%114 = icmp slt i32 %112, %113
br i1 %114, label %81, label %155
115: ; preds = %70
%116 = fadd double %75, 1.000000e+00
%117 = fneg double %75
%118 = load i32, i32* %4
%119 = icmp sgt i32 %118, 0
br i1 %119, label %120, label %155
120: ; preds = %115, %151
%121 = phi i32 [ %152, %151 ], [ 0, %115 ]
%122 = call i64 (...) @rand()
%123 = sitofp i64 %122 to double
%124 = load i64, i64* @RAND_MAX
%125 = sitofp i64 %124 to double
%126 = fdiv double %123, %125
%127 = call i64 (...) @rand()
%128 = sitofp i64 %127 to double
%129 = load i64, i64* @RAND_MAX
%130 = sitofp i64 %129 to double
%131 = fdiv double %128, %130
%132 = fcmp olt double %126, %116
%133 = fcmp ogt double %131, %117
%134 = select i1 %132, i1 %133, i1 false
br i1 %134, label %139, label %135
135: ; preds = %120
%136 = fcmp ogt double %126, %117
%137 = fcmp olt double %131, %116
%138 = select i1 %136, i1 %137, i1 false
br i1 %138, label %139, label %151
139: ; preds = %135, %120
%140 = load i32, i32* %5
%141 = icmp eq i32 %140, 0
%142 = select i1 %132, double 0.000000e+00, double 1.000000e+00
%143 = select i1 %141, double %126, double %142
%144 = load i32, i32* %6
%145 = icmp eq i32 %144, 0
%146 = fcmp olt double %131, %116
%147 = select i1 %146, double 0.000000e+00, double 1.000000e+00
%148 = select i1 %145, double %131, double %147
%149 = add nsw i32 %121, 1
%150 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), double %143, double %148)
br label %151
151: ; preds = %139, %135
%152 = phi i32 [ %149, %139 ], [ %121, %135 ]
%153 = load i32, i32* %4
%154 = icmp slt i32 %152, %153
br i1 %154, label %120, label %155
155: ; preds = %151, %111, %115, %77
ret i32 0
}