#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*/ printf(char *, char *);
int /*<<< orphan*/ separate_code(char *, char *, char *, char *);
int main(void) {
  char product_code[] = "IM1337H4CK3R";
  char ware[0x10] = "", id[0x10] = "", qual[0x10] = "";
  separate_code(product_code, ware, id, qual);
  printf("Warehouse: %s\n", ware);
  printf("Product: %s\n", id);
  printf("Qualifiers: %s\n", qual);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeba(%rip),%rax
mov    %rax,-0x11(%rbp)
mov    0xeb8(%rip),%eax
mov    %eax,-0x9(%rbp)
mov    0xeb3(%rip),%al
mov    %al,-0x5(%rbp)
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1050 <memset@plt>
lea    -0x40(%rbp),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1050 <memset@plt>
lea    -0x50(%rbp),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1050 <memset@plt>
lea    -0x11(%rbp),%rdi
lea    -0x30(%rbp),%rsi
lea    -0x40(%rbp),%rdx
lea    -0x50(%rbp),%rcx
call   1040 <separate_code@plt>
lea    -0x30(%rbp),%rsi
lea    0xe61(%rip),%rdi
call   1030 <printf@plt>
lea    -0x40(%rbp),%rsi
lea    0xe60(%rip),%rdi
call   1030 <printf@plt>
lea    -0x50(%rbp),%rsi
lea    0xe5d(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x40,%rsp
movabs $0x52334b43344837,%rax
mov    %rax,0x5(%rsp)
movabs $0x3448373333314d49,%rax
37 48 34
mov    %rax,(%rsp)
xorps  %xmm0,%xmm0
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
mov    %rsp,%rdi
lea    0x30(%rsp),%rbx
lea    0x20(%rsp),%r14
lea    0x10(%rsp),%r15
mov    %rbx,%rsi
mov    %r14,%rdx
mov    %r15,%rcx
call   1040 <separate_code@plt>
lea    0xe8e(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
lea    0xe8e(%rip),%rdi
mov    %r14,%rsi
call   1030 <printf@plt>
lea    0xe8c(%rip),%rdi
mov    %r15,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.main.product_code = [13 x i8] c"IM1337H4CK3R\00"
@.str = [15 x i8] c"Warehouse: %s\0A\00"
@.str.1 = [13 x i8] c"Product: %s\0A\00"
@.str.2 = [16 x i8] c"Qualifiers: %s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [13 x i8]
%3 = alloca [16 x i8]
%4 = alloca [16 x i8]
%5 = alloca [16 x i8]
store i32 0, i32* %1
%6 = bitcast [13 x i8]* %2 to i8*
%7 = bitcast [16 x i8]* %3 to i8*
%8 = bitcast [16 x i8]* %4 to i8*
%9 = bitcast [16 x i8]* %5 to i8*
%10 = getelementptr inbounds [13 x i8], [13 x i8]* %2, i64 0, i64 0
%11 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%12 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 0
%13 = getelementptr inbounds [16 x i8], [16 x i8]* %5, i64 0, i64 0
%14 = call i32 @separate_code(i8* %10, i8* %11, i8* %12, i8* %13)
%15 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%16 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %15)
%17 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 0
%18 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* %17)
%19 = getelementptr inbounds [16 x i8], [16 x i8]* %5, i64 0, i64 0
%20 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i8* %19)
ret i32 0
}

LLVM IR (-O2):
@__const.main.product_code = [13 x i8] c"IM1337H4CK3R\00"
@.str = [15 x i8] c"Warehouse: %s\0A\00"
@.str.1 = [13 x i8] c"Product: %s\0A\00"
@.str.2 = [16 x i8] c"Qualifiers: %s\0A\00"
define i32 @main() {
%1 = alloca [13 x i8]
%2 = alloca [16 x i8]
%3 = alloca [16 x i8]
%4 = alloca [16 x i8]
%5 = getelementptr inbounds [13 x i8], [13 x i8]* %1, i64 0, i64 0
%6 = getelementptr inbounds [16 x i8], [16 x i8]* %2, i64 0, i64 0
%7 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%8 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 0
%9 = call i32 @separate_code(i8* %5, i8* %6, i8* %7, i8* %8)
%10 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %6)
%11 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* %7)
%12 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i8* %8)
ret i32 0
}