#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 */
unsigned short atoi(char *);
void commandlineseed(char **seeds) {
  unsigned short seedv[3], *seed48();
  int i;
  seedv[0] = atoi(seeds[0]);
  seedv[1] = atoi(seeds[1]);
  seedv[2] = atoi(seeds[2]);
  seed48(seedv);
}


x86 assembly (clang, -O0):
<commandlineseed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1040 <atoi@plt>
mov    %ax,-0xe(%rbp)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <atoi@plt>
mov    %ax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%rdi
call   1040 <atoi@plt>
mov    %ax,-0xa(%rbp)
lea    -0xe(%rbp),%rdi
mov    $0x0,%al
call   1030 <seed48@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<commandlineseed>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1040 <atoi@plt>
mov    %ax,0xa(%rsp)
mov    0x8(%rbx),%rdi
call   1040 <atoi@plt>
mov    %ax,0xc(%rsp)
mov    0x10(%rbx),%rdi
call   1040 <atoi@plt>
mov    %ax,0xe(%rsp)
lea    0xa(%rsp),%rdi
xor    %eax,%eax
call   1030 <seed48@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @commandlineseed(i8** %0) {
%2 = alloca i8**
%3 = alloca [3 x i16]
%4 = alloca i32
store i8** %0, i8*** %2
%5 = load i8**, i8*** %2
%6 = getelementptr inbounds i8*, i8** %5, i64 0
%7 = load i8*, i8** %6
%8 = call zeroext i16 @atoi(i8* %7)
%9 = getelementptr inbounds [3 x i16], [3 x i16]* %3, i64 0, i64 0
store i16 %8, i16* %9
%10 = load i8**, i8*** %2
%11 = getelementptr inbounds i8*, i8** %10, i64 1
%12 = load i8*, i8** %11
%13 = call zeroext i16 @atoi(i8* %12)
%14 = getelementptr inbounds [3 x i16], [3 x i16]* %3, i64 0, i64 1
store i16 %13, i16* %14
%15 = load i8**, i8*** %2
%16 = getelementptr inbounds i8*, i8** %15, i64 2
%17 = load i8*, i8** %16
%18 = call zeroext i16 @atoi(i8* %17)
%19 = getelementptr inbounds [3 x i16], [3 x i16]* %3, i64 0, i64 2
store i16 %18, i16* %19
%20 = getelementptr inbounds [3 x i16], [3 x i16]* %3, i64 0, i64 0
%21 = call i16* (i16*, ...) bitcast (i16* (...)* @seed48 to i16* (i16*, ...)*)(i16* %20)
ret void
}

LLVM IR (-O2):
define void @commandlineseed(i8** nocapture %0) {
%2 = alloca [3 x i16]
%3 = bitcast [3 x i16]* %2 to i8*
%4 = load i8*, i8** %0
%5 = tail call zeroext i16 @atoi(i8* %4)
%6 = getelementptr inbounds [3 x i16], [3 x i16]* %2, i64 0, i64 0
store i16 %5, i16* %6
%7 = getelementptr inbounds i8*, i8** %0, i64 1
%8 = load i8*, i8** %7
%9 = tail call zeroext i16 @atoi(i8* %8)
%10 = getelementptr inbounds [3 x i16], [3 x i16]* %2, i64 0, i64 1
store i16 %9, i16* %10
%11 = getelementptr inbounds i8*, i8** %0, i64 2
%12 = load i8*, i8** %11
%13 = tail call zeroext i16 @atoi(i8* %12)
%14 = getelementptr inbounds [3 x i16], [3 x i16]* %2, i64 0, i64 2
store i16 %13, i16* %14
%15 = call i16* (i16*, ...) bitcast (i16* (...)* @seed48 to i16* (i16*, ...)*)(i16* %6)
ret void
}