#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*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ printSquareArray(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
void printPassedPawns(char *position, int32_t *wPawns, int32_t wCount,
                      int32_t *bPawns, int32_t bCount) {
  printf("{");
  printf("\"fenString\": \"%s\", ", position);
  printf("\"whitePassedPawns\": ");
  printSquareArray(wPawns, wCount);
  printf(", \"blackPassedPawns\": ");
  printSquareArray(bPawns, bCount);
  printf("}\n");
}


x86 assembly (clang, -O0):
<printPassedPawns>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
lea    0xebe(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xeae(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xeb4(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <printSquareArray@plt>
lea    0xeaf(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x20(%rbp),%rdi
mov    -0x24(%rbp),%esi
call   1030 <printSquareArray@plt>
lea    0xeac(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printPassedPawns>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %r8d,%r14d
mov    %rcx,%r15
mov    %edx,%r12d
mov    %rsi,%rbx
mov    %rdi,%rbp
mov    $0x7b,%edi
call   1030 <putchar@plt>
lea    0xe98(%rip),%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xe9b(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
mov    %r12d,%esi
call   1050 <printSquareArray@plt>
lea    0xe97(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r15,%rdi
mov    %r14d,%esi
call   1050 <printSquareArray@plt>
lea    0xe95(%rip),%rdi
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <puts@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"{\00"
@.str.1 = [20 x i8] c"\22fenString\22: \22%s\22, \00"
@.str.2 = [21 x i8] c"\22whitePassedPawns\22: \00"
@.str.3 = [23 x i8] c", \22blackPassedPawns\22: \00"
@.str.4 = [3 x i8] c"}\0A\00"
define void @printPassedPawns(i8* %0, i32* %1, i32 %2, i32* %3, i32 %4) {
%6 = alloca i8*
%7 = alloca i32*
%8 = alloca i32
%9 = alloca i32*
%10 = alloca i32
store i8* %0, i8** %6
store i32* %1, i32** %7
store i32 %2, i32* %8
store i32* %3, i32** %9
store i32 %4, i32* %10
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%12 = load i8*, i8** %6
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i8* %12)
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
%15 = load i32*, i32** %7
%16 = load i32, i32* %8
%17 = call i32 @printSquareArray(i32* %15, i32 %16)
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0))
%19 = load i32*, i32** %9
%20 = load i32, i32* %10
%21 = call i32 @printSquareArray(i32* %19, i32 %20)
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [20 x i8] c"\22fenString\22: \22%s\22, \00"
@.str.2 = [21 x i8] c"\22whitePassedPawns\22: \00"
@.str.3 = [23 x i8] c", \22blackPassedPawns\22: \00"
@str = [2 x i8] c"}\00"
define void @printPassedPawns(i8* %0, i32* %1, i32 %2, i32* %3, i32 %4) {
%6 = tail call i32 @putchar(i32 123)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
%9 = tail call i32 @printSquareArray(i32* %1, i32 %2)
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0))
%11 = tail call i32 @printSquareArray(i32* %3, i32 %4)
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
ret void
}