#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*/ varint_verify(unsigned long long, char *);
int main(int argc, const char *argv[]) {
  (void)argc;
  (void)argv;
  varint_verify(0ULL, "00");
  varint_verify(5ULL, "05");
  varint_verify(127ULL, "7f");
  varint_verify(128ULL, "8001");
  varint_verify(16383ULL, "ff7f");
  varint_verify(16384ULL, "808001");
  varint_verify(16385ULL, "818001");
  varint_verify(16386ULL, "828001");
  varint_verify(16387ULL, "838001");
  varint_verify(16388ULL, "848001");
  varint_verify(3735928559ULL, "effdb6f50d");
  varint_verify(18446744073709551615ULL, "ffffffffffffffffff01");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
mov    %eax,%edi
lea    0xed6(%rip),%rsi
call   1030 <varint_verify@plt>
mov    $0x5,%edi
lea    0xec8(%rip),%rsi
call   1030 <varint_verify@plt>
mov    $0x7f,%edi
lea    0xebc(%rip),%rsi
call   1030 <varint_verify@plt>
mov    $0x80,%edi
lea    0xeb0(%rip),%rsi
call   1030 <varint_verify@plt>
mov    $0x3fff,%edi
lea    0xe98(%rip),%rsi
call   1030 <varint_verify@plt>
mov    $0x4000,%edi
lea    0xe8c(%rip),%rsi
call   1030 <varint_verify@plt>
mov    $0x4001,%edi
lea    0xe82(%rip),%rsi
call   1030 <varint_verify@plt>
mov    $0x4002,%edi
lea    0xe78(%rip),%rsi
call   1030 <varint_verify@plt>
mov    $0x4003,%edi
lea    0xe6e(%rip),%rsi
call   1030 <varint_verify@plt>
mov    $0x4004,%edi
lea    0xe64(%rip),%rsi
call   1030 <varint_verify@plt>
mov    $0xdeadbeef,%edi
lea    0xe5a(%rip),%rsi
call   1030 <varint_verify@plt>
mov    $0xffffffffffffffff,%rdi
lea    0xe52(%rip),%rsi
call   1030 <varint_verify@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rsi
xor    %edi,%edi
call   1030 <varint_verify@plt>
lea    0xedd(%rip),%rsi
mov    $0x5,%edi
call   1030 <varint_verify@plt>
lea    0xed1(%rip),%rsi
mov    $0x7f,%edi
call   1030 <varint_verify@plt>
lea    0xec5(%rip),%rsi
mov    $0x80,%edi
call   1030 <varint_verify@plt>
lea    0xead(%rip),%rsi
mov    $0x3fff,%edi
call   1030 <varint_verify@plt>
lea    0xea1(%rip),%rsi
mov    $0x4000,%edi
call   1030 <varint_verify@plt>
lea    0xe97(%rip),%rsi
mov    $0x4001,%edi
call   1030 <varint_verify@plt>
lea    0xe8d(%rip),%rsi
mov    $0x4002,%edi
call   1030 <varint_verify@plt>
lea    0xe83(%rip),%rsi
mov    $0x4003,%edi
call   1030 <varint_verify@plt>
lea    0xe79(%rip),%rsi
mov    $0x4004,%edi
call   1030 <varint_verify@plt>
lea    0xe6f(%rip),%rsi
mov    $0xdeadbeef,%edi
call   1030 <varint_verify@plt>
lea    0xe69(%rip),%rsi
mov    $0xffffffffffffffff,%rdi
call   1030 <varint_verify@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"00\00"
@.str.1 = [3 x i8] c"05\00"
@.str.2 = [3 x i8] c"7f\00"
@.str.3 = [5 x i8] c"8001\00"
@.str.4 = [5 x i8] c"ff7f\00"
@.str.5 = [7 x i8] c"808001\00"
@.str.6 = [7 x i8] c"818001\00"
@.str.7 = [7 x i8] c"828001\00"
@.str.8 = [7 x i8] c"838001\00"
@.str.9 = [7 x i8] c"848001\00"
@.str.10 = [11 x i8] c"effdb6f50d\00"
@.str.11 = [21 x i8] c"ffffffffffffffffff01\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* %3
%6 = load i8**, i8*** %4
%7 = call i32 @varint_verify(i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @varint_verify(i64 5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%9 = call i32 @varint_verify(i64 127, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 @varint_verify(i64 128, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%11 = call i32 @varint_verify(i64 16383, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%12 = call i32 @varint_verify(i64 16384, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
%13 = call i32 @varint_verify(i64 16385, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0))
%14 = call i32 @varint_verify(i64 16386, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0))
%15 = call i32 @varint_verify(i64 16387, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0))
%16 = call i32 @varint_verify(i64 16388, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0))
%17 = call i32 @varint_verify(i64 3735928559, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0))
%18 = call i32 @varint_verify(i64 -1, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.11, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"00\00"
@.str.1 = [3 x i8] c"05\00"
@.str.2 = [3 x i8] c"7f\00"
@.str.3 = [5 x i8] c"8001\00"
@.str.4 = [5 x i8] c"ff7f\00"
@.str.5 = [7 x i8] c"808001\00"
@.str.6 = [7 x i8] c"818001\00"
@.str.7 = [7 x i8] c"828001\00"
@.str.8 = [7 x i8] c"838001\00"
@.str.9 = [7 x i8] c"848001\00"
@.str.10 = [11 x i8] c"effdb6f50d\00"
@.str.11 = [21 x i8] c"ffffffffffffffffff01\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @varint_verify(i64 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @varint_verify(i64 5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @varint_verify(i64 127, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%6 = tail call i32 @varint_verify(i64 128, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%7 = tail call i32 @varint_verify(i64 16383, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%8 = tail call i32 @varint_verify(i64 16384, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
%9 = tail call i32 @varint_verify(i64 16385, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0))
%10 = tail call i32 @varint_verify(i64 16386, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0))
%11 = tail call i32 @varint_verify(i64 16387, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0))
%12 = tail call i32 @varint_verify(i64 16388, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0))
%13 = tail call i32 @varint_verify(i64 3735928559, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0))
%14 = tail call i32 @varint_verify(i64 -1, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.11, i64 0, i64 0))
ret i32 0
}