#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 atoi(char *);
int /*<<< orphan*/ makeeccert256(int, char *);
int /*<<< orphan*/ makeeccert384(int, char *);
int /*<<< orphan*/ usage(char *);
int main(int argc, char **argv) {
  int curve;
  if (argc < 3)
    usage(argv[0]);
  curve = atoi(argv[1]);
  if (curve == 256)
    makeeccert256(365 * 3, argv[2]);
  else if (curve == 384)
    makeeccert384(365 * 3, argv[2]);
  else
    usage(argv[0]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x3,-0x8(%rbp)
jge    116c <main+0x2c>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1050 <usage@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1060 <atoi@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x100,-0x14(%rbp)
jne    11a0 <main+0x60>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rsi
mov    $0x447,%edi
call   1030 <makeeccert256@plt>
jmp    11d5 <main+0x95>
cmpl   $0x180,-0x14(%rbp)
jne    11c4 <main+0x84>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rsi
mov    $0x447,%edi
call   1040 <makeeccert384@plt>
jmp    11d0 <main+0x90>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1050 <usage@plt>
jmp    11d5 <main+0x95>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %rsi,%rbx
cmp    $0x2,%edi
jg     1151 <main+0x11>
mov    (%rbx),%rdi
call   1050 <usage@plt>
mov    0x8(%rbx),%rdi
call   1060 <atoi@plt>
cmp    $0x180,%eax
je     1178 <main+0x38>
cmp    $0x100,%eax
jne    1188 <main+0x48>
mov    0x10(%rbx),%rsi
mov    $0x447,%edi
call   1030 <makeeccert256@plt>
jmp    1190 <main+0x50>
mov    0x10(%rbx),%rsi
mov    $0x447,%edi
call   1040 <makeeccert384@plt>
jmp    1190 <main+0x50>
mov    (%rbx),%rdi
call   1050 <usage@plt>
xor    %eax,%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 %14
9: ; preds = %2
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 0
%12 = load i8*, i8** %11
%13 = call i32 @usage(i8* %12)
br label %14
14: ; preds = %9, %2
%15 = load i8**, i8*** %5
%16 = getelementptr inbounds i8*, i8** %15, i64 1
%17 = load i8*, i8** %16
%18 = call i32 @atoi(i8* %17)
store i32 %18, i32* %6
%19 = load i32, i32* %6
%20 = icmp eq i32 %19, 256
br i1 %20, label %21, label %26
21: ; preds = %14
%22 = load i8**, i8*** %5
%23 = getelementptr inbounds i8*, i8** %22, i64 2
%24 = load i8*, i8** %23
%25 = call i32 @makeeccert256(i32 1095, i8* %24)
br label %40
26: ; preds = %14
%27 = load i32, i32* %6
%28 = icmp eq i32 %27, 384
br i1 %28, label %29, label %34
29: ; preds = %26
%30 = load i8**, i8*** %5
%31 = getelementptr inbounds i8*, i8** %30, i64 2
%32 = load i8*, i8** %31
%33 = call i32 @makeeccert384(i32 1095, i8* %32)
br label %39
34: ; preds = %26
%35 = load i8**, i8*** %5
%36 = getelementptr inbounds i8*, i8** %35, i64 0
%37 = load i8*, i8** %36
%38 = call i32 @usage(i8* %37)
br label %39
39: ; preds = %34, %29
br label %40
40: ; preds = %39, %21
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 3
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = load i8*, i8** %1
%6 = tail call i32 @usage(i8* %5)
br label %7
7: ; preds = %4, %2
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = tail call i32 @atoi(i8* %9)
switch i32 %10, label %19 [
i32 256, label %11
i32 384, label %15
]
11: ; preds = %7
%12 = getelementptr inbounds i8*, i8** %1, i64 2
%13 = load i8*, i8** %12
%14 = tail call i32 @makeeccert256(i32 1095, i8* %13)
br label %22
15: ; preds = %7
%16 = getelementptr inbounds i8*, i8** %1, i64 2
%17 = load i8*, i8** %16
%18 = tail call i32 @makeeccert384(i32 1095, i8* %17)
br label %22
19: ; preds = %7
%20 = load i8*, i8** %1
%21 = tail call i32 @usage(i8* %20)
br label %22
22: ; preds = %15, %19, %11
ret i32 0
}