#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 /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ printf(char *, int, double, double, double, int);
int sscanf(char *, char *, ...);
int /*<<< orphan*/ stderr;
int main(int argc, char *argv[]) {
  int taskId;
  double x1, x2, x3;
  int x4;
  if (argc != 6 || sscanf(argv[1], "%d", &taskId) != 1 ||
      sscanf(argv[2], "%lf", &x1) != 1 || sscanf(argv[2], "%lf", &x2) != 1 ||
      sscanf(argv[2], "%lf", &x3) != 1 || sscanf(argv[2], "%d", &x4) != 1) {
    fprintf(stderr, "Error: wrong arguments passed.\n");
    return -1;
  }
  printf("Arguments passed are\n", taskId, x1, x2, x3, x4);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x6,-0x8(%rbp)
jne    11ff <main+0xcf>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xea1(%rip),%rsi
lea    -0x14(%rbp),%rdx
mov    $0x0,%al
call   1050 <sscanf@plt>
cmp    $0x1,%eax
jne    11ff <main+0xcf>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
lea    0xe81(%rip),%rsi
lea    -0x20(%rbp),%rdx
mov    $0x0,%al
call   1050 <sscanf@plt>
cmp    $0x1,%eax
jne    11ff <main+0xcf>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
lea    0xe5e(%rip),%rsi
lea    -0x28(%rbp),%rdx
mov    $0x0,%al
call   1050 <sscanf@plt>
cmp    $0x1,%eax
jne    11ff <main+0xcf>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
lea    0xe3b(%rip),%rsi
lea    -0x30(%rbp),%rdx
mov    $0x0,%al
call   1050 <sscanf@plt>
cmp    $0x1,%eax
jne    11ff <main+0xcf>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
lea    0xe15(%rip),%rsi
lea    -0x34(%rbp),%rdx
mov    $0x0,%al
call   1050 <sscanf@plt>
cmp    $0x1,%eax
je     1220 <main+0xf0>
mov    0x2dda(%rip),%rax
mov    (%rax),%edi
lea    0xdf8(%rip),%rsi
call   1040 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1248 <main+0x118>
mov    -0x14(%rbp),%esi
movsd  -0x20(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm2
mov    -0x34(%rbp),%edx
lea    0xdeb(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
cmp    $0x6,%edi
jne    11f8 <main+0xc8>
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
lea    0xeb4(%rip),%rsi
lea    0x4(%rsp),%rdx
xor    %eax,%eax
call   1050 <sscanf@plt>
cmp    $0x1,%eax
jne    11f8 <main+0xc8>
mov    0x10(%rbx),%rdi
lea    0xe97(%rip),%rsi
lea    0x18(%rsp),%rdx
xor    %eax,%eax
call   1050 <sscanf@plt>
cmp    $0x1,%eax
jne    11f8 <main+0xc8>
mov    0x10(%rbx),%rdi
lea    0xe7b(%rip),%rsi
lea    0x10(%rsp),%rdx
xor    %eax,%eax
call   1050 <sscanf@plt>
cmp    $0x1,%eax
jne    11f8 <main+0xc8>
mov    0x10(%rbx),%rdi
lea    0xe5f(%rip),%rsi
lea    0x8(%rsp),%rdx
xor    %eax,%eax
call   1050 <sscanf@plt>
cmp    $0x1,%eax
jne    11f8 <main+0xc8>
mov    0x10(%rbx),%rdi
lea    0xe40(%rip),%rsi
xor    %ebx,%ebx
mov    %rsp,%rdx
xor    %eax,%eax
call   1050 <sscanf@plt>
cmp    $0x1,%eax
jne    11f8 <main+0xc8>
mov    0x4(%rsp),%esi
movsd  0x18(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
movsd  0x8(%rsp),%xmm2
mov    (%rsp),%edx
lea    0xe36(%rip),%rdi
call   1030 <printf@plt>
jmp    1212 <main+0xe2>
mov    0x2de1(%rip),%rax
mov    (%rax),%edi
lea    0xdff(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0xffffffff,%ebx
mov    %ebx,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%lf\00"
@stderr = global i32 0
@.str.2 = [32 x i8] c"Error: wrong arguments passed.\0A\00"
@.str.3 = [22 x i8] c"Arguments passed are\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%11 = load i32, i32* %4
%12 = icmp ne i32 %11, 6
br i1 %12, label %43, label %13
13: ; preds = %2
%14 = load i8**, i8*** %5
%15 = getelementptr inbounds i8*, i8** %14, i64 1
%16 = load i8*, i8** %15
%17 = call i32 (i8*, i8*, ...) @sscanf(i8* %16, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %6)
%18 = icmp ne i32 %17, 1
br i1 %18, label %43, label %19
19: ; preds = %13
%20 = load i8**, i8*** %5
%21 = getelementptr inbounds i8*, i8** %20, i64 2
%22 = load i8*, i8** %21
%23 = call i32 (i8*, i8*, ...) @sscanf(i8* %22, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %7)
%24 = icmp ne i32 %23, 1
br i1 %24, label %43, label %25
25: ; preds = %19
%26 = load i8**, i8*** %5
%27 = getelementptr inbounds i8*, i8** %26, i64 2
%28 = load i8*, i8** %27
%29 = call i32 (i8*, i8*, ...) @sscanf(i8* %28, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %8)
%30 = icmp ne i32 %29, 1
br i1 %30, label %43, label %31
31: ; preds = %25
%32 = load i8**, i8*** %5
%33 = getelementptr inbounds i8*, i8** %32, i64 2
%34 = load i8*, i8** %33
%35 = call i32 (i8*, i8*, ...) @sscanf(i8* %34, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %9)
%36 = icmp ne i32 %35, 1
br i1 %36, label %43, label %37
37: ; preds = %31
%38 = load i8**, i8*** %5
%39 = getelementptr inbounds i8*, i8** %38, i64 2
%40 = load i8*, i8** %39
%41 = call i32 (i8*, i8*, ...) @sscanf(i8* %40, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %10)
%42 = icmp ne i32 %41, 1
br i1 %42, label %43, label %46
43: ; preds = %37, %31, %25, %19, %13, %2
%44 = load i32, i32* @stderr
%45 = call i32 @fprintf(i32 %44, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0))
store i32 -1, i32* %3
br label %53
46: ; preds = %37
%47 = load i32, i32* %6
%48 = load double, double* %7
%49 = load double, double* %8
%50 = load double, double* %9
%51 = load i32, i32* %10
%52 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i32 %47, double %48, double %49, double %50, i32 %51)
store i32 0, i32* %3
br label %53
53: ; preds = %46, %43
%54 = load i32, i32* %3
ret i32 %54
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%lf\00"
@stderr = global i32 0
@.str.2 = [32 x i8] c"Error: wrong arguments passed.\0A\00"
@.str.3 = [22 x i8] c"Arguments passed are\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i32
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca i32
%8 = bitcast i32* %3 to i8*
%9 = bitcast double* %4 to i8*
%10 = bitcast double* %5 to i8*
%11 = bitcast double* %6 to i8*
%12 = bitcast i32* %7 to i8*
%13 = icmp eq i32 %0, 6
br i1 %13, label %14, label %36
14: ; preds = %2
%15 = getelementptr inbounds i8*, i8** %1, i64 1
%16 = load i8*, i8** %15
%17 = call i32 (i8*, i8*, ...) @sscanf(i8* %16, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%18 = icmp eq i32 %17, 1
br i1 %18, label %19, label %36
19: ; preds = %14
%20 = getelementptr inbounds i8*, i8** %1, i64 2
%21 = load i8*, i8** %20
%22 = call i32 (i8*, i8*, ...) @sscanf(i8* %21, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %4)
%23 = icmp eq i32 %22, 1
br i1 %23, label %24, label %36
24: ; preds = %19
%25 = load i8*, i8** %20
%26 = call i32 (i8*, i8*, ...) @sscanf(i8* %25, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %5)
%27 = icmp eq i32 %26, 1
br i1 %27, label %28, label %36
28: ; preds = %24
%29 = load i8*, i8** %20
%30 = call i32 (i8*, i8*, ...) @sscanf(i8* %29, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %6)
%31 = icmp eq i32 %30, 1
br i1 %31, label %32, label %36
32: ; preds = %28
%33 = load i8*, i8** %20
%34 = call i32 (i8*, i8*, ...) @sscanf(i8* %33, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %7)
%35 = icmp eq i32 %34, 1
br i1 %35, label %39, label %36
36: ; preds = %32, %28, %24, %19, %14, %2
%37 = load i32, i32* @stderr
%38 = call i32 @fprintf(i32 %37, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0))
br label %46
39: ; preds = %32
%40 = load i32, i32* %3
%41 = load double, double* %4
%42 = load double, double* %5
%43 = load double, double* %6
%44 = load i32, i32* %7
%45 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i32 %40, double %41, double %42, double %43, i32 %44)
br label %46
46: ; preds = %39, %36
%47 = phi i32 [ -1, %36 ], [ 0, %39 ]
ret i32 %47
}