#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_header(char *, char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ sprintf(char *, char *, char *);
scalar_t__ strcmp(char *, char *);
void test_debian_parse_header() {
  char str[512];
  char version[512];
  printf("test_debian_parse_header...");
  sprintf(str, "%s", "packagemonkey (1.23-1) stable; urgency=medium");
  debian_parse_changelog_header(str, version);
  assert(strcmp(version, "1.23-1") == 0);
  printf("Ok\n");
}


x86 assembly (clang, -O0):
<test_debian_parse_header>:
push   %rbp
mov    %rsp,%rbp
sub    $0x400,%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
call   1060 <debian_parse_changelog_header@plt>
lea    -0x400(%rbp),%rdi
lea    0xeab(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
lea    0xe95(%rip),%rdi
call   1030 <printf@plt>
add    $0x400,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_debian_parse_header>:
push   %rbx
sub    $0x400,%rsp
lea    0xea1(%rip),%rdi
call   1040 <printf@plt>
movups 0xeb1(%rip),%xmm0
movaps %xmm0,(%rsp)
movups 0xeb6(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movups 0xeb8(%rip),%xmm0
movups %xmm0,0x1e(%rsp)
mov    %rsp,%rdi
lea    0x200(%rsp),%rbx
mov    %rbx,%rsi
call   1070 <debian_parse_changelog_header@plt>
lea    0xea9(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcmp@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   1060 <assert@plt>
lea    0xe93(%rip),%rdi
call   1030 <puts@plt>
add    $0x400,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [28 x i8] c"test_debian_parse_header...\00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [46 x i8] c"packagemonkey (1.23-1) stable; urgency=medium\00"
@.str.3 = [7 x i8] c"1.23-1\00"
@.str.4 = [4 x i8] c"Ok\0A\00"
define void @test_debian_parse_header() {
%1 = alloca [512 x i8]
%2 = alloca [512 x i8]
%3 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%4 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 0
%5 = call i32 @sprintf(i8* %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.2, i64 0, i64 0))
%6 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 0
%7 = getelementptr inbounds [512 x i8], [512 x i8]* %2, i64 0, i64 0
%8 = call i32 @debian_parse_changelog_header(i8* %6, i8* %7)
%9 = getelementptr inbounds [512 x i8], [512 x i8]* %2, i64 0, i64 0
%10 = call i64 @strcmp(i8* %9, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
%11 = icmp eq i64 %10, 0
%12 = zext i1 %11 to i32
%13 = call i32 @assert(i32 %12)
%14 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [28 x i8] c"test_debian_parse_header...\00"
@.str.2 = [46 x i8] c"packagemonkey (1.23-1) stable; urgency=medium\00"
@.str.3 = [7 x i8] c"1.23-1\00"
@str = [3 x i8] c"Ok\00"
define void @test_debian_parse_header() {
%1 = alloca [512 x i8]
%2 = alloca [512 x i8]
%3 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [512 x i8], [512 x i8]* %2, i64 0, i64 0
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @debian_parse_changelog_header(i8* %3, i8* %4)
%7 = call i64 @strcmp(i8* %4, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
%10 = call i32 @assert(i32 %9)
%11 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0))
ret void
}