#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);
scalar_t__ strcmp(char *, char *);
int /*<<< orphan*/ strlen(char *);
int url_decode(unsigned char *, int /*<<< orphan*/);
void __unitest_utils(void) {
  char buf[] = "you%20are%20good%3b%3b";
  assert(url_decode((unsigned char *)buf, strlen(buf)) == 14);
  assert(strcmp(buf, "you are good;;") == 0);
}


x86 assembly (clang, -O0):
<__unitest_utils>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0xeb1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xeae(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xeac(%rip),%eax
mov    %eax,-0x10(%rbp)
mov    0xea6(%rip),%ax
mov    %ax,-0xc(%rbp)
mov    0xe9e(%rip),%al
mov    %al,-0xa(%rbp)
lea    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
lea    -0x20(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x28(%rbp),%rdi
mov    %eax,%esi
call   1040 <url_decode@plt>
cmp    $0xe,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
lea    -0x20(%rbp),%rdi
lea    0xe65(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__unitest_utils>:
push   %rbx
sub    $0x20,%rsp
movaps 0xeb4(%rip),%xmm0
movaps %xmm0,(%rsp)
movabs $0x62332562332564,%rax
mov    %rax,0xf(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <url_decode@plt>
xor    %edi,%edi
cmp    $0xe,%eax
sete   %dil
call   1060 <assert@plt>
lea    0xe8e(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcmp@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   1060 <assert@plt>
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.__unitest_utils.buf = [23 x i8] c"you%20are%20good%3b%3b\00"
@.str = [15 x i8] c"you are good;;\00"
define void @__unitest_utils() {
%1 = alloca [23 x i8]
%2 = bitcast [23 x i8]* %1 to i8*
%3 = getelementptr inbounds [23 x i8], [23 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [23 x i8], [23 x i8]* %1, i64 0, i64 0
%5 = call i32 @strlen(i8* %4)
%6 = call i32 @url_decode(i8* %3, i32 %5)
%7 = icmp eq i32 %6, 14
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
%10 = getelementptr inbounds [23 x i8], [23 x i8]* %1, i64 0, i64 0
%11 = call i64 @strcmp(i8* %10, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%12 = icmp eq i64 %11, 0
%13 = zext i1 %12 to i32
%14 = call i32 @assert(i32 %13)
ret void
}

LLVM IR (-O2):
@__const.__unitest_utils.buf = [23 x i8] c"you%20are%20good%3b%3b\00"
@.str = [15 x i8] c"you are good;;\00"
define void @__unitest_utils() {
%1 = alloca [23 x i8]
%2 = getelementptr inbounds [23 x i8], [23 x i8]* %1, i64 0, i64 0
%3 = call i32 @strlen(i8* %2)
%4 = call i32 @url_decode(i8* %2, i32 %3)
%5 = icmp eq i32 %4, 14
%6 = zext i1 %5 to i32
%7 = call i32 @assert(i32 %6)
%8 = call i64 @strcmp(i8* %2, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%9 = icmp eq i64 %8, 0
%10 = zext i1 %9 to i32
%11 = call i32 @assert(i32 %10)
ret void
}