#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 */
scalar_t__ Getc();
int /*<<< orphan*/ hash_algs(scalar_t__);
int /*<<< orphan*/ key_id();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ pub_algs(scalar_t__);
int /*<<< orphan*/ signature_type(scalar_t__);
int /*<<< orphan*/ ver(int, int, scalar_t__);
extern void One_Pass_Signature_Packet(int len) {
  ver(-1, 3, Getc());
  signature_type(Getc());
  hash_algs(Getc());
  pub_algs(Getc());
  key_id();
  printf("\tNext packet - ");
  if (Getc() == 0)
    printf("another one pass signature");
  else
    printf("other than one pass signature");
  printf("\n");
}


x86 assembly (clang, -O0):
<One_Pass_Signature_Packet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1050 <Getc@plt>
mov    %rax,%rdx
mov    $0xffffffff,%edi
mov    $0x3,%esi
call   1070 <ver@plt>
mov    $0x0,%al
call   1050 <Getc@plt>
mov    %rax,%rdi
call   1080 <signature_type@plt>
mov    $0x0,%al
call   1050 <Getc@plt>
mov    %rax,%rdi
call   1040 <hash_algs@plt>
mov    $0x0,%al
call   1050 <Getc@plt>
mov    %rax,%rdi
call   1060 <pub_algs@plt>
mov    $0x0,%al
call   1090 <key_id@plt>
lea    0xe31(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1050 <Getc@plt>
cmp    $0x0,%rax
jne    11f6 <One_Pass_Signature_Packet+0x86>
lea    0xe24(%rip),%rdi
call   1030 <printf@plt>
jmp    1202 <One_Pass_Signature_Packet+0x92>
lea    0xe2e(%rip),%rdi
call   1030 <printf@plt>
lea    0xe40(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<One_Pass_Signature_Packet>:
push   %rax
xor    %eax,%eax
call   1060 <Getc@plt>
mov    $0xffffffff,%edi
mov    $0x3,%esi
mov    %rax,%rdx
call   1080 <ver@plt>
xor    %eax,%eax
call   1060 <Getc@plt>
mov    %rax,%rdi
call   1090 <signature_type@plt>
xor    %eax,%eax
call   1060 <Getc@plt>
mov    %rax,%rdi
call   1050 <hash_algs@plt>
xor    %eax,%eax
call   1060 <Getc@plt>
mov    %rax,%rdi
call   1070 <pub_algs@plt>
xor    %eax,%eax
call   10a0 <key_id@plt>
lea    0xe2b(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
call   1060 <Getc@plt>
test   %rax,%rax
lea    0xe25(%rip),%rax
lea    0xe39(%rip),%rdi
cmove  %rax,%rdi
call   1040 <printf@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"\09Next packet - \00"
@.str.1 = [27 x i8] c"another one pass signature\00"
@.str.2 = [30 x i8] c"other than one pass signature\00"
@.str.3 = [2 x i8] c"\0A\00"
define void @One_Pass_Signature_Packet(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i64 (...) @Getc()
%4 = call i32 @ver(i32 -1, i32 3, i64 %3)
%5 = call i64 (...) @Getc()
%6 = call i32 @signature_type(i64 %5)
%7 = call i64 (...) @Getc()
%8 = call i32 @hash_algs(i64 %7)
%9 = call i64 (...) @Getc()
%10 = call i32 @pub_algs(i64 %9)
%11 = call i32 (...) @key_id()
%12 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%13 = call i64 (...) @Getc()
%14 = icmp eq i64 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %1
%16 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
br label %19
17: ; preds = %1
%18 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0))
br label %19
19: ; preds = %17, %15
%20 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"\09Next packet - \00"
@.str.1 = [27 x i8] c"another one pass signature\00"
@.str.2 = [30 x i8] c"other than one pass signature\00"
define void @One_Pass_Signature_Packet(i32 %0) {
%2 = tail call i64 (...) @Getc()
%3 = tail call i32 @ver(i32 -1, i32 3, i64 %2)
%4 = tail call i64 (...) @Getc()
%5 = tail call i32 @signature_type(i64 %4)
%6 = tail call i64 (...) @Getc()
%7 = tail call i32 @hash_algs(i64 %6)
%8 = tail call i64 (...) @Getc()
%9 = tail call i32 @pub_algs(i64 %8)
%10 = tail call i32 (...) @key_id()
%11 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%12 = tail call i64 (...) @Getc()
%13 = icmp eq i64 %12, 0
%14 = select i1 %13, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0)
%15 = tail call i32 @printf(i8* dereferenceable(1) %14)
%16 = tail call i32 @putchar(i32 10)
ret void
}