#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 */
double atof(char *);
int atoi(char *);
void getCommandLine(int *density, double *maxRadius, int argc, char **argv) {
  if (argc < 2)
    *density = 1;
  else
    *density = atoi(*(argv + 1));
  if (argc < 3)
    *maxRadius = 6.5;
  else
    *maxRadius = atof(*(argv + 2));
}


x86 assembly (clang, -O0):
<getCommandLine>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
cmpl   $0x2,-0x14(%rbp)
jge    1150 <getCommandLine+0x30>
mov    -0x8(%rbp),%rax
movl   $0x1,(%rax)
jmp    1165 <getCommandLine+0x45>
mov    -0x20(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <atoi@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
cmpl   $0x3,-0x14(%rbp)
jge    1184 <getCommandLine+0x64>
mov    -0x10(%rbp),%rax
movsd  0xe85(%rip),%xmm0
movsd  %xmm0,(%rax)
jmp    1199 <getCommandLine+0x79>
mov    -0x20(%rbp),%rax
mov    0x10(%rax),%rdi
call   1030 <atof@plt>
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getCommandLine>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
cmp    $0x1,%edx
jg     1142 <getCommandLine+0x22>
movl   $0x1,(%rbx)
movsd  0xec0(%rip),%xmm0
jmp    116a <getCommandLine+0x4a>
mov    %rcx,%r15
mov    %edx,%ebp
mov    0x8(%rcx),%rdi
call   1040 <atoi@plt>
mov    %eax,(%rbx)
cmp    $0x2,%ebp
jne    1161 <getCommandLine+0x41>
movsd  0xea1(%rip),%xmm0
jmp    116a <getCommandLine+0x4a>
mov    0x10(%r15),%rdi
call   1030 <atof@plt>
movsd  %xmm0,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @getCommandLine(i32* %0, double* %1, i32 %2, i8** %3) {
%5 = alloca i32*
%6 = alloca double*
%7 = alloca i32
%8 = alloca i8**
store i32* %0, i32** %5
store double* %1, double** %6
store i32 %2, i32* %7
store i8** %3, i8*** %8
%9 = load i32, i32* %7
%10 = icmp slt i32 %9, 2
br i1 %10, label %11, label %13
11: ; preds = %4
%12 = load i32*, i32** %5
store i32 1, i32* %12
br label %19
13: ; preds = %4
%14 = load i8**, i8*** %8
%15 = getelementptr inbounds i8*, i8** %14, i64 1
%16 = load i8*, i8** %15
%17 = call i32 @atoi(i8* %16)
%18 = load i32*, i32** %5
store i32 %17, i32* %18
br label %19
19: ; preds = %13, %11
%20 = load i32, i32* %7
%21 = icmp slt i32 %20, 3
br i1 %21, label %22, label %24
22: ; preds = %19
%23 = load double*, double** %6
store double 6.500000e+00, double* %23
br label %30
24: ; preds = %19
%25 = load i8**, i8*** %8
%26 = getelementptr inbounds i8*, i8** %25, i64 2
%27 = load i8*, i8** %26
%28 = call double @atof(i8* %27)
%29 = load double*, double** %6
store double %28, double* %29
br label %30
30: ; preds = %24, %22
ret void
}

LLVM IR (-O2):
define void @getCommandLine(i32* nocapture writeonly %0, double* nocapture writeonly %1, i32 %2, i8** nocapture %3) {
%5 = icmp slt i32 %2, 2
br i1 %5, label %6, label %7
6: ; preds = %4
store i32 1, i32* %0
br label %16
7: ; preds = %4
%8 = getelementptr inbounds i8*, i8** %3, i64 1
%9 = load i8*, i8** %8
%10 = tail call i32 @atoi(i8* %9)
store i32 %10, i32* %0
%11 = icmp eq i32 %2, 2
br i1 %11, label %16, label %12
12: ; preds = %7
%13 = getelementptr inbounds i8*, i8** %3, i64 2
%14 = load i8*, i8** %13
%15 = tail call double @atof(i8* %14)
br label %16
16: ; preds = %6, %7, %12
%17 = phi double [ %15, %12 ], [ 6.500000e+00, %7 ], [ 6.500000e+00, %6 ]
store double %17, double* %1
ret void
}