#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 */
struct Motor {
  int dummy;
};
struct Arm {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ initArm(struct Arm *, int, struct Motor **);
void initArms(struct Arm **arms, struct Motor **motors) {
  initArm(arms[0], 1, motors);
  initArm(arms[1], 2, motors);
  initArm(arms[2], 7, motors);
  initArm(arms[3], 8, motors);
  initArm(arms[4], 13, motors);
  initArm(arms[5], 14, motors);
}


x86 assembly (clang, -O0):
<initArms>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
mov    -0x10(%rbp),%rdx
mov    $0x1,%esi
call   1030 <initArm@plt>
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x10(%rbp),%rdx
mov    $0x2,%esi
call   1030 <initArm@plt>
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%rdi
mov    -0x10(%rbp),%rdx
mov    $0x7,%esi
call   1030 <initArm@plt>
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%rdi
mov    -0x10(%rbp),%rdx
mov    $0x8,%esi
call   1030 <initArm@plt>
mov    -0x8(%rbp),%rax
mov    0x20(%rax),%rdi
mov    -0x10(%rbp),%rdx
mov    $0xd,%esi
call   1030 <initArm@plt>
mov    -0x8(%rbp),%rax
mov    0x28(%rax),%rdi
mov    -0x10(%rbp),%rdx
mov    $0xe,%esi
call   1030 <initArm@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<initArms>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    (%rdi),%rdi
mov    $0x1,%esi
mov    %r14,%rdx
call   1030 <initArm@plt>
mov    0x8(%rbx),%rdi
mov    $0x2,%esi
mov    %r14,%rdx
call   1030 <initArm@plt>
mov    0x10(%rbx),%rdi
mov    $0x7,%esi
mov    %r14,%rdx
call   1030 <initArm@plt>
mov    0x18(%rbx),%rdi
mov    $0x8,%esi
mov    %r14,%rdx
call   1030 <initArm@plt>
mov    0x20(%rbx),%rdi
mov    $0xd,%esi
mov    %r14,%rdx
call   1030 <initArm@plt>
mov    0x28(%rbx),%rdi
mov    $0xe,%esi
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <initArm@plt>

LLVM IR (-O0):
%struct.Arm = type { i32 }
%struct.Motor = type { i32 }
define void @initArms(%struct.Arm** %0, %struct.Motor** %1) {
%3 = alloca %struct.Arm**
%4 = alloca %struct.Motor**
store %struct.Arm** %0, %struct.Arm*** %3
store %struct.Motor** %1, %struct.Motor*** %4
%5 = load %struct.Arm**, %struct.Arm*** %3
%6 = getelementptr inbounds %struct.Arm*, %struct.Arm** %5, i64 0
%7 = load %struct.Arm*, %struct.Arm** %6
%8 = load %struct.Motor**, %struct.Motor*** %4
%9 = call i32 @initArm(%struct.Arm* %7, i32 1, %struct.Motor** %8)
%10 = load %struct.Arm**, %struct.Arm*** %3
%11 = getelementptr inbounds %struct.Arm*, %struct.Arm** %10, i64 1
%12 = load %struct.Arm*, %struct.Arm** %11
%13 = load %struct.Motor**, %struct.Motor*** %4
%14 = call i32 @initArm(%struct.Arm* %12, i32 2, %struct.Motor** %13)
%15 = load %struct.Arm**, %struct.Arm*** %3
%16 = getelementptr inbounds %struct.Arm*, %struct.Arm** %15, i64 2
%17 = load %struct.Arm*, %struct.Arm** %16
%18 = load %struct.Motor**, %struct.Motor*** %4
%19 = call i32 @initArm(%struct.Arm* %17, i32 7, %struct.Motor** %18)
%20 = load %struct.Arm**, %struct.Arm*** %3
%21 = getelementptr inbounds %struct.Arm*, %struct.Arm** %20, i64 3
%22 = load %struct.Arm*, %struct.Arm** %21
%23 = load %struct.Motor**, %struct.Motor*** %4
%24 = call i32 @initArm(%struct.Arm* %22, i32 8, %struct.Motor** %23)
%25 = load %struct.Arm**, %struct.Arm*** %3
%26 = getelementptr inbounds %struct.Arm*, %struct.Arm** %25, i64 4
%27 = load %struct.Arm*, %struct.Arm** %26
%28 = load %struct.Motor**, %struct.Motor*** %4
%29 = call i32 @initArm(%struct.Arm* %27, i32 13, %struct.Motor** %28)
%30 = load %struct.Arm**, %struct.Arm*** %3
%31 = getelementptr inbounds %struct.Arm*, %struct.Arm** %30, i64 5
%32 = load %struct.Arm*, %struct.Arm** %31
%33 = load %struct.Motor**, %struct.Motor*** %4
%34 = call i32 @initArm(%struct.Arm* %32, i32 14, %struct.Motor** %33)
ret void
}

LLVM IR (-O2):
%struct.Arm = type { i32 }
%struct.Motor = type { i32 }
define void @initArms(%struct.Arm** nocapture %0, %struct.Motor** %1) {
%3 = load %struct.Arm*, %struct.Arm** %0
%4 = tail call i32 @initArm(%struct.Arm* %3, i32 1, %struct.Motor** %1)
%5 = getelementptr inbounds %struct.Arm*, %struct.Arm** %0, i64 1
%6 = load %struct.Arm*, %struct.Arm** %5
%7 = tail call i32 @initArm(%struct.Arm* %6, i32 2, %struct.Motor** %1)
%8 = getelementptr inbounds %struct.Arm*, %struct.Arm** %0, i64 2
%9 = load %struct.Arm*, %struct.Arm** %8
%10 = tail call i32 @initArm(%struct.Arm* %9, i32 7, %struct.Motor** %1)
%11 = getelementptr inbounds %struct.Arm*, %struct.Arm** %0, i64 3
%12 = load %struct.Arm*, %struct.Arm** %11
%13 = tail call i32 @initArm(%struct.Arm* %12, i32 8, %struct.Motor** %1)
%14 = getelementptr inbounds %struct.Arm*, %struct.Arm** %0, i64 4
%15 = load %struct.Arm*, %struct.Arm** %14
%16 = tail call i32 @initArm(%struct.Arm* %15, i32 13, %struct.Motor** %1)
%17 = getelementptr inbounds %struct.Arm*, %struct.Arm** %0, i64 5
%18 = load %struct.Arm*, %struct.Arm** %17
%19 = tail call i32 @initArm(%struct.Arm* %18, i32 14, %struct.Motor** %1)
ret void
}