#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 */
scalar_t__ strcmp(char *, char *);
unsigned int conflict_deal(unsigned int pos_hash_temp, char val_flag[][20],
                           char *val_flag_data) {
  int i = 0;
  while (strcmp(val_flag[pos_hash_temp], val_flag_data) != 0) {
    i++;
    pos_hash_temp = (pos_hash_temp + i) % 32;
  }
  return pos_hash_temp;
}


x86 assembly (clang, -O0):
<conflict_deal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%eax
imul   $0x14,%rax,%rax
add    %rax,%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
je     1165 <conflict_deal+0x55>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x4(%rbp),%eax
add    -0x1c(%rbp),%eax
and    $0x1f,%eax
mov    %eax,-0x4(%rbp)
jmp    112a <conflict_deal+0x1a>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<conflict_deal>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%r15
mov    %edi,%ebx
mov    %edi,%eax
lea    (%rax,%rax,4),%rax
lea    (%rsi,%rax,4),%rdi
mov    %rdx,%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
je     115d <conflict_deal+0x4d>
mov    $0x1,%ebp
nopl   0x0(%rax,%rax,1)
add    %ebp,%ebx
and    $0x1f,%ebx
lea    (%rbx,%rbx,4),%rax
lea    (%r15,%rax,4),%rdi
mov    %r14,%rsi
call   1030 <strcmp@plt>
add    $0x1,%ebp
test   %rax,%rax
jne    1140 <conflict_deal+0x30>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @conflict_deal(i32 %0, [20 x i8]* %1, i8* %2) {
%4 = alloca i32
%5 = alloca [20 x i8]*
%6 = alloca i8*
%7 = alloca i32
store i32 %0, i32* %4
store [20 x i8]* %1, [20 x i8]** %5
store i8* %2, i8** %6
store i32 0, i32* %7
br label %8
8: ; preds = %17, %3
%9 = load [20 x i8]*, [20 x i8]** %5
%10 = load i32, i32* %4
%11 = zext i32 %10 to i64
%12 = getelementptr inbounds [20 x i8], [20 x i8]* %9, i64 %11
%13 = getelementptr inbounds [20 x i8], [20 x i8]* %12, i64 0, i64 0
%14 = load i8*, i8** %6
%15 = call i64 @strcmp(i8* %13, i8* %14)
%16 = icmp ne i64 %15, 0
br i1 %16, label %17, label %24
17: ; preds = %8
%18 = load i32, i32* %7
%19 = add nsw i32 %18, 1
store i32 %19, i32* %7
%20 = load i32, i32* %4
%21 = load i32, i32* %7
%22 = add i32 %20, %21
%23 = urem i32 %22, 32
store i32 %23, i32* %4
br label %8
24: ; preds = %8
%25 = load i32, i32* %4
ret i32 %25
}

LLVM IR (-O2):
define i32 @conflict_deal(i32 %0, [20 x i8]* %1, i8* %2) {
%4 = zext i32 %0 to i64
%5 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 %4, i64 0
%6 = tail call i64 @strcmp(i8* %5, i8* %2)
%7 = icmp eq i64 %6, 0
br i1 %7, label %18, label %8
8: ; preds = %3, %8
%9 = phi i32 [ %11, %8 ], [ 0, %3 ]
%10 = phi i32 [ %13, %8 ], [ %0, %3 ]
%11 = add nuw nsw i32 %9, 1
%12 = add i32 %11, %10
%13 = and i32 %12, 31
%14 = zext i32 %13 to i64
%15 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 %14, i64 0
%16 = tail call i64 @strcmp(i8* %15, i8* %2)
%17 = icmp eq i64 %16, 0
br i1 %17, label %18, label %8
18: ; preds = %8, %3
%19 = phi i32 [ %0, %3 ], [ %13, %8 ]
ret i32 %19
}