#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*/ Getc();
int /*<<< orphan*/ hash_algs(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ pub_algs(int /*<<< orphan*/);
int /*<<< orphan*/ skip(int);
extern void signature_target(int len) {
  printf("\t");
  pub_algs(Getc());
  printf("\t");
  hash_algs(Getc());
  printf("\t\tTarget signature digest(%d bytes)\n", len - 2);
  skip(len - 2);
}


x86 assembly (clang, -O0):
<signature_target>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xe9e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1060 <Getc@plt>
mov    %eax,%edi
call   1070 <pub_algs@plt>
lea    0xe82(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1060 <Getc@plt>
mov    %eax,%edi
call   1050 <hash_algs@plt>
mov    -0x4(%rbp),%esi
sub    $0x2,%esi
lea    0xe62(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x4(%rbp),%edi
sub    $0x2,%edi
call   1030 <skip@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<signature_target>:
push   %rbx
mov    %edi,%ebx
mov    $0x9,%edi
call   1040 <putchar@plt>
xor    %eax,%eax
call   1070 <Getc@plt>
mov    %eax,%edi
call   1080 <pub_algs@plt>
mov    $0x9,%edi
call   1040 <putchar@plt>
xor    %eax,%eax
call   1070 <Getc@plt>
mov    %eax,%edi
call   1060 <hash_algs@plt>
add    $0xfffffffe,%ebx
lea    0xe63(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <skip@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\09\00"
@.str.1 = [37 x i8] c"\09\09Target signature digest(%d bytes)\0A\00"
define void @signature_target(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (...) @Getc()
%5 = call i32 @pub_algs(i32 %4)
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%7 = call i32 (...) @Getc()
%8 = call i32 @hash_algs(i32 %7)
%9 = load i32, i32* %2
%10 = sub nsw i32 %9, 2
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0), i32 %10)
%12 = load i32, i32* %2
%13 = sub nsw i32 %12, 2
%14 = call i32 @skip(i32 %13)
ret void
}

LLVM IR (-O2):
@.str.1 = [37 x i8] c"\09\09Target signature digest(%d bytes)\0A\00"
define void @signature_target(i32 %0) {
%2 = tail call i32 @putchar(i32 9)
%3 = tail call i32 (...) @Getc()
%4 = tail call i32 @pub_algs(i32 %3)
%5 = tail call i32 @putchar(i32 9)
%6 = tail call i32 (...) @Getc()
%7 = tail call i32 @hash_algs(i32 %6)
%8 = add nsw i32 %0, -2
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0), i32 %8)
%10 = tail call i32 @skip(i32 %8)
ret void
}