#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 uint32_t;
struct keymap {
  int dummy;
};

/* Variables and functions */
int keymap_param(struct keymap *, char *, int);
void encode_pulse_distance(struct keymap *map, uint32_t scancode, int *buf,
                           int *length) {
  int len = 0, bits, i;
  buf[len++] = keymap_param(map, "header_pulse", 2125);
  buf[len++] = keymap_param(map, "header_space", 1875);
  bits = keymap_param(map, "bits", 4);
  if (keymap_param(map, "reverse", 0)) {
    for (i = 0; i < bits; i++) {
      buf[len++] = keymap_param(map, "bit_pulse", 625);
      if (scancode & (1 << i))
        buf[len++] = keymap_param(map, "bit_1_space", 1625);
      else
        buf[len++] = keymap_param(map, "bit_0_space", 375);
    }
  } else {
    for (i = bits - 1; i >= 0; i--) {
      buf[len++] = keymap_param(map, "bit_pulse", 625);
      if (scancode & (1 << i))
        buf[len++] = keymap_param(map, "bit_1_space", 1625);
      else
        buf[len++] = keymap_param(map, "bit_0_space", 375);
    }
  }
  buf[len++] = keymap_param(map, "trailer_pulse", 625);
  *length = len;
}


x86 assembly (clang, -O0):
<encode_pulse_distance>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec7(%rip),%rsi
mov    $0x84d,%edx
call   1030 <keymap_param@plt>
mov    %eax,%edx
mov    -0x18(%rbp),%rax
mov    -0x24(%rbp),%ecx
mov    %ecx,%esi
add    $0x1,%esi
mov    %esi,-0x24(%rbp)
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x8(%rbp),%rdi
lea    0xea8(%rip),%rsi
mov    $0x753,%edx
call   1030 <keymap_param@plt>
mov    %eax,%edx
mov    -0x18(%rbp),%rax
mov    -0x24(%rbp),%ecx
mov    %ecx,%esi
add    $0x1,%esi
mov    %esi,-0x24(%rbp)
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x8(%rbp),%rdi
lea    0xe89(%rip),%rsi
mov    $0x4,%edx
call   1030 <keymap_param@plt>
mov    %eax,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe76(%rip),%rsi
xor    %edx,%edx
call   1030 <keymap_param@plt>
cmp    $0x0,%eax
je     1287 <encode_pulse_distance+0x177>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x28(%rbp),%eax
jge    1282 <encode_pulse_distance+0x172>
mov    -0x8(%rbp),%rdi
lea    0xe50(%rip),%rsi
mov    $0x271,%edx
call   1030 <keymap_param@plt>
mov    %eax,%edx
mov    -0x18(%rbp),%rax
mov    -0x24(%rbp),%ecx
mov    %ecx,%esi
add    $0x1,%esi
mov    %esi,-0x24(%rbp)
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0xc(%rbp),%eax
mov    -0x2c(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
je     1243 <encode_pulse_distance+0x133>
mov    -0x8(%rbp),%rdi
lea    0xe14(%rip),%rsi
mov    $0x659,%edx
call   1030 <keymap_param@plt>
mov    %eax,%edx
mov    -0x18(%rbp),%rax
mov    -0x24(%rbp),%ecx
mov    %ecx,%esi
add    $0x1,%esi
mov    %esi,-0x24(%rbp)
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
jmp    126f <encode_pulse_distance+0x15f>
mov    -0x8(%rbp),%rdi
lea    0xdef(%rip),%rsi
mov    $0x177,%edx
call   1030 <keymap_param@plt>
mov    %eax,%edx
mov    -0x18(%rbp),%rax
mov    -0x24(%rbp),%ecx
mov    %ecx,%esi
add    $0x1,%esi
mov    %esi,-0x24(%rbp)
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
jmp    1274 <encode_pulse_distance+0x164>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    11c0 <encode_pulse_distance+0xb0>
jmp    1355 <encode_pulse_distance+0x245>
mov    -0x28(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x2c(%rbp)
cmpl   $0x0,-0x2c(%rbp)
jl     1350 <encode_pulse_distance+0x240>
mov    -0x8(%rbp),%rdi
lea    0xd82(%rip),%rsi
mov    $0x271,%edx
call   1030 <keymap_param@plt>
mov    %eax,%edx
mov    -0x18(%rbp),%rax
mov    -0x24(%rbp),%ecx
mov    %ecx,%esi
add    $0x1,%esi
mov    %esi,-0x24(%rbp)
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0xc(%rbp),%eax
mov    -0x2c(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
je     1311 <encode_pulse_distance+0x201>
mov    -0x8(%rbp),%rdi
lea    0xd46(%rip),%rsi
mov    $0x659,%edx
call   1030 <keymap_param@plt>
mov    %eax,%edx
mov    -0x18(%rbp),%rax
mov    -0x24(%rbp),%ecx
mov    %ecx,%esi
add    $0x1,%esi
mov    %esi,-0x24(%rbp)
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
jmp    133d <encode_pulse_distance+0x22d>
mov    -0x8(%rbp),%rdi
lea    0xd21(%rip),%rsi
mov    $0x177,%edx
call   1030 <keymap_param@plt>
mov    %eax,%edx
mov    -0x18(%rbp),%rax
mov    -0x24(%rbp),%ecx
mov    %ecx,%esi
add    $0x1,%esi
mov    %esi,-0x24(%rbp)
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
jmp    1342 <encode_pulse_distance+0x232>
mov    -0x2c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x2c(%rbp)
jmp    1290 <encode_pulse_distance+0x180>
jmp    1355 <encode_pulse_distance+0x245>
mov    -0x8(%rbp),%rdi
lea    0xce9(%rip),%rsi
mov    $0x271,%edx
call   1030 <keymap_param@plt>
mov    %eax,%edx
mov    -0x18(%rbp),%rax
mov    -0x24(%rbp),%ecx
mov    %ecx,%esi
add    $0x1,%esi
mov    %esi,-0x24(%rbp)
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x24(%rbp),%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<encode_pulse_distance>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rcx,(%rsp)
mov    %rdx,%r15
mov    %esi,%r12d
mov    %rdi,%rbx
lea    0xed1(%rip),%rsi
mov    $0x84d,%edx
call   1030 <keymap_param@plt>
mov    %eax,(%r15)
lea    0xeca(%rip),%rsi
mov    %rbx,%rdi
mov    $0x753,%edx
call   1030 <keymap_param@plt>
mov    %eax,0x4(%r15)
lea    0xebf(%rip),%rsi
mov    %rbx,%rdi
mov    $0x4,%edx
call   1030 <keymap_param@plt>
mov    %eax,%ebp
lea    0xeae(%rip),%rsi
mov    %rbx,%rdi
xor    %edx,%edx
call   1030 <keymap_param@plt>
test   %eax,%eax
je     11f7 <encode_pulse_distance+0xe7>
test   %ebp,%ebp
jle    1263 <encode_pulse_distance+0x153>
mov    %ebp,%r13d
mov    $0x2,%r14d
xor    %ebp,%ebp
jmp    11c7 <encode_pulse_distance+0xb7>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
lea    0xe96(%rip),%rsi
mov    $0x177,%edx
call   1030 <keymap_param@plt>
mov    %eax,0xc(%r15,%rbp,8)
add    $0x1,%rbp
add    $0x2,%r14d
cmp    %ebp,%r13d
je     1269 <encode_pulse_distance+0x159>
mov    %rbx,%rdi
lea    0xe56(%rip),%rsi
mov    $0x271,%edx
call   1030 <keymap_param@plt>
mov    %eax,0x8(%r15,%rbp,8)
mov    %rbx,%rdi
bt     %ebp,%r12d
jae    11a0 <encode_pulse_distance+0x90>
lea    0xe41(%rip),%rsi
mov    $0x659,%edx
jmp    11ac <encode_pulse_distance+0x9c>
test   %ebp,%ebp
jle    1263 <encode_pulse_distance+0x153>
add    $0x1,%ebp
mov    $0x2,%r14d
lea    0xe1c(%rip),%r13
jmp    1232 <encode_pulse_distance+0x122>
nopl   (%rax)
lea    0xe26(%rip),%rsi
mov    $0x177,%edx
call   1030 <keymap_param@plt>
mov    %eax,0x4(%r15,%r14,4)
add    $0x2,%r14
add    $0xffffffff,%ebp
cmp    $0x1,%ebp
jbe    1269 <encode_pulse_distance+0x159>
mov    %rbx,%rdi
mov    %r13,%rsi
mov    $0x271,%edx
call   1030 <keymap_param@plt>
mov    %eax,(%r15,%r14,4)
lea    -0x2(%rbp),%eax
movzbl %al,%eax
mov    %rbx,%rdi
bt     %eax,%r12d
jae    1210 <encode_pulse_distance+0x100>
lea    0xdd5(%rip),%rsi
mov    $0x659,%edx
jmp    121c <encode_pulse_distance+0x10c>
mov    $0x2,%r14d
lea    0xdd9(%rip),%rsi
mov    %rbx,%rdi
mov    $0x271,%edx
call   1030 <keymap_param@plt>
mov    %r14d,%ecx
or     $0x1,%r14d
mov    %eax,(%r15,%rcx,4)
mov    (%rsp),%rax
mov    %r14d,(%rax)
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.keymap = type { i32 }
@.str = [13 x i8] c"header_pulse\00"
@.str.1 = [13 x i8] c"header_space\00"
@.str.2 = [5 x i8] c"bits\00"
@.str.3 = [8 x i8] c"reverse\00"
@.str.4 = [10 x i8] c"bit_pulse\00"
@.str.5 = [12 x i8] c"bit_1_space\00"
@.str.6 = [12 x i8] c"bit_0_space\00"
@.str.7 = [14 x i8] c"trailer_pulse\00"
define void @encode_pulse_distance(%struct.keymap* %0, i32 %1, i32* %2, i32* %3) {
%5 = alloca %struct.keymap*
%6 = alloca i32
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store %struct.keymap* %0, %struct.keymap** %5
store i32 %1, i32* %6
store i32* %2, i32** %7
store i32* %3, i32** %8
store i32 0, i32* %9
%12 = load %struct.keymap*, %struct.keymap** %5
%13 = call i32 @keymap_param(%struct.keymap* %12, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 2125)
%14 = load i32*, i32** %7
%15 = load i32, i32* %9
%16 = add nsw i32 %15, 1
store i32 %16, i32* %9
%17 = sext i32 %15 to i64
%18 = getelementptr inbounds i32, i32* %14, i64 %17
store i32 %13, i32* %18
%19 = load %struct.keymap*, %struct.keymap** %5
%20 = call i32 @keymap_param(%struct.keymap* %19, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 1875)
%21 = load i32*, i32** %7
%22 = load i32, i32* %9
%23 = add nsw i32 %22, 1
store i32 %23, i32* %9
%24 = sext i32 %22 to i64
%25 = getelementptr inbounds i32, i32* %21, i64 %24
store i32 %20, i32* %25
%26 = load %struct.keymap*, %struct.keymap** %5
%27 = call i32 @keymap_param(%struct.keymap* %26, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 4)
store i32 %27, i32* %10
%28 = load %struct.keymap*, %struct.keymap** %5
%29 = call i32 @keymap_param(%struct.keymap* %28, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i32 0)
%30 = icmp ne i32 %29, 0
br i1 %30, label %31, label %70
31: ; preds = %4
store i32 0, i32* %11
br label %32
32: ; preds = %66, %31
%33 = load i32, i32* %11
%34 = load i32, i32* %10
%35 = icmp slt i32 %33, %34
br i1 %35, label %36, label %69
36: ; preds = %32
%37 = load %struct.keymap*, %struct.keymap** %5
%38 = call i32 @keymap_param(%struct.keymap* %37, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i32 625)
%39 = load i32*, i32** %7
%40 = load i32, i32* %9
%41 = add nsw i32 %40, 1
store i32 %41, i32* %9
%42 = sext i32 %40 to i64
%43 = getelementptr inbounds i32, i32* %39, i64 %42
store i32 %38, i32* %43
%44 = load i32, i32* %6
%45 = load i32, i32* %11
%46 = shl i32 1, %45
%47 = and i32 %44, %46
%48 = icmp ne i32 %47, 0
br i1 %48, label %49, label %57
49: ; preds = %36
%50 = load %struct.keymap*, %struct.keymap** %5
%51 = call i32 @keymap_param(%struct.keymap* %50, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0), i32 1625)
%52 = load i32*, i32** %7
%53 = load i32, i32* %9
%54 = add nsw i32 %53, 1
store i32 %54, i32* %9
%55 = sext i32 %53 to i64
%56 = getelementptr inbounds i32, i32* %52, i64 %55
store i32 %51, i32* %56
br label %65
57: ; preds = %36
%58 = load %struct.keymap*, %struct.keymap** %5
%59 = call i32 @keymap_param(%struct.keymap* %58, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i32 375)
%60 = load i32*, i32** %7
%61 = load i32, i32* %9
%62 = add nsw i32 %61, 1
store i32 %62, i32* %9
%63 = sext i32 %61 to i64
%64 = getelementptr inbounds i32, i32* %60, i64 %63
store i32 %59, i32* %64
br label %65
65: ; preds = %57, %49
br label %66
66: ; preds = %65
%67 = load i32, i32* %11
%68 = add nsw i32 %67, 1
store i32 %68, i32* %11
br label %32
69: ; preds = %32
br label %110
70: ; preds = %4
%71 = load i32, i32* %10
%72 = sub nsw i32 %71, 1
store i32 %72, i32* %11
br label %73
73: ; preds = %106, %70
%74 = load i32, i32* %11
%75 = icmp sge i32 %74, 0
br i1 %75, label %76, label %109
76: ; preds = %73
%77 = load %struct.keymap*, %struct.keymap** %5
%78 = call i32 @keymap_param(%struct.keymap* %77, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i32 625)
%79 = load i32*, i32** %7
%80 = load i32, i32* %9
%81 = add nsw i32 %80, 1
store i32 %81, i32* %9
%82 = sext i32 %80 to i64
%83 = getelementptr inbounds i32, i32* %79, i64 %82
store i32 %78, i32* %83
%84 = load i32, i32* %6
%85 = load i32, i32* %11
%86 = shl i32 1, %85
%87 = and i32 %84, %86
%88 = icmp ne i32 %87, 0
br i1 %88, label %89, label %97
89: ; preds = %76
%90 = load %struct.keymap*, %struct.keymap** %5
%91 = call i32 @keymap_param(%struct.keymap* %90, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0), i32 1625)
%92 = load i32*, i32** %7
%93 = load i32, i32* %9
%94 = add nsw i32 %93, 1
store i32 %94, i32* %9
%95 = sext i32 %93 to i64
%96 = getelementptr inbounds i32, i32* %92, i64 %95
store i32 %91, i32* %96
br label %105
97: ; preds = %76
%98 = load %struct.keymap*, %struct.keymap** %5
%99 = call i32 @keymap_param(%struct.keymap* %98, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i32 375)
%100 = load i32*, i32** %7
%101 = load i32, i32* %9
%102 = add nsw i32 %101, 1
store i32 %102, i32* %9
%103 = sext i32 %101 to i64
%104 = getelementptr inbounds i32, i32* %100, i64 %103
store i32 %99, i32* %104
br label %105
105: ; preds = %97, %89
br label %106
106: ; preds = %105
%107 = load i32, i32* %11
%108 = add nsw i32 %107, -1
store i32 %108, i32* %11
br label %73
109: ; preds = %73
br label %110
110: ; preds = %109, %69
%111 = load %struct.keymap*, %struct.keymap** %5
%112 = call i32 @keymap_param(%struct.keymap* %111, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.7, i64 0, i64 0), i32 625)
%113 = load i32*, i32** %7
%114 = load i32, i32* %9
%115 = add nsw i32 %114, 1
store i32 %115, i32* %9
%116 = sext i32 %114 to i64
%117 = getelementptr inbounds i32, i32* %113, i64 %116
store i32 %112, i32* %117
%118 = load i32, i32* %9
%119 = load i32*, i32** %8
store i32 %118, i32* %119
ret void
}

LLVM IR (-O2):
%struct.keymap = type { i32 }
@.str = [13 x i8] c"header_pulse\00"
@.str.1 = [13 x i8] c"header_space\00"
@.str.2 = [5 x i8] c"bits\00"
@.str.3 = [8 x i8] c"reverse\00"
@.str.4 = [10 x i8] c"bit_pulse\00"
@.str.5 = [12 x i8] c"bit_1_space\00"
@.str.6 = [12 x i8] c"bit_0_space\00"
@.str.7 = [14 x i8] c"trailer_pulse\00"
define void @encode_pulse_distance(%struct.keymap* %0, i32 %1, i32* nocapture writeonly %2, i32* nocapture writeonly %3) {
%5 = tail call i32 @keymap_param(%struct.keymap* %0, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 2125)
store i32 %5, i32* %2
%6 = tail call i32 @keymap_param(%struct.keymap* %0, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 1875)
%7 = getelementptr inbounds i32, i32* %2, i64 1
store i32 %6, i32* %7
%8 = tail call i32 @keymap_param(%struct.keymap* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 4)
%9 = tail call i32 @keymap_param(%struct.keymap* %0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i32 0)
%10 = icmp eq i32 %9, 0
%11 = icmp sgt i32 %8, 0
br i1 %10, label %13, label %12
12: ; preds = %4
br i1 %11, label %14, label %56
13: ; preds = %4
br i1 %11, label %33, label %56
14: ; preds = %12, %27
%15 = phi i64 [ %30, %27 ], [ 2, %12 ]
%16 = phi i32 [ %31, %27 ], [ 0, %12 ]
%17 = tail call i32 @keymap_param(%struct.keymap* %0, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i32 625)
%18 = or i64 %15, 1
%19 = getelementptr inbounds i32, i32* %2, i64 %15
store i32 %17, i32* %19
%20 = shl nuw i32 1, %16
%21 = and i32 %20, %1
%22 = icmp eq i32 %21, 0
br i1 %22, label %25, label %23
23: ; preds = %14
%24 = tail call i32 @keymap_param(%struct.keymap* %0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0), i32 1625)
br label %27
25: ; preds = %14
%26 = tail call i32 @keymap_param(%struct.keymap* %0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i32 375)
br label %27
27: ; preds = %23, %25
%28 = phi i32 [ %26, %25 ], [ %24, %23 ]
%29 = getelementptr inbounds i32, i32* %2, i64 %18
store i32 %28, i32* %29
%30 = add nuw nsw i64 %15, 2
%31 = add nuw nsw i32 %16, 1
%32 = icmp eq i32 %31, %8
br i1 %32, label %54, label %14
33: ; preds = %13, %47
%34 = phi i64 [ %50, %47 ], [ 2, %13 ]
%35 = phi i32 [ %36, %47 ], [ %8, %13 ]
%36 = add nsw i32 %35, -1
%37 = tail call i32 @keymap_param(%struct.keymap* %0, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i32 625)
%38 = or i64 %34, 1
%39 = getelementptr inbounds i32, i32* %2, i64 %34
store i32 %37, i32* %39
%40 = shl nuw i32 1, %36
%41 = and i32 %40, %1
%42 = icmp eq i32 %41, 0
br i1 %42, label %45, label %43
43: ; preds = %33
%44 = tail call i32 @keymap_param(%struct.keymap* %0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0), i32 1625)
br label %47
45: ; preds = %33
%46 = tail call i32 @keymap_param(%struct.keymap* %0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i32 375)
br label %47
47: ; preds = %43, %45
%48 = phi i32 [ %46, %45 ], [ %44, %43 ]
%49 = getelementptr inbounds i32, i32* %2, i64 %38
store i32 %48, i32* %49
%50 = add nuw nsw i64 %34, 2
%51 = icmp ugt i32 %35, 1
br i1 %51, label %33, label %52
52: ; preds = %47
%53 = trunc i64 %50 to i32
br label %56
54: ; preds = %27
%55 = trunc i64 %30 to i32
br label %56
56: ; preds = %54, %52, %12, %13
%57 = phi i32 [ 2, %13 ], [ 2, %12 ], [ %53, %52 ], [ %55, %54 ]
%58 = tail call i32 @keymap_param(%struct.keymap* %0, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.7, i64 0, i64 0), i32 625)
%59 = or i32 %57, 1
%60 = zext i32 %57 to i64
%61 = getelementptr inbounds i32, i32* %2, i64 %60
store i32 %58, i32* %61
store i32 %59, i32* %3
ret void
}