#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*/ assert(int);
int /*<<< orphan*/ debian_parse_changelog_footer(char *, char *, char *, char *,
                                                 char *, char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ sprintf(char *, char *, char *);
scalar_t__ strcmp(char *, char *);
void test_debian_parse_footer() {
  char str[512];
  char email_address[512];
  char dayname[512];
  char monthday[512];
  char month[512];
  char year[512];
  printf("test_debian_parse_footer...");
  sprintf(str, "%s",
          " -- Bob Mottram (4096 bits) <bob@robotics.uk.to>  "
          "Sun, 07 Jul 2013 20:28:00 +0100 ");
  debian_parse_changelog_footer(str, email_address, dayname, monthday, month,
                                year);
  assert(strcmp(email_address,
                "Bob Mottram (4096 bits) <bob@robotics.uk.to>") == 0);
  assert(strcmp(dayname, "Sun") == 0);
  assert(strcmp(monthday, "07") == 0);
  assert(strcmp(month, "Jul") == 0);
  assert(strcmp(year, "2013") == 0);
  printf("Ok\n");
}


x86 assembly (clang, -O0):
<test_debian_parse_footer>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc00,%rsp
lea    0xe9e(%rip),%rdi
call   1030 <printf@plt>
lea    -0x200(%rbp),%rdi
lea    0xea7(%rip),%rsi
lea    0xea3(%rip),%rdx
call   1070 <sprintf@plt>
lea    -0x200(%rbp),%rdi
lea    -0x400(%rbp),%rsi
lea    -0x600(%rbp),%rdx
lea    -0x800(%rbp),%rcx
lea    -0xa00(%rbp),%r8
lea    -0xc00(%rbp),%r9
call   1060 <debian_parse_changelog_footer@plt>
lea    -0x400(%rbp),%rdi
lea    0xeb4(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
lea    -0x600(%rbp),%rdi
lea    0xebd(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
lea    -0x800(%rbp),%rdi
lea    0xe9d(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
lea    -0xa00(%rbp),%rdi
lea    0xe7c(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
lea    -0xc00(%rbp),%rdi
lea    0xe5c(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
lea    0xe44(%rip),%rdi
call   1030 <printf@plt>
add    $0xc00,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_debian_parse_footer>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xc00,%rsp
lea    0xe99(%rip),%rdi
call   1040 <printf@plt>
movups 0xea9(%rip),%xmm0
movaps %xmm0,(%rsp)
movups 0xeae(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movups 0xeb2(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movups 0xeb6(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movups 0xeba(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movl   $0x203030,0x4f(%rsp)
mov    %rsp,%rdi
lea    0xa00(%rsp),%rbx
lea    0x800(%rsp),%r13
lea    0x600(%rsp),%r12
lea    0x400(%rsp),%r15
lea    0x200(%rsp),%r14
mov    %rbx,%rsi
mov    %r13,%rdx
mov    %r12,%rcx
mov    %r15,%r8
mov    %r14,%r9
call   1070 <debian_parse_changelog_footer@plt>
lea    0xe7a(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcmp@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   1060 <assert@plt>
lea    0xe8a(%rip),%rsi
mov    %r13,%rdi
call   1050 <strcmp@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   1060 <assert@plt>
lea    0xe71(%rip),%rsi
mov    %r12,%rdi
call   1050 <strcmp@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   1060 <assert@plt>
lea    0xe57(%rip),%rsi
mov    %r15,%rdi
call   1050 <strcmp@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   1060 <assert@plt>
lea    0xe3e(%rip),%rsi
mov    %r14,%rdi
call   1050 <strcmp@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   1060 <assert@plt>
lea    0xe26(%rip),%rdi
call   1030 <puts@plt>
add    $0xc00,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [28 x i8] c"test_debian_parse_footer...\00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [83 x i8] c" -- Bob Mottram (4096 bits) <bob@robotics.uk.to> Sun, 07 Jul 2013 20:28:00 +0100 \00"
@.str.3 = [45 x i8] c"Bob Mottram (4096 bits) <bob@robotics.uk.to>\00"
@.str.4 = [4 x i8] c"Sun\00"
@.str.5 = [3 x i8] c"07\00"
@.str.6 = [4 x i8] c"Jul\00"
@.str.7 = [5 x i8] c"2013\00"
@.str.8 = [4 x i8] c"Ok\0A\00"
define void @test_debian_parse_footer() {
%1 = alloca [512 x i8]
%2 = alloca [512 x i8]
%3 = alloca [512 x i8]
%4 = alloca [512 x i8]
%5 = alloca [512 x i8]
%6 = alloca [512 x i8]
%7 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%8 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 0
%9 = call i32 @sprintf(i8* %8, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([83 x i8], [83 x i8]* @.str.2, i64 0, i64 0))
%10 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 0
%11 = getelementptr inbounds [512 x i8], [512 x i8]* %2, i64 0, i64 0
%12 = getelementptr inbounds [512 x i8], [512 x i8]* %3, i64 0, i64 0
%13 = getelementptr inbounds [512 x i8], [512 x i8]* %4, i64 0, i64 0
%14 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%15 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 0
%16 = call i32 @debian_parse_changelog_footer(i8* %10, i8* %11, i8* %12, i8* %13, i8* %14, i8* %15)
%17 = getelementptr inbounds [512 x i8], [512 x i8]* %2, i64 0, i64 0
%18 = call i64 @strcmp(i8* %17, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.3, i64 0, i64 0))
%19 = icmp eq i64 %18, 0
%20 = zext i1 %19 to i32
%21 = call i32 @assert(i32 %20)
%22 = getelementptr inbounds [512 x i8], [512 x i8]* %3, i64 0, i64 0
%23 = call i64 @strcmp(i8* %22, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0))
%24 = icmp eq i64 %23, 0
%25 = zext i1 %24 to i32
%26 = call i32 @assert(i32 %25)
%27 = getelementptr inbounds [512 x i8], [512 x i8]* %4, i64 0, i64 0
%28 = call i64 @strcmp(i8* %27, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
%29 = icmp eq i64 %28, 0
%30 = zext i1 %29 to i32
%31 = call i32 @assert(i32 %30)
%32 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%33 = call i64 @strcmp(i8* %32, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
%34 = icmp eq i64 %33, 0
%35 = zext i1 %34 to i32
%36 = call i32 @assert(i32 %35)
%37 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 0
%38 = call i64 @strcmp(i8* %37, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0))
%39 = icmp eq i64 %38, 0
%40 = zext i1 %39 to i32
%41 = call i32 @assert(i32 %40)
%42 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [28 x i8] c"test_debian_parse_footer...\00"
@.str.2 = [83 x i8] c" -- Bob Mottram (4096 bits) <bob@robotics.uk.to> Sun, 07 Jul 2013 20:28:00 +0100 \00"
@.str.3 = [45 x i8] c"Bob Mottram (4096 bits) <bob@robotics.uk.to>\00"
@.str.4 = [4 x i8] c"Sun\00"
@.str.5 = [3 x i8] c"07\00"
@.str.6 = [4 x i8] c"Jul\00"
@.str.7 = [5 x i8] c"2013\00"
@str = [3 x i8] c"Ok\00"
define void @test_debian_parse_footer() {
%1 = alloca [512 x i8]
%2 = alloca [512 x i8]
%3 = alloca [512 x i8]
%4 = alloca [512 x i8]
%5 = alloca [512 x i8]
%6 = alloca [512 x i8]
%7 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 0
%8 = getelementptr inbounds [512 x i8], [512 x i8]* %2, i64 0, i64 0
%9 = getelementptr inbounds [512 x i8], [512 x i8]* %3, i64 0, i64 0
%10 = getelementptr inbounds [512 x i8], [512 x i8]* %4, i64 0, i64 0
%11 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%12 = getelementptr inbounds [512 x i8], [512 x i8]* %6, i64 0, i64 0
%13 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%14 = call i32 @debian_parse_changelog_footer(i8* %7, i8* %8, i8* %9, i8* %10, i8* %11, i8* %12)
%15 = call i64 @strcmp(i8* %8, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.3, i64 0, i64 0))
%16 = icmp eq i64 %15, 0
%17 = zext i1 %16 to i32
%18 = call i32 @assert(i32 %17)
%19 = call i64 @strcmp(i8* %9, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0))
%20 = icmp eq i64 %19, 0
%21 = zext i1 %20 to i32
%22 = call i32 @assert(i32 %21)
%23 = call i64 @strcmp(i8* %10, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
%24 = icmp eq i64 %23, 0
%25 = zext i1 %24 to i32
%26 = call i32 @assert(i32 %25)
%27 = call i64 @strcmp(i8* %11, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
%28 = icmp eq i64 %27, 0
%29 = zext i1 %28 to i32
%30 = call i32 @assert(i32 %29)
%31 = call i64 @strcmp(i8* %12, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0))
%32 = icmp eq i64 %31, 0
%33 = zext i1 %32 to i32
%34 = call i32 @assert(i32 %33)
%35 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0))
ret void
}