#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ convert_to_numeric(char **, int **);
int /*<<< orphan*/ fscanf(int /*<<< orphan*/ *, char *, char *);
void get_hands(FILE *in_file, int l_hand[5][2], int r_hand[5][2]) {
  char parse_l_hand[5][3], parse_r_hand[5][3];
  for (int i = 0; i < 5; i++) {
    fscanf(in_file, "%s ", parse_l_hand[i]);
  }
  for (int i = 0; i < 4; i++) {
    fscanf(in_file, "%s ", parse_r_hand[i]);
  }
  fscanf(in_file, "%s\n", parse_r_hand[4]);
  convert_to_numeric(parse_l_hand, l_hand);
  convert_to_numeric(parse_r_hand, r_hand);
}


x86 assembly (clang, -O0):
<get_hands>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x3c(%rbp)
cmpl   $0x5,-0x3c(%rbp)
jge    1172 <get_hands+0x52>
mov    -0x8(%rbp),%rdi
movslq -0x3c(%rbp),%rax
lea    -0x27(%rbp),%rdx
imul   $0x3,%rax,%rax
add    %rax,%rdx
lea    0xea1(%rip),%rsi
call   1030 <fscanf@plt>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    113b <get_hands+0x1b>
movl   $0x0,-0x40(%rbp)
cmpl   $0x4,-0x40(%rbp)
jge    11b0 <get_hands+0x90>
mov    -0x8(%rbp),%rdi
movslq -0x40(%rbp),%rax
lea    -0x36(%rbp),%rdx
imul   $0x3,%rax,%rax
add    %rax,%rdx
lea    0xe63(%rip),%rsi
call   1030 <fscanf@plt>
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    1179 <get_hands+0x59>
mov    -0x8(%rbp),%rdi
lea    -0x36(%rbp),%rdx
add    $0xc,%rdx
lea    0xe41(%rip),%rsi
call   1030 <fscanf@plt>
lea    -0x27(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <convert_to_numeric@plt>
lea    -0x36(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <convert_to_numeric@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_hands>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %rdx,%r14
mov    %rsi,%r12
mov    %rdi,%rbx
lea    0xec2(%rip),%r13
lea    0x19(%rsp),%r15
mov    %r13,%rsi
mov    %r15,%rdx
call   1030 <fscanf@plt>
lea    0x1c(%rsp),%rdx
mov    %rbx,%rdi
mov    %r13,%rsi
call   1030 <fscanf@plt>
lea    0x1f(%rsp),%rdx
mov    %rbx,%rdi
mov    %r13,%rsi
call   1030 <fscanf@plt>
lea    0x22(%rsp),%rdx
mov    %rbx,%rdi
mov    %r13,%rsi
call   1030 <fscanf@plt>
lea    0x25(%rsp),%rdx
mov    %rbx,%rdi
mov    %r13,%rsi
call   1030 <fscanf@plt>
lea    0xa(%rsp),%rbp
mov    %rbx,%rdi
mov    %r13,%rsi
mov    %rbp,%rdx
call   1030 <fscanf@plt>
lea    0xd(%rsp),%rdx
mov    %rbx,%rdi
mov    %r13,%rsi
call   1030 <fscanf@plt>
lea    0x10(%rsp),%rdx
mov    %rbx,%rdi
mov    %r13,%rsi
call   1030 <fscanf@plt>
lea    0x13(%rsp),%rdx
mov    %rbx,%rdi
mov    %r13,%rsi
call   1030 <fscanf@plt>
lea    0x16(%rsp),%rdx
lea    0xe27(%rip),%rsi
mov    %rbx,%rdi
call   1030 <fscanf@plt>
mov    %r15,%rdi
mov    %r12,%rsi
call   1040 <convert_to_numeric@plt>
mov    %rbp,%rdi
mov    %r14,%rsi
call   1040 <convert_to_numeric@plt>
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s \00"
@.str.1 = [4 x i8] c"%s\0A\00"
define void @get_hands(i32* %0, [2 x i32]* %1, [2 x i32]* %2) {
%4 = alloca i32*
%5 = alloca [2 x i32]*
%6 = alloca [2 x i32]*
%7 = alloca [5 x [3 x i8]]
%8 = alloca [5 x [3 x i8]]
%9 = alloca i32
%10 = alloca i32
store i32* %0, i32** %4
store [2 x i32]* %1, [2 x i32]** %5
store [2 x i32]* %2, [2 x i32]** %6
store i32 0, i32* %9
br label %11
11: ; preds = %21, %3
%12 = load i32, i32* %9
%13 = icmp slt i32 %12, 5
br i1 %13, label %14, label %24
14: ; preds = %11
%15 = load i32*, i32** %4
%16 = load i32, i32* %9
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds [5 x [3 x i8]], [5 x [3 x i8]]* %7, i64 0, i64 %17
%19 = getelementptr inbounds [3 x i8], [3 x i8]* %18, i64 0, i64 0
%20 = call i32 @fscanf(i32* %15, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %19)
br label %21
21: ; preds = %14
%22 = load i32, i32* %9
%23 = add nsw i32 %22, 1
store i32 %23, i32* %9
br label %11
24: ; preds = %11
store i32 0, i32* %10
br label %25
25: ; preds = %35, %24
%26 = load i32, i32* %10
%27 = icmp slt i32 %26, 4
br i1 %27, label %28, label %38
28: ; preds = %25
%29 = load i32*, i32** %4
%30 = load i32, i32* %10
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds [5 x [3 x i8]], [5 x [3 x i8]]* %8, i64 0, i64 %31
%33 = getelementptr inbounds [3 x i8], [3 x i8]* %32, i64 0, i64 0
%34 = call i32 @fscanf(i32* %29, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %33)
br label %35
35: ; preds = %28
%36 = load i32, i32* %10
%37 = add nsw i32 %36, 1
store i32 %37, i32* %10
br label %25
38: ; preds = %25
%39 = load i32*, i32** %4
%40 = getelementptr inbounds [5 x [3 x i8]], [5 x [3 x i8]]* %8, i64 0, i64 4
%41 = getelementptr inbounds [3 x i8], [3 x i8]* %40, i64 0, i64 0
%42 = call i32 @fscanf(i32* %39, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %41)
%43 = getelementptr inbounds [5 x [3 x i8]], [5 x [3 x i8]]* %7, i64 0, i64 0
%44 = bitcast [3 x i8]* %43 to i8**
%45 = load [2 x i32]*, [2 x i32]** %5
%46 = bitcast [2 x i32]* %45 to i32**
%47 = call i32 @convert_to_numeric(i8** %44, i32** %46)
%48 = getelementptr inbounds [5 x [3 x i8]], [5 x [3 x i8]]* %8, i64 0, i64 0
%49 = bitcast [3 x i8]* %48 to i8**
%50 = load [2 x i32]*, [2 x i32]** %6
%51 = bitcast [2 x i32]* %50 to i32**
%52 = call i32 @convert_to_numeric(i8** %49, i32** %51)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s \00"
@.str.1 = [4 x i8] c"%s\0A\00"
define void @get_hands(i32* nocapture %0, [2 x i32]* %1, [2 x i32]* %2) {
%4 = alloca [5 x [3 x i8]]
%5 = alloca [5 x [3 x i8]]
%6 = getelementptr inbounds [5 x [3 x i8]], [5 x [3 x i8]]* %4, i64 0, i64 0, i64 0
%7 = getelementptr inbounds [5 x [3 x i8]], [5 x [3 x i8]]* %5, i64 0, i64 0, i64 0
%8 = call i32 @fscanf(i32* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %6)
%9 = getelementptr inbounds [5 x [3 x i8]], [5 x [3 x i8]]* %4, i64 0, i64 1, i64 0
%10 = call i32 @fscanf(i32* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %9)
%11 = getelementptr inbounds [5 x [3 x i8]], [5 x [3 x i8]]* %4, i64 0, i64 2, i64 0
%12 = call i32 @fscanf(i32* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %11)
%13 = getelementptr inbounds [5 x [3 x i8]], [5 x [3 x i8]]* %4, i64 0, i64 3, i64 0
%14 = call i32 @fscanf(i32* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %13)
%15 = getelementptr inbounds [5 x [3 x i8]], [5 x [3 x i8]]* %4, i64 0, i64 4, i64 0
%16 = call i32 @fscanf(i32* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %15)
%17 = call i32 @fscanf(i32* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %7)
%18 = getelementptr inbounds [5 x [3 x i8]], [5 x [3 x i8]]* %5, i64 0, i64 1, i64 0
%19 = call i32 @fscanf(i32* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %18)
%20 = getelementptr inbounds [5 x [3 x i8]], [5 x [3 x i8]]* %5, i64 0, i64 2, i64 0
%21 = call i32 @fscanf(i32* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %20)
%22 = getelementptr inbounds [5 x [3 x i8]], [5 x [3 x i8]]* %5, i64 0, i64 3, i64 0
%23 = call i32 @fscanf(i32* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %22)
%24 = getelementptr inbounds [5 x [3 x i8]], [5 x [3 x i8]]* %5, i64 0, i64 4, i64 0
%25 = call i32 @fscanf(i32* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %24)
%26 = bitcast [5 x [3 x i8]]* %4 to i8**
%27 = bitcast [2 x i32]* %1 to i32**
%28 = call i32 @convert_to_numeric(i8** %26, i32** %27)
%29 = bitcast [5 x [3 x i8]]* %5 to i8**
%30 = bitcast [2 x i32]* %2 to i32**
%31 = call i32 @convert_to_numeric(i8** %29, i32** %30)
ret void
}