#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 Getc();
int /*<<< orphan*/ hash2();
int /*<<< orphan*/ hash_algs(int);
int /*<<< orphan*/ parse_signature_subpacket(char *, int);
int /*<<< orphan*/ pub_algs(int);
int /*<<< orphan*/ signature_multi_precision_integer(int, int);
int /*<<< orphan*/ signature_type(int);
void new_Signature_Packet(int len) {
  int pub, hsplen, usplen;
  signature_type(Getc());
  pub = Getc();
  pub_algs(pub);
  hash_algs(Getc());
  hsplen = Getc() * 256;
  hsplen += Getc();
  parse_signature_subpacket("Hashed Sub", hsplen);
  usplen = Getc() * 256;
  usplen += Getc();
  parse_signature_subpacket("Sub", usplen);
  hash2();
  signature_multi_precision_integer(pub, len - 9 - hsplen - usplen);
}


x86 assembly (clang, -O0):
<new_Signature_Packet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1060 <Getc@plt>
mov    %eax,%edi
call   1090 <signature_type@plt>
mov    $0x0,%al
call   1060 <Getc@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1070 <pub_algs@plt>
mov    $0x0,%al
call   1060 <Getc@plt>
mov    %eax,%edi
call   1050 <hash_algs@plt>
mov    $0x0,%al
call   1060 <Getc@plt>
shl    $0x8,%eax
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1060 <Getc@plt>
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xe33(%rip),%rdi
call   1080 <parse_signature_subpacket@plt>
mov    $0x0,%al
call   1060 <Getc@plt>
shl    $0x8,%eax
mov    %eax,-0x10(%rbp)
mov    $0x0,%al
call   1060 <Getc@plt>
add    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%esi
lea    0xe11(%rip),%rdi
call   1080 <parse_signature_subpacket@plt>
mov    $0x0,%al
call   1030 <hash2@plt>
mov    -0x8(%rbp),%edi
mov    -0x4(%rbp),%esi
sub    $0x9,%esi
sub    -0xc(%rbp),%esi
sub    -0x10(%rbp),%esi
call   1040 <signature_multi_precision_integer@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<new_Signature_Packet>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %edi,%r15d
xor    %eax,%eax
call   1060 <Getc@plt>
mov    %eax,%edi
call   1090 <signature_type@plt>
xor    %eax,%eax
call   1060 <Getc@plt>
mov    %eax,%r14d
mov    %eax,%edi
call   1070 <pub_algs@plt>
xor    %eax,%eax
call   1060 <Getc@plt>
mov    %eax,%edi
call   1050 <hash_algs@plt>
xor    %eax,%eax
call   1060 <Getc@plt>
mov    %eax,%ebx
shl    $0x8,%ebx
xor    %eax,%eax
call   1060 <Getc@plt>
mov    %eax,%r12d
add    %ebx,%r12d
lea    0xe38(%rip),%rdi
mov    %r12d,%esi
call   1080 <parse_signature_subpacket@plt>
xor    %eax,%eax
call   1060 <Getc@plt>
mov    %eax,%ebx
shl    $0x8,%ebx
xor    %eax,%eax
call   1060 <Getc@plt>
mov    %eax,%ebp
add    %ebx,%ebp
lea    0xe19(%rip),%rdi
mov    %ebp,%esi
call   1080 <parse_signature_subpacket@plt>
xor    %eax,%eax
call   1030 <hash2@plt>
add    %r12d,%ebp
sub    %ebp,%r15d
add    $0xfffffff7,%r15d
mov    %r14d,%edi
mov    %r15d,%esi
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <signature_multi_precision_integer@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"Hashed Sub\00"
@.str.1 = [4 x i8] c"Sub\00"
define void @new_Signature_Packet(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %2
%6 = call i32 (...) @Getc()
%7 = call i32 @signature_type(i32 %6)
%8 = call i32 (...) @Getc()
store i32 %8, i32* %3
%9 = load i32, i32* %3
%10 = call i32 @pub_algs(i32 %9)
%11 = call i32 (...) @Getc()
%12 = call i32 @hash_algs(i32 %11)
%13 = call i32 (...) @Getc()
%14 = mul nsw i32 %13, 256
store i32 %14, i32* %4
%15 = call i32 (...) @Getc()
%16 = load i32, i32* %4
%17 = add nsw i32 %16, %15
store i32 %17, i32* %4
%18 = load i32, i32* %4
%19 = call i32 @parse_signature_subpacket(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %18)
%20 = call i32 (...) @Getc()
%21 = mul nsw i32 %20, 256
store i32 %21, i32* %5
%22 = call i32 (...) @Getc()
%23 = load i32, i32* %5
%24 = add nsw i32 %23, %22
store i32 %24, i32* %5
%25 = load i32, i32* %5
%26 = call i32 @parse_signature_subpacket(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %25)
%27 = call i32 (...) @hash2()
%28 = load i32, i32* %3
%29 = load i32, i32* %2
%30 = sub nsw i32 %29, 9
%31 = load i32, i32* %4
%32 = sub nsw i32 %30, %31
%33 = load i32, i32* %5
%34 = sub nsw i32 %32, %33
%35 = call i32 @signature_multi_precision_integer(i32 %28, i32 %34)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"Hashed Sub\00"
@.str.1 = [4 x i8] c"Sub\00"
define void @new_Signature_Packet(i32 %0) {
%2 = tail call i32 (...) @Getc()
%3 = tail call i32 @signature_type(i32 %2)
%4 = tail call i32 (...) @Getc()
%5 = tail call i32 @pub_algs(i32 %4)
%6 = tail call i32 (...) @Getc()
%7 = tail call i32 @hash_algs(i32 %6)
%8 = tail call i32 (...) @Getc()
%9 = shl nsw i32 %8, 8
%10 = tail call i32 (...) @Getc()
%11 = add nsw i32 %9, %10
%12 = tail call i32 @parse_signature_subpacket(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = tail call i32 (...) @Getc()
%14 = shl nsw i32 %13, 8
%15 = tail call i32 (...) @Getc()
%16 = add nsw i32 %14, %15
%17 = tail call i32 @parse_signature_subpacket(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %16)
%18 = tail call i32 (...) @hash2()
%19 = add i32 %0, -9
%20 = add i32 %11, %16
%21 = sub i32 %19, %20
%22 = tail call i32 @signature_multi_precision_integer(i32 %4, i32 %21)
ret void
}