#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__ angecrypt(char *, char *, char *, char *, char *);
int /*<<< orphan*/ assert(int);
void test_integrate() {
  long long iv[2];
  assert(angecrypt("test/cat2.jpg", "test/cat.jpg", "qualitykey123456",
                   "test/out.jpg", (char *)&iv) == 0);
  assert(iv[1] == 0x4bbc368e2ad80fb6);
  assert(iv[0] == 0x2d761769191dbb1c);
}


x86 assembly (clang, -O0):
<test_integrate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%r8
lea    0xecd(%rip),%rdi
lea    0xed4(%rip),%rsi
lea    0xeda(%rip),%rdx
lea    0xee4(%rip),%rcx
call   1030 <angecrypt@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
movabs $0x4bbc368e2ad80fb6,%rax
36 bc 4b
cmp    %rax,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
movabs $0x2d761769191dbb1c,%rax
17 76 2d
cmp    %rax,-0x10(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_integrate>:
sub    $0x18,%rsp
lea    0xed5(%rip),%rdi
lea    0xedc(%rip),%rsi
lea    0xee2(%rip),%rdx
lea    0xeec(%rip),%rcx
mov    %rsp,%r8
call   1030 <angecrypt@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   1040 <assert@plt>
movabs $0x4bbc368e2ad80fb6,%rax
36 bc 4b
xor    %edi,%edi
cmp    %rax,0x8(%rsp)
sete   %dil
call   1040 <assert@plt>
movabs $0x2d761769191dbb1c,%rax
17 76 2d
xor    %edi,%edi
cmp    %rax,(%rsp)
sete   %dil
call   1040 <assert@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [14 x i8] c"test/cat2.jpg\00"
@.str.1 = [13 x i8] c"test/cat.jpg\00"
@.str.2 = [17 x i8] c"qualitykey123456\00"
@.str.3 = [13 x i8] c"test/out.jpg\00"
define void @test_integrate() {
%1 = alloca [2 x i64]
%2 = bitcast [2 x i64]* %1 to i8*
%3 = call i64 @angecrypt(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i8* %2)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
%6 = call i32 @assert(i32 %5)
%7 = getelementptr inbounds [2 x i64], [2 x i64]* %1, i64 0, i64 1
%8 = load i64, i64* %7
%9 = icmp eq i64 %8, 5457296832698257334
%10 = zext i1 %9 to i32
%11 = call i32 @assert(i32 %10)
%12 = getelementptr inbounds [2 x i64], [2 x i64]* %1, i64 0, i64 0
%13 = load i64, i64* %12
%14 = icmp eq i64 %13, 3275831519118998300
%15 = zext i1 %14 to i32
%16 = call i32 @assert(i32 %15)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"test/cat2.jpg\00"
@.str.1 = [13 x i8] c"test/cat.jpg\00"
@.str.2 = [17 x i8] c"qualitykey123456\00"
@.str.3 = [13 x i8] c"test/out.jpg\00"
define void @test_integrate() {
%1 = alloca [2 x i64]
%2 = bitcast [2 x i64]* %1 to i8*
%3 = call i64 @angecrypt(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i8* %2)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
%6 = call i32 @assert(i32 %5)
%7 = getelementptr inbounds [2 x i64], [2 x i64]* %1, i64 0, i64 1
%8 = load i64, i64* %7
%9 = icmp eq i64 %8, 5457296832698257334
%10 = zext i1 %9 to i32
%11 = call i32 @assert(i32 %10)
%12 = getelementptr inbounds [2 x i64], [2 x i64]* %1, i64 0, i64 0
%13 = load i64, i64* %12
%14 = icmp eq i64 %13, 3275831519118998300
%15 = zext i1 %14 to i32
%16 = call i32 @assert(i32 %15)
ret void
}