#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*/ exit(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ strcmp(char *, char *);
void set_param(int is[], char *size) {
  if (!strcmp(size, "XS") || !strcmp(size, "xs")) {
    is[0] = 32;
    is[1] = 32;
    is[2] = 64;
    return;
  }
  if (!strcmp(size, "S") || !strcmp(size, "s")) {
    is[0] = 64;
    is[1] = 64;
    is[2] = 128;
    return;
  }
  if (!strcmp(size, "M") || !strcmp(size, "m")) {
    is[0] = 128;
    is[1] = 128;
    is[2] = 256;
    return;
  }
  if (!strcmp(size, "L") || !strcmp(size, "l")) {
    is[0] = 256;
    is[1] = 256;
    is[2] = 512;
    return;
  }
  if (!strcmp(size, "XL") || !strcmp(size, "xl")) {
    is[0] = 512;
    is[1] = 512;
    is[2] = 1024;
    return;
  } else {
    printf("Invalid input character !!\n");
    exit(6);
  }
}


x86 assembly (clang, -O0):
<set_param>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xeb5(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
je     1172 <set_param+0x42>
mov    -0x10(%rbp),%rdi
lea    0xe9f(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    1197 <set_param+0x67>
mov    -0x8(%rbp),%rax
movl   $0x20,(%rax)
mov    -0x8(%rbp),%rax
movl   $0x20,0x4(%rax)
mov    -0x8(%rbp),%rax
movl   $0x40,0x8(%rax)
jmp    1309 <set_param+0x1d9>
mov    -0x10(%rbp),%rdi
lea    0xe5f(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
je     11c9 <set_param+0x99>
mov    -0x10(%rbp),%rdi
lea    0xe49(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    11ee <set_param+0xbe>
mov    -0x8(%rbp),%rax
movl   $0x40,(%rax)
mov    -0x8(%rbp),%rax
movl   $0x40,0x4(%rax)
mov    -0x8(%rbp),%rax
movl   $0x80,0x8(%rax)
jmp    1309 <set_param+0x1d9>
mov    -0x10(%rbp),%rdi
lea    0xe0d(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
je     1220 <set_param+0xf0>
mov    -0x10(%rbp),%rdi
lea    0xdf6(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    1245 <set_param+0x115>
mov    -0x8(%rbp),%rax
movl   $0x80,(%rax)
mov    -0x8(%rbp),%rax
movl   $0x80,0x4(%rax)
mov    -0x8(%rbp),%rax
movl   $0x100,0x8(%rax)
jmp    1309 <set_param+0x1d9>
mov    -0x10(%rbp),%rdi
lea    0xdbb(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
je     1277 <set_param+0x147>
mov    -0x10(%rbp),%rdi
lea    0xda5(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    129c <set_param+0x16c>
mov    -0x8(%rbp),%rax
movl   $0x100,(%rax)
mov    -0x8(%rbp),%rax
movl   $0x100,0x4(%rax)
mov    -0x8(%rbp),%rax
movl   $0x200,0x8(%rax)
jmp    1309 <set_param+0x1d9>
mov    -0x10(%rbp),%rdi
lea    0xd63(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
je     12ce <set_param+0x19e>
mov    -0x10(%rbp),%rdi
lea    0xd4d(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    12f3 <set_param+0x1c3>
mov    -0x8(%rbp),%rax
movl   $0x200,(%rax)
mov    -0x8(%rbp),%rax
movl   $0x200,0x4(%rax)
mov    -0x8(%rbp),%rax
movl   $0x400,0x8(%rax)
jmp    1309 <set_param+0x1d9>
lea    0xd16(%rip),%rdi
call   1030 <printf@plt>
mov    $0x6,%edi
call   1050 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_param>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
lea    0xebc(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
mov    $0x40,%r15d
mov    $0x20,%ebp
test   %eax,%eax
je     1242 <set_param+0x112>
lea    0xe9d(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     1242 <set_param+0x112>
lea    0xe84(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
mov    $0x80,%r15d
mov    $0x40,%ebp
test   %eax,%eax
je     1242 <set_param+0x112>
lea    0xe65(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     1242 <set_param+0x112>
lea    0xe50(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
mov    $0x100,%r15d
mov    $0x80,%ebp
test   %eax,%eax
je     1242 <set_param+0x112>
lea    0xe34(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     1242 <set_param+0x112>
lea    0xe24(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
mov    $0x200,%r15d
mov    $0x100,%ebp
test   %eax,%eax
je     1242 <set_param+0x112>
lea    0xe09(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
je     1242 <set_param+0x112>
lea    0xdf2(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
mov    $0x400,%r15d
mov    $0x200,%ebp
test   %eax,%eax
je     1242 <set_param+0x112>
lea    0xdd7(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %eax,%eax
jne    1258 <set_param+0x128>
mov    %ebp,(%r14)
mov    %ebp,0x4(%r14)
mov    %r15d,0x8(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xdb1(%rip),%rdi
call   1030 <puts@plt>
mov    $0x6,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"XS\00"
@.str.1 = [3 x i8] c"xs\00"
@.str.2 = [2 x i8] c"S\00"
@.str.3 = [2 x i8] c"s\00"
@.str.4 = [2 x i8] c"M\00"
@.str.5 = [2 x i8] c"m\00"
@.str.6 = [2 x i8] c"L\00"
@.str.7 = [2 x i8] c"l\00"
@.str.8 = [3 x i8] c"XL\00"
@.str.9 = [3 x i8] c"xl\00"
@.str.10 = [28 x i8] c"Invalid input character !!\0A\00"
define void @set_param(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
store i32* %0, i32** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = call i32 @strcmp(i8* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = load i8*, i8** %4
%10 = call i32 @strcmp(i8* %9, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%11 = icmp ne i32 %10, 0
br i1 %11, label %19, label %12
12: ; preds = %8, %2
%13 = load i32*, i32** %3
%14 = getelementptr inbounds i32, i32* %13, i64 0
store i32 32, i32* %14
%15 = load i32*, i32** %3
%16 = getelementptr inbounds i32, i32* %15, i64 1
store i32 32, i32* %16
%17 = load i32*, i32** %3
%18 = getelementptr inbounds i32, i32* %17, i64 2
store i32 64, i32* %18
br label %82
19: ; preds = %8
%20 = load i8*, i8** %4
%21 = call i32 @strcmp(i8* %20, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%22 = icmp ne i32 %21, 0
br i1 %22, label %23, label %27
23: ; preds = %19
%24 = load i8*, i8** %4
%25 = call i32 @strcmp(i8* %24, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%26 = icmp ne i32 %25, 0
br i1 %26, label %34, label %27
27: ; preds = %23, %19
%28 = load i32*, i32** %3
%29 = getelementptr inbounds i32, i32* %28, i64 0
store i32 64, i32* %29
%30 = load i32*, i32** %3
%31 = getelementptr inbounds i32, i32* %30, i64 1
store i32 64, i32* %31
%32 = load i32*, i32** %3
%33 = getelementptr inbounds i32, i32* %32, i64 2
store i32 128, i32* %33
br label %82
34: ; preds = %23
%35 = load i8*, i8** %4
%36 = call i32 @strcmp(i8* %35, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%37 = icmp ne i32 %36, 0
br i1 %37, label %38, label %42
38: ; preds = %34
%39 = load i8*, i8** %4
%40 = call i32 @strcmp(i8* %39, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%41 = icmp ne i32 %40, 0
br i1 %41, label %49, label %42
42: ; preds = %38, %34
%43 = load i32*, i32** %3
%44 = getelementptr inbounds i32, i32* %43, i64 0
store i32 128, i32* %44
%45 = load i32*, i32** %3
%46 = getelementptr inbounds i32, i32* %45, i64 1
store i32 128, i32* %46
%47 = load i32*, i32** %3
%48 = getelementptr inbounds i32, i32* %47, i64 2
store i32 256, i32* %48
br label %82
49: ; preds = %38
%50 = load i8*, i8** %4
%51 = call i32 @strcmp(i8* %50, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
%52 = icmp ne i32 %51, 0
br i1 %52, label %53, label %57
53: ; preds = %49
%54 = load i8*, i8** %4
%55 = call i32 @strcmp(i8* %54, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
%56 = icmp ne i32 %55, 0
br i1 %56, label %64, label %57
57: ; preds = %53, %49
%58 = load i32*, i32** %3
%59 = getelementptr inbounds i32, i32* %58, i64 0
store i32 256, i32* %59
%60 = load i32*, i32** %3
%61 = getelementptr inbounds i32, i32* %60, i64 1
store i32 256, i32* %61
%62 = load i32*, i32** %3
%63 = getelementptr inbounds i32, i32* %62, i64 2
store i32 512, i32* %63
br label %82
64: ; preds = %53
%65 = load i8*, i8** %4
%66 = call i32 @strcmp(i8* %65, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0))
%67 = icmp ne i32 %66, 0
br i1 %67, label %68, label %72
68: ; preds = %64
%69 = load i8*, i8** %4
%70 = call i32 @strcmp(i8* %69, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0))
%71 = icmp ne i32 %70, 0
br i1 %71, label %79, label %72
72: ; preds = %68, %64
%73 = load i32*, i32** %3
%74 = getelementptr inbounds i32, i32* %73, i64 0
store i32 512, i32* %74
%75 = load i32*, i32** %3
%76 = getelementptr inbounds i32, i32* %75, i64 1
store i32 512, i32* %76
%77 = load i32*, i32** %3
%78 = getelementptr inbounds i32, i32* %77, i64 2
store i32 1024, i32* %78
br label %82
79: ; preds = %68
%80 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.10, i64 0, i64 0))
%81 = call i32 @exit(i32 6)
unreachable
82: ; preds = %72, %57, %42, %27, %12
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"XS\00"
@.str.1 = [3 x i8] c"xs\00"
@.str.2 = [2 x i8] c"S\00"
@.str.3 = [2 x i8] c"s\00"
@.str.4 = [2 x i8] c"M\00"
@.str.5 = [2 x i8] c"m\00"
@.str.6 = [2 x i8] c"L\00"
@.str.7 = [2 x i8] c"l\00"
@.str.8 = [3 x i8] c"XL\00"
@.str.9 = [3 x i8] c"xl\00"
@str = [27 x i8] c"Invalid input character !!\00"
define void @set_param(i32* nocapture writeonly %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %1, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i32 %3, 0
br i1 %4, label %35, label %5
5: ; preds = %2
%6 = tail call i32 @strcmp(i8* dereferenceable(1) %1, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%7 = icmp eq i32 %6, 0
br i1 %7, label %35, label %8
8: ; preds = %5
%9 = tail call i32 @strcmp(i8* dereferenceable(1) %1, i8* dereferenceable(2) getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%10 = icmp eq i32 %9, 0
br i1 %10, label %35, label %11
11: ; preds = %8
%12 = tail call i32 @strcmp(i8* dereferenceable(1) %1, i8* dereferenceable(2) getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%13 = icmp eq i32 %12, 0
br i1 %13, label %35, label %14
14: ; preds = %11
%15 = tail call i32 @strcmp(i8* dereferenceable(1) %1, i8* dereferenceable(2) getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%16 = icmp eq i32 %15, 0
br i1 %16, label %35, label %17
17: ; preds = %14
%18 = tail call i32 @strcmp(i8* dereferenceable(1) %1, i8* dereferenceable(2) getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%19 = icmp eq i32 %18, 0
br i1 %19, label %35, label %20
20: ; preds = %17
%21 = tail call i32 @strcmp(i8* dereferenceable(1) %1, i8* dereferenceable(2) getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
%22 = icmp eq i32 %21, 0
br i1 %22, label %35, label %23
23: ; preds = %20
%24 = tail call i32 @strcmp(i8* dereferenceable(1) %1, i8* dereferenceable(2) getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
%25 = icmp eq i32 %24, 0
br i1 %25, label %35, label %26
26: ; preds = %23
%27 = tail call i32 @strcmp(i8* dereferenceable(1) %1, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0))
%28 = icmp eq i32 %27, 0
br i1 %28, label %35, label %29
29: ; preds = %26
%30 = tail call i32 @strcmp(i8* dereferenceable(1) %1, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0))
%31 = icmp eq i32 %30, 0
br i1 %31, label %35, label %32
32: ; preds = %29
%33 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
%34 = tail call i32 @exit(i32 6)
unreachable
35: ; preds = %26, %29, %20, %23, %14, %17, %8, %11, %2, %5
%36 = phi i32 [ 32, %5 ], [ 32, %2 ], [ 64, %11 ], [ 64, %8 ], [ 128, %17 ], [ 128, %14 ], [ 256, %23 ], [ 256, %20 ], [ 512, %29 ], [ 512, %26 ]
%37 = phi i32 [ 64, %5 ], [ 64, %2 ], [ 128, %11 ], [ 128, %8 ], [ 256, %17 ], [ 256, %14 ], [ 512, %23 ], [ 512, %20 ], [ 1024, %29 ], [ 1024, %26 ]
store i32 %36, i32* %0
%38 = getelementptr inbounds i32, i32* %0, i64 1
store i32 %36, i32* %38
%39 = getelementptr inbounds i32, i32* %0, i64 2
store i32 %37, i32* %39
ret void
}