#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__ atoi(char *const);
double pow(int, double);
void getParams(int argc, char *const *argv, unsigned int *threads,
               unsigned int *digits, double *precision) {
  *digits = 10u;
  *threads = 8u;
  if (argc > 1) {
    *threads = (unsigned int)atoi(argv[1]);
  }
  if (argc > 2) {
    *digits = (unsigned int)atoi(argv[2]);
  }
  *precision = pow(10, -((double)*digits));
}


x86 assembly (clang, -O0):
<getParams>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x20(%rbp),%rax
movl   $0xa,(%rax)
mov    -0x18(%rbp),%rax
movl   $0x8,(%rax)
cmpl   $0x1,-0x4(%rbp)
jle    116e <getParams+0x4e>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <atoi@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
cmpl   $0x2,-0x4(%rbp)
jle    118d <getParams+0x6d>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1040 <atoi@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x20(%rbp),%rax
mov    (%rax),%eax
cvtsi2sd %rax,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    $0xa,%edi
call   1030 <pow@plt>
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getParams>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %r8,%r14
mov    %rcx,%r12
movl   $0xa,(%rcx)
movl   $0x8,(%rdx)
cmp    $0x2,%edi
jl     1164 <getParams+0x44>
mov    %rdx,%rbx
mov    %rsi,%r15
mov    %edi,%ebp
mov    0x8(%rsi),%rdi
call   1040 <atoi@plt>
mov    %eax,(%rbx)
cmp    $0x2,%ebp
je     1164 <getParams+0x44>
mov    0x10(%r15),%rdi
call   1040 <atoi@plt>
mov    %eax,(%r12)
mov    (%r12),%eax
cvtsi2sd %rax,%xmm0
xorpd  0xe8b(%rip),%xmm0
mov    $0xa,%edi
call   1030 <pow@plt>
movsd  %xmm0,(%r14)
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @getParams(i32 %0, i8** %1, i32* %2, i32* %3, double* %4) {
%6 = alloca i32
%7 = alloca i8**
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca double*
store i32 %0, i32* %6
store i8** %1, i8*** %7
store i32* %2, i32** %8
store i32* %3, i32** %9
store double* %4, double** %10
%11 = load i32*, i32** %9
store i32 10, i32* %11
%12 = load i32*, i32** %8
store i32 8, i32* %12
%13 = load i32, i32* %6
%14 = icmp sgt i32 %13, 1
br i1 %14, label %15, label %22
15: ; preds = %5
%16 = load i8**, i8*** %7
%17 = getelementptr inbounds i8*, i8** %16, i64 1
%18 = load i8*, i8** %17
%19 = call i64 @atoi(i8* %18)
%20 = trunc i64 %19 to i32
%21 = load i32*, i32** %8
store i32 %20, i32* %21
br label %22
22: ; preds = %15, %5
%23 = load i32, i32* %6
%24 = icmp sgt i32 %23, 2
br i1 %24, label %25, label %32
25: ; preds = %22
%26 = load i8**, i8*** %7
%27 = getelementptr inbounds i8*, i8** %26, i64 2
%28 = load i8*, i8** %27
%29 = call i64 @atoi(i8* %28)
%30 = trunc i64 %29 to i32
%31 = load i32*, i32** %9
store i32 %30, i32* %31
br label %32
32: ; preds = %25, %22
%33 = load i32*, i32** %9
%34 = load i32, i32* %33
%35 = uitofp i32 %34 to double
%36 = fneg double %35
%37 = call double @pow(i32 10, double %36)
%38 = load double*, double** %10
store double %37, double* %38
ret void
}

LLVM IR (-O2):
define void @getParams(i32 %0, i8** nocapture %1, i32* nocapture writeonly %2, i32* nocapture %3, double* nocapture writeonly %4) {
store i32 10, i32* %3
store i32 8, i32* %2
%6 = icmp sgt i32 %0, 1
br i1 %6, label %7, label %18
7: ; preds = %5
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = tail call i64 @atoi(i8* %9)
%11 = trunc i64 %10 to i32
store i32 %11, i32* %2
%12 = icmp eq i32 %0, 2
br i1 %12, label %18, label %13
13: ; preds = %7
%14 = getelementptr inbounds i8*, i8** %1, i64 2
%15 = load i8*, i8** %14
%16 = tail call i64 @atoi(i8* %15)
%17 = trunc i64 %16 to i32
store i32 %17, i32* %3
br label %18
18: ; preds = %5, %13, %7
%19 = load i32, i32* %3
%20 = uitofp i32 %19 to double
%21 = fneg double %20
%22 = tail call double @pow(i32 10, double %21)
store double %22, double* %4
ret void
}