#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*/ fprintf(int /*<<< orphan*/, char *, char *);
int sscanf(char *, char *, char *);
int /*<<< orphan*/ stderr;
void print_banner() {
  static char rcs_revision[] = "";
  static char revision[20];
  if (sscanf(rcs_revision, "$Revision: %19s", revision) != 1)
    revision[0] = '\0';
  fprintf(stderr, "This is t1asm %s.\n", revision);
}


x86 assembly (clang, -O0):
<print_banner>:
push   %rbp
mov    %rsp,%rbp
lea    0x2f15(%rip),%rdi
lea    0xece(%rip),%rsi
lea    0x2f17(%rip),%rdx
call   1040 <sscanf@plt>
cmp    $0x1,%eax
je     114e <print_banner+0x2e>
movb   $0x0,0x2f02(%rip)
mov    0x2e8b(%rip),%rax
mov    (%rax),%edi
lea    0xeb2(%rip),%rsi
lea    0x2eeb(%rip),%rdx
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_banner>:
push   %rax
lea    0x2f18(%rip),%rdi
lea    0xed1(%rip),%rsi
lea    0x2f1a(%rip),%rdx
call   1040 <sscanf@plt>
cmp    $0x1,%eax
je     1147 <print_banner+0x27>
movb   $0x0,0x2f09(%rip)
mov    0x2e92(%rip),%rax
mov    (%rax),%edi
lea    0xeb9(%rip),%rsi
lea    0x2ef2(%rip),%rdx
pop    %rax
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@print_banner.rcs_revision = internal global [1 x i8] zeroinitializer
@print_banner.revision = internal global [20 x i8] zeroinitializer
@.str = [16 x i8] c"$Revision: %19s\00"
@stderr = global i32 0
@.str.1 = [19 x i8] c"This is t1asm %s.\0A\00"
define void @print_banner() {
%1 = call i32 @sscanf(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @print_banner.rcs_revision, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @print_banner.revision, i64 0, i64 0))
%2 = icmp ne i32 %1, 1
br i1 %2, label %3, label %4
3: ; preds = %0
store i8 0, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @print_banner.revision, i64 0, i64 0)
br label %4
4: ; preds = %3, %0
%5 = load i32, i32* @stderr
%6 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @print_banner.revision, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@print_banner.rcs_revision = internal global [1 x i8] zeroinitializer
@print_banner.revision = internal global [20 x i8] zeroinitializer
@.str = [16 x i8] c"$Revision: %19s\00"
@stderr = global i32 0
@.str.1 = [19 x i8] c"This is t1asm %s.\0A\00"
define void @print_banner() {
%1 = tail call i32 @sscanf(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @print_banner.rcs_revision, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @print_banner.revision, i64 0, i64 0))
%2 = icmp eq i32 %1, 1
br i1 %2, label %4, label %3
3: ; preds = %0
store i8 0, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @print_banner.revision, i64 0, i64 0)
br label %4
4: ; preds = %3, %0
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @print_banner.revision, i64 0, i64 0))
ret void
}