#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 _dictionary_hash(char *);
int /*<<< orphan*/ printf(char *);
void parse_preference(char *buffer, int length) {
  int arch32hash = _dictionary_hash("arch32");
  int arch64hash = _dictionary_hash("arch64");
  if (_dictionary_hash(buffer) == arch32hash)
    printf("Set 32 bit architecture...\n");
  if (_dictionary_hash(buffer) == arch64hash)
    printf("Set 64 bit architecture...\n");
  return;
}


x86 assembly (clang, -O0):
<parse_preference>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    0xeca(%rip),%rdi
call   1040 <_dictionary_hash@plt>
mov    %eax,-0x10(%rbp)
lea    0xec2(%rip),%rdi
call   1040 <_dictionary_hash@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <_dictionary_hash@plt>
cmp    -0x10(%rbp),%eax
jne    116b <parse_preference+0x4b>
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1040 <_dictionary_hash@plt>
cmp    -0x14(%rbp),%eax
jne    1189 <parse_preference+0x69>
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_preference>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%rbx
lea    0xed2(%rip),%rdi
call   1040 <_dictionary_hash@plt>
mov    %eax,%ebp
lea    0xecb(%rip),%rdi
call   1040 <_dictionary_hash@plt>
mov    %eax,%r14d
mov    %rbx,%rdi
call   1040 <_dictionary_hash@plt>
cmp    %ebp,%eax
jne    115c <parse_preference+0x3c>
lea    0xed2(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1040 <_dictionary_hash@plt>
cmp    %r14d,%eax
jne    1179 <parse_preference+0x59>
lea    0xe9e(%rip),%rdi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <puts@plt>
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [7 x i8] c"arch32\00"
@.str.1 = [7 x i8] c"arch64\00"
@.str.2 = [28 x i8] c"Set 32 bit architecture...\0A\00"
@.str.3 = [28 x i8] c"Set 64 bit architecture...\0A\00"
define void @parse_preference(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%7 = call i32 @_dictionary_hash(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
store i32 %7, i32* %5
%8 = call i32 @_dictionary_hash(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
store i32 %8, i32* %6
%9 = load i8*, i8** %3
%10 = call i32 @_dictionary_hash(i8* %9)
%11 = load i32, i32* %5
%12 = icmp eq i32 %10, %11
br i1 %12, label %13, label %15
13: ; preds = %2
%14 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0))
br label %15
15: ; preds = %13, %2
%16 = load i8*, i8** %3
%17 = call i32 @_dictionary_hash(i8* %16)
%18 = load i32, i32* %6
%19 = icmp eq i32 %17, %18
br i1 %19, label %20, label %22
20: ; preds = %15
%21 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0))
br label %22
22: ; preds = %20, %15
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"arch32\00"
@.str.1 = [7 x i8] c"arch64\00"
@str = [27 x i8] c"Set 64 bit architecture...\00"
@str.4 = [27 x i8] c"Set 32 bit architecture...\00"
define void @parse_preference(i8* %0, i32 %1) {
%3 = tail call i32 @_dictionary_hash(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @_dictionary_hash(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @_dictionary_hash(i8* %0)
%6 = icmp eq i32 %5, %3
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.4, i64 0, i64 0))
br label %9
9: ; preds = %7, %2
%10 = tail call i32 @_dictionary_hash(i8* %0)
%11 = icmp eq i32 %10, %4
br i1 %11, label %12, label %14
12: ; preds = %9
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
br label %14
14: ; preds = %12, %9
ret void
}