#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 */
int /*<<< orphan*/ put_fnckey1(int, char *);
int /*<<< orphan*/ put_fnckey2(int, char *);
void put_fnckey(int no, char *p) {
  int i;
  if (no == 0) {
    for (i = 0; i < 20; i++, p += 32)
      put_fnckey1(i, p);
    for (i = 0; i < 12; i++, p += 6)
      put_fnckey2(i, p);
  }
  if (no >= 1 && no <= 20)
    put_fnckey1(no - 1, p);
  if (no >= 21 && no <= 32)
    put_fnckey2(no - 21, p);
}


x86 assembly (clang, -O0):
<put_fnckey>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    11ac <put_fnckey+0x8c>
movl   $0x0,-0x14(%rbp)
cmpl   $0x14,-0x14(%rbp)
jge    1170 <put_fnckey+0x50>
mov    -0x14(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <put_fnckey1@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
add    $0x20,%rax
mov    %rax,-0x10(%rbp)
jmp    1140 <put_fnckey+0x20>
movl   $0x0,-0x14(%rbp)
cmpl   $0xc,-0x14(%rbp)
jge    11a7 <put_fnckey+0x87>
mov    -0x14(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <put_fnckey2@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
add    $0x6,%rax
mov    %rax,-0x10(%rbp)
jmp    1177 <put_fnckey+0x57>
jmp    11ac <put_fnckey+0x8c>
cmpl   $0x1,-0x4(%rbp)
jl     11cf <put_fnckey+0xaf>
cmpl   $0x14,-0x4(%rbp)
jg     11cf <put_fnckey+0xaf>
mov    -0x4(%rbp),%edi
sub    $0x1,%edi
mov    -0x10(%rbp),%rsi
call   1030 <put_fnckey1@plt>
cmpl   $0x15,-0x4(%rbp)
jl     11f2 <put_fnckey+0xd2>
cmpl   $0x20,-0x4(%rbp)
jg     11f2 <put_fnckey+0xd2>
mov    -0x4(%rbp),%edi
sub    $0x15,%edi
mov    -0x10(%rbp),%rsi
call   1040 <put_fnckey2@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<put_fnckey>:
push   %rbx
mov    %rsi,%rbx
test   %edi,%edi
je     113f <put_fnckey+0x1f>
lea    -0x1(%rdi),%eax
cmp    $0x13,%eax
ja     1349 <put_fnckey+0x229>
mov    %eax,%edi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <put_fnckey1@plt>
xor    %edi,%edi
mov    %rbx,%rsi
call   1030 <put_fnckey1@plt>
lea    0x20(%rbx),%rsi
mov    $0x1,%edi
call   1030 <put_fnckey1@plt>
lea    0x40(%rbx),%rsi
mov    $0x2,%edi
call   1030 <put_fnckey1@plt>
lea    0x60(%rbx),%rsi
mov    $0x3,%edi
call   1030 <put_fnckey1@plt>
lea    0x80(%rbx),%rsi
mov    $0x4,%edi
call   1030 <put_fnckey1@plt>
lea    0xa0(%rbx),%rsi
mov    $0x5,%edi
call   1030 <put_fnckey1@plt>
lea    0xc0(%rbx),%rsi
mov    $0x6,%edi
call   1030 <put_fnckey1@plt>
lea    0xe0(%rbx),%rsi
mov    $0x7,%edi
call   1030 <put_fnckey1@plt>
lea    0x100(%rbx),%rsi
mov    $0x8,%edi
call   1030 <put_fnckey1@plt>
lea    0x120(%rbx),%rsi
mov    $0x9,%edi
call   1030 <put_fnckey1@plt>
lea    0x140(%rbx),%rsi
mov    $0xa,%edi
call   1030 <put_fnckey1@plt>
lea    0x160(%rbx),%rsi
mov    $0xb,%edi
call   1030 <put_fnckey1@plt>
lea    0x180(%rbx),%rsi
mov    $0xc,%edi
call   1030 <put_fnckey1@plt>
lea    0x1a0(%rbx),%rsi
mov    $0xd,%edi
call   1030 <put_fnckey1@plt>
lea    0x1c0(%rbx),%rsi
mov    $0xe,%edi
call   1030 <put_fnckey1@plt>
lea    0x1e0(%rbx),%rsi
mov    $0xf,%edi
call   1030 <put_fnckey1@plt>
lea    0x200(%rbx),%rsi
mov    $0x10,%edi
call   1030 <put_fnckey1@plt>
lea    0x220(%rbx),%rsi
mov    $0x11,%edi
call   1030 <put_fnckey1@plt>
lea    0x240(%rbx),%rsi
mov    $0x12,%edi
call   1030 <put_fnckey1@plt>
lea    0x260(%rbx),%rsi
mov    $0x13,%edi
call   1030 <put_fnckey1@plt>
lea    0x280(%rbx),%rsi
xor    %edi,%edi
call   1040 <put_fnckey2@plt>
lea    0x286(%rbx),%rsi
mov    $0x1,%edi
call   1040 <put_fnckey2@plt>
lea    0x28c(%rbx),%rsi
mov    $0x2,%edi
call   1040 <put_fnckey2@plt>
lea    0x292(%rbx),%rsi
mov    $0x3,%edi
call   1040 <put_fnckey2@plt>
lea    0x298(%rbx),%rsi
mov    $0x4,%edi
call   1040 <put_fnckey2@plt>
lea    0x29e(%rbx),%rsi
mov    $0x5,%edi
call   1040 <put_fnckey2@plt>
lea    0x2a4(%rbx),%rsi
mov    $0x6,%edi
call   1040 <put_fnckey2@plt>
lea    0x2aa(%rbx),%rsi
mov    $0x7,%edi
call   1040 <put_fnckey2@plt>
lea    0x2b0(%rbx),%rsi
mov    $0x8,%edi
call   1040 <put_fnckey2@plt>
lea    0x2b6(%rbx),%rsi
mov    $0x9,%edi
call   1040 <put_fnckey2@plt>
lea    0x2bc(%rbx),%rsi
mov    $0xa,%edi
call   1040 <put_fnckey2@plt>
add    $0x2c2,%rbx
mov    $0xb,%edi
jmp    1351 <put_fnckey+0x231>
add    $0xffffffeb,%edi
cmp    $0xb,%edi
ja     135a <put_fnckey+0x23a>
mov    %rbx,%rsi
pop    %rbx
jmp    1040 <put_fnckey2@plt>
pop    %rbx
ret

LLVM IR (-O0):
define void @put_fnckey(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
store i32 %0, i32* %3
store i8* %1, i8** %4
%6 = load i32, i32* %3
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %35
8: ; preds = %2
store i32 0, i32* %5
br label %9
9: ; preds = %16, %8
%10 = load i32, i32* %5
%11 = icmp slt i32 %10, 20
br i1 %11, label %12, label %21
12: ; preds = %9
%13 = load i32, i32* %5
%14 = load i8*, i8** %4
%15 = call i32 @put_fnckey1(i32 %13, i8* %14)
br label %16
16: ; preds = %12
%17 = load i32, i32* %5
%18 = add nsw i32 %17, 1
store i32 %18, i32* %5
%19 = load i8*, i8** %4
%20 = getelementptr inbounds i8, i8* %19, i64 32
store i8* %20, i8** %4
br label %9
21: ; preds = %9
store i32 0, i32* %5
br label %22
22: ; preds = %29, %21
%23 = load i32, i32* %5
%24 = icmp slt i32 %23, 12
br i1 %24, label %25, label %34
25: ; preds = %22
%26 = load i32, i32* %5
%27 = load i8*, i8** %4
%28 = call i32 @put_fnckey2(i32 %26, i8* %27)
br label %29
29: ; preds = %25
%30 = load i32, i32* %5
%31 = add nsw i32 %30, 1
store i32 %31, i32* %5
%32 = load i8*, i8** %4
%33 = getelementptr inbounds i8, i8* %32, i64 6
store i8* %33, i8** %4
br label %22
34: ; preds = %22
br label %35
35: ; preds = %34, %2
%36 = load i32, i32* %3
%37 = icmp sge i32 %36, 1
br i1 %37, label %38, label %46
38: ; preds = %35
%39 = load i32, i32* %3
%40 = icmp sle i32 %39, 20
br i1 %40, label %41, label %46
41: ; preds = %38
%42 = load i32, i32* %3
%43 = sub nsw i32 %42, 1
%44 = load i8*, i8** %4
%45 = call i32 @put_fnckey1(i32 %43, i8* %44)
br label %46
46: ; preds = %41, %38, %35
%47 = load i32, i32* %3
%48 = icmp sge i32 %47, 21
br i1 %48, label %49, label %57
49: ; preds = %46
%50 = load i32, i32* %3
%51 = icmp sle i32 %50, 32
br i1 %51, label %52, label %57
52: ; preds = %49
%53 = load i32, i32* %3
%54 = sub nsw i32 %53, 21
%55 = load i8*, i8** %4
%56 = call i32 @put_fnckey2(i32 %54, i8* %55)
br label %57
57: ; preds = %52, %49, %46
ret void
}

LLVM IR (-O2):
define void @put_fnckey(i32 %0, i8* %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %4, label %68
4: ; preds = %2
%5 = tail call i32 @put_fnckey1(i32 0, i8* %1)
%6 = getelementptr inbounds i8, i8* %1, i64 32
%7 = tail call i32 @put_fnckey1(i32 1, i8* %6)
%8 = getelementptr inbounds i8, i8* %1, i64 64
%9 = tail call i32 @put_fnckey1(i32 2, i8* %8)
%10 = getelementptr inbounds i8, i8* %1, i64 96
%11 = tail call i32 @put_fnckey1(i32 3, i8* %10)
%12 = getelementptr inbounds i8, i8* %1, i64 128
%13 = tail call i32 @put_fnckey1(i32 4, i8* %12)
%14 = getelementptr inbounds i8, i8* %1, i64 160
%15 = tail call i32 @put_fnckey1(i32 5, i8* %14)
%16 = getelementptr inbounds i8, i8* %1, i64 192
%17 = tail call i32 @put_fnckey1(i32 6, i8* %16)
%18 = getelementptr inbounds i8, i8* %1, i64 224
%19 = tail call i32 @put_fnckey1(i32 7, i8* %18)
%20 = getelementptr inbounds i8, i8* %1, i64 256
%21 = tail call i32 @put_fnckey1(i32 8, i8* %20)
%22 = getelementptr inbounds i8, i8* %1, i64 288
%23 = tail call i32 @put_fnckey1(i32 9, i8* %22)
%24 = getelementptr inbounds i8, i8* %1, i64 320
%25 = tail call i32 @put_fnckey1(i32 10, i8* %24)
%26 = getelementptr inbounds i8, i8* %1, i64 352
%27 = tail call i32 @put_fnckey1(i32 11, i8* %26)
%28 = getelementptr inbounds i8, i8* %1, i64 384
%29 = tail call i32 @put_fnckey1(i32 12, i8* %28)
%30 = getelementptr inbounds i8, i8* %1, i64 416
%31 = tail call i32 @put_fnckey1(i32 13, i8* %30)
%32 = getelementptr inbounds i8, i8* %1, i64 448
%33 = tail call i32 @put_fnckey1(i32 14, i8* %32)
%34 = getelementptr inbounds i8, i8* %1, i64 480
%35 = tail call i32 @put_fnckey1(i32 15, i8* %34)
%36 = getelementptr inbounds i8, i8* %1, i64 512
%37 = tail call i32 @put_fnckey1(i32 16, i8* %36)
%38 = getelementptr inbounds i8, i8* %1, i64 544
%39 = tail call i32 @put_fnckey1(i32 17, i8* %38)
%40 = getelementptr inbounds i8, i8* %1, i64 576
%41 = tail call i32 @put_fnckey1(i32 18, i8* %40)
%42 = getelementptr inbounds i8, i8* %1, i64 608
%43 = tail call i32 @put_fnckey1(i32 19, i8* %42)
%44 = getelementptr inbounds i8, i8* %1, i64 640
%45 = tail call i32 @put_fnckey2(i32 0, i8* %44)
%46 = getelementptr inbounds i8, i8* %1, i64 646
%47 = tail call i32 @put_fnckey2(i32 1, i8* %46)
%48 = getelementptr inbounds i8, i8* %1, i64 652
%49 = tail call i32 @put_fnckey2(i32 2, i8* %48)
%50 = getelementptr inbounds i8, i8* %1, i64 658
%51 = tail call i32 @put_fnckey2(i32 3, i8* %50)
%52 = getelementptr inbounds i8, i8* %1, i64 664
%53 = tail call i32 @put_fnckey2(i32 4, i8* %52)
%54 = getelementptr inbounds i8, i8* %1, i64 670
%55 = tail call i32 @put_fnckey2(i32 5, i8* %54)
%56 = getelementptr inbounds i8, i8* %1, i64 676
%57 = tail call i32 @put_fnckey2(i32 6, i8* %56)
%58 = getelementptr inbounds i8, i8* %1, i64 682
%59 = tail call i32 @put_fnckey2(i32 7, i8* %58)
%60 = getelementptr inbounds i8, i8* %1, i64 688
%61 = tail call i32 @put_fnckey2(i32 8, i8* %60)
%62 = getelementptr inbounds i8, i8* %1, i64 694
%63 = tail call i32 @put_fnckey2(i32 9, i8* %62)
%64 = getelementptr inbounds i8, i8* %1, i64 700
%65 = tail call i32 @put_fnckey2(i32 10, i8* %64)
%66 = getelementptr inbounds i8, i8* %1, i64 706
%67 = tail call i32 @put_fnckey2(i32 11, i8* %66)
br label %78
68: ; preds = %2
%69 = add i32 %0, -1
%70 = icmp ult i32 %69, 20
br i1 %70, label %71, label %73
71: ; preds = %68
%72 = tail call i32 @put_fnckey1(i32 %69, i8* %1)
br label %78
73: ; preds = %68
%74 = add i32 %0, -21
%75 = icmp ult i32 %74, 12
br i1 %75, label %76, label %78
76: ; preds = %73
%77 = tail call i32 @put_fnckey2(i32 %74, i8* %1)
br label %78
78: ; preds = %4, %71, %76, %73
ret void
}