#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 *, int, int);
int str_hash(char *);
int /*<<< orphan*/ test_columns(char const **);
int main(int argc, char **argv) {
  const char *columns[4] = {"a", "b", "c", NULL};
  printf("%d,%d\n", str_hash(argv[1]), str_hash(argv[1]) % 64);
  test_columns(columns);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2cba(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0x2cb7(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0x2cb4(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0x2cb1(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1050 <str_hash@plt>
mov    %eax,-0x34(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1050 <str_hash@plt>
mov    -0x34(%rbp),%esi
mov    $0x40,%ecx
cltd
idiv   %ecx
lea    0xe6c(%rip),%rdi
call   1030 <printf@plt>
lea    -0x30(%rbp),%rdi
call   1040 <test_columns@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
sub    $0x28,%rsp
mov    %rsi,%rbx
movaps 0x2cd0(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0x2cb4(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    0x8(%rsi),%rdi
call   1050 <str_hash@plt>
mov    %eax,%ebp
mov    0x8(%rbx),%rdi
call   1050 <str_hash@plt>
lea    0x3f(%rax),%ecx
test   %eax,%eax
cmovns %eax,%ecx
and    $0xffffffc0,%ecx
sub    %ecx,%eax
lea    0xe8e(%rip),%rdi
mov    %ebp,%esi
mov    %eax,%edx
call   1030 <printf@plt>
mov    %rsp,%rdi
call   1040 <test_columns@plt>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [2 x i8] c"a\00"
@.str.1 = [2 x i8] c"b\00"
@.str.2 = [2 x i8] c"c\00"
@__const.main.columns = [4 x i8*] [i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i32 0, i32 0), i8* null]
@.str.3 = [7 x i8] c"%d,%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca [4 x i8*]
store i32 %0, i32* %3
store i8** %1, i8*** %4
%6 = bitcast [4 x i8*]* %5 to i8*
%7 = load i8**, i8*** %4
%8 = getelementptr inbounds i8*, i8** %7, i64 1
%9 = load i8*, i8** %8
%10 = call i32 @str_hash(i8* %9)
%11 = load i8**, i8*** %4
%12 = getelementptr inbounds i8*, i8** %11, i64 1
%13 = load i8*, i8** %12
%14 = call i32 @str_hash(i8* %13)
%15 = srem i32 %14, 64
%16 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 %10, i32 %15)
%17 = getelementptr inbounds [4 x i8*], [4 x i8*]* %5, i64 0, i64 0
%18 = call i32 @test_columns(i8** %17)
ret i32 0
}

LLVM IR (-O2):
@.str = [2 x i8] c"a\00"
@.str.1 = [2 x i8] c"b\00"
@.str.2 = [2 x i8] c"c\00"
@__const.main.columns = [4 x i8*] [i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i32 0, i32 0), i8* null]
@.str.3 = [7 x i8] c"%d,%d\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [4 x i8*]
%4 = bitcast [4 x i8*]* %3 to i8*
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @str_hash(i8* %6)
%8 = load i8*, i8** %5
%9 = tail call i32 @str_hash(i8* %8)
%10 = srem i32 %9, 64
%11 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 %7, i32 %10)
%12 = getelementptr inbounds [4 x i8*], [4 x i8*]* %3, i64 0, i64 0
%13 = call i32 @test_columns(i8** %12)
ret i32 0
}