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


x86 assembly (clang, -O0):
<commandlineseed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%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>
mov    $0x3,%eax
add    $0x10,%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>
mov    $0x3,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @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 i32 3
}