xunge/DecIR huggingface dataset:
void swap(int *a, int *b) {}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
ret

LLVM IR (-O0):
define void @swap(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
ret void
}

LLVM IR (-O2):
define void @swap(i32* nocapture %0, i32* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ StdOutM__UART__putDone();
void HalCC2430SimpleUartP__uart0__putDone(void) { StdOutM__UART__putDone(); }


x86 assembly (clang, -O0):
<HalCC2430SimpleUartP__uart0__putDone>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <StdOutM__UART__putDone@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<HalCC2430SimpleUartP__uart0__putDone>:
xor    %eax,%eax
jmp    1030 <StdOutM__UART__putDone@plt>

LLVM IR (-O0):
define void @HalCC2430SimpleUartP__uart0__putDone() {
%1 = call i32 (...) @StdOutM__UART__putDone()
ret void
}

LLVM IR (-O2):
define void @HalCC2430SimpleUartP__uart0__putDone() {
%1 = tail call i32 (...) @StdOutM__UART__putDone()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Goto_XY(int, int);
int /*<<< orphan*/ Print_Str(char *);
void Print_XY(int x, int y, char *string) {
  Goto_XY(x, y);
  Print_Str(string);
}


x86 assembly (clang, -O0):
<Print_XY>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <Goto_XY@plt>
mov    -0x10(%rbp),%rdi
call   1040 <Print_Str@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Print_XY>:
push   %rbx
mov    %rdx,%rbx
call   1030 <Goto_XY@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <Print_Str@plt>

LLVM IR (-O0):
define void @Print_XY(i32 %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = call i32 @Goto_XY(i32 %7, i32 %8)
%10 = load i8*, i8** %6
%11 = call i32 @Print_Str(i8* %10)
ret void
}

LLVM IR (-O2):
define void @Print_XY(i32 %0, i32 %1, i8* %2) {
%4 = tail call i32 @Goto_XY(i32 %0, i32 %1)
%5 = tail call i32 @Print_Str(i8* %2)
ret void
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint32_t;

/* Variables and functions */
__attribute__((unused)) void to_tpm_uint32(uint8_t *buffer, uint32_t x) {
  buffer[0] = (uint8_t)(x >> 24);
  buffer[1] = (uint8_t)((x >> 16) & 0xff);
  buffer[2] = (uint8_t)((x >> 8) & 0xff);
  buffer[3] = (uint8_t)(x & 0xff);
}


x86 assembly (clang, -O0):
<to_tpm_uint32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sar    $0x18,%eax
movslq %eax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0xc(%rbp),%eax
sar    $0x10,%eax
and    $0xff,%eax
movslq %eax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x8(%rax)
mov    -0xc(%rbp),%eax
sar    $0x8,%eax
and    $0xff,%eax
movslq %eax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x10(%rax)
mov    -0xc(%rbp),%eax
and    $0xff,%eax
movslq %eax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x18(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<to_tpm_uint32>:
mov    %esi,%eax
mov    %esi,%ecx
movzbl %ah,%edx
movzbl %al,%esi
sar    $0x18,%eax
cltq
mov    %rax,(%rdi)
shr    $0x10,%ecx
movzbl %cl,%eax
mov    %rax,0x8(%rdi)
mov    %rdx,0x10(%rdi)
mov    %rsi,0x18(%rdi)
ret

LLVM IR (-O0):
define void @to_tpm_uint32(i64* %0, i32 %1) {
%3 = alloca i64*
%4 = alloca i32
store i64* %0, i64** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = ashr i32 %5, 24
%7 = sext i32 %6 to i64
%8 = load i64*, i64** %3
%9 = getelementptr inbounds i64, i64* %8, i64 0
store i64 %7, i64* %9
%10 = load i32, i32* %4
%11 = ashr i32 %10, 16
%12 = and i32 %11, 255
%13 = sext i32 %12 to i64
%14 = load i64*, i64** %3
%15 = getelementptr inbounds i64, i64* %14, i64 1
store i64 %13, i64* %15
%16 = load i32, i32* %4
%17 = ashr i32 %16, 8
%18 = and i32 %17, 255
%19 = sext i32 %18 to i64
%20 = load i64*, i64** %3
%21 = getelementptr inbounds i64, i64* %20, i64 2
store i64 %19, i64* %21
%22 = load i32, i32* %4
%23 = and i32 %22, 255
%24 = sext i32 %23 to i64
%25 = load i64*, i64** %3
%26 = getelementptr inbounds i64, i64* %25, i64 3
store i64 %24, i64* %26
ret void
}

LLVM IR (-O2):
define void @to_tpm_uint32(i64* nocapture writeonly %0, i32 %1) {
%3 = ashr i32 %1, 24
%4 = sext i32 %3 to i64
store i64 %4, i64* %0
%5 = lshr i32 %1, 16
%6 = and i32 %5, 255
%7 = zext i32 %6 to i64
%8 = getelementptr inbounds i64, i64* %0, i64 1
store i64 %7, i64* %8
%9 = lshr i32 %1, 8
%10 = and i32 %9, 255
%11 = zext i32 %10 to i64
%12 = getelementptr inbounds i64, i64* %0, i64 2
store i64 %11, i64* %12
%13 = and i32 %1, 255
%14 = zext i32 %13 to i64
%15 = getelementptr inbounds i64, i64* %0, i64 3
store i64 %14, i64* %15
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ft_strdel(char **);
char *ft_strjoin(char *, char *);
char *ft_strmerge(char *a, char *b) {
  char *ret;
  ret = ft_strjoin(a, b);
  ft_strdel(&a);
  ft_strdel(&b);
  return (ret);
}


x86 assembly (clang, -O0):
<ft_strmerge>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <ft_strjoin@plt>
mov    %rax,-0x18(%rbp)
lea    -0x8(%rbp),%rdi
call   1030 <ft_strdel@plt>
lea    -0x10(%rbp),%rdi
call   1030 <ft_strdel@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_strmerge>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,0x8(%rsp)
mov    %rsi,(%rsp)
call   1040 <ft_strjoin@plt>
mov    %rax,%rbx
lea    0x8(%rsp),%rdi
call   1030 <ft_strdel@plt>
mov    %rsp,%rdi
call   1030 <ft_strdel@plt>
mov    %rbx,%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i8* @ft_strmerge(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
%8 = call i8* @ft_strjoin(i8* %6, i8* %7)
store i8* %8, i8** %5
%9 = call i32 @ft_strdel(i8** %3)
%10 = call i32 @ft_strdel(i8** %4)
%11 = load i8*, i8** %5
ret i8* %11
}

LLVM IR (-O2):
define i8* @ft_strmerge(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = tail call i8* @ft_strjoin(i8* %0, i8* %1)
%6 = call i32 @ft_strdel(i8** %3)
%7 = call i32 @ft_strdel(i8** %4)
ret i8* %5
}
int signed_range(int min, int max) {
  extern int random_signed_value(void);
  int val = random_signed_value();
  if (val < min || max < val)
    val = min;
  return val;
}


x86 assembly (clang, -O0):
<signed_range>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
call   1030 <random_signed_value@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jl     113e <signed_range+0x2e>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1144 <signed_range+0x34>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<signed_range>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
call   1030 <random_signed_value@plt>
cmp    %ebx,%eax
mov    %eax,%ecx
cmovg  %ebp,%ecx
cmp    %ebp,%eax
cmovl  %ebp,%ecx
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @signed_range(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = call i32 @random_signed_value()
store i32 %6, i32* %5
%7 = load i32, i32* %5
%8 = load i32, i32* %3
%9 = icmp slt i32 %7, %8
br i1 %9, label %14, label %10
10: ; preds = %2
%11 = load i32, i32* %4
%12 = load i32, i32* %5
%13 = icmp slt i32 %11, %12
br i1 %13, label %14, label %16
14: ; preds = %10, %2
%15 = load i32, i32* %3
store i32 %15, i32* %5
br label %16
16: ; preds = %14, %10
%17 = load i32, i32* %5
ret i32 %17
}

LLVM IR (-O2):
define i32 @signed_range(i32 %0, i32 %1) {
%3 = tail call i32 @random_signed_value()
%4 = icmp slt i32 %3, %0
%5 = icmp sgt i32 %3, %1
%6 = or i1 %4, %5
%7 = select i1 %6, i32 %0, i32 %3
ret i32 %7
}
/* Variables and functions */
long double log2l(long double);
double interv2cents(double interv) {
  return (double)((long double)1200.0 * log2l((long double)interv));
}


x86 assembly (clang, -O0):
<interv2cents>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
fldl   -0x8(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <log2l@plt>
flds   0xed0(%rip)
fmulp  %st,%st(1)
fstpl  -0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<interv2cents>:
sub    $0x28,%rsp
movsd  %xmm0,0x20(%rsp)
fldl   0x20(%rsp)
fstpt  (%rsp)
call   1030 <log2l@plt>
fmuls  0xed4(%rip)
fstpl  0x18(%rsp)
movsd  0x18(%rsp),%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
define double @interv2cents(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fpext double %3 to x86_fp80
%5 = call x86_fp80 @log2l(x86_fp80 %4)
%6 = fmul x86_fp80 0xK40099600000000000000, %5
%7 = fptrunc x86_fp80 %6 to double
ret double %7
}

LLVM IR (-O2):
define double @interv2cents(double %0) {
%2 = fpext double %0 to x86_fp80
%3 = tail call x86_fp80 @log2l(x86_fp80 %2)
%4 = fmul x86_fp80 %3, 0xK40099600000000000000
%5 = fptrunc x86_fp80 %4 to double
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void sdd_dump_string(void *context, void *element) {
  printf("%s ", (const char *)element);
}


x86 assembly (clang, -O0):
<sdd_dump_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sdd_dump_string>:
lea    0xee9(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%s \00"
define void @sdd_dump_string(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %5)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s \00"
define void @sdd_dump_string(i8* nocapture readnone %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ lcd_op(int, int, int /*<<< orphan*/);
void lcd_rightscroll(void) { lcd_op(0x10 | 0x8 | 0x4, 0x1, 0); }


x86 assembly (clang, -O0):
<lcd_rightscroll>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1c,%edi
mov    $0x1,%esi
xor    %edx,%edx
call   1030 <lcd_op@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<lcd_rightscroll>:
mov    $0x1c,%edi
mov    $0x1,%esi
xor    %edx,%edx
jmp    1030 <lcd_op@plt>

LLVM IR (-O0):
define void @lcd_rightscroll() {
%1 = call i32 @lcd_op(i32 28, i32 1, i32 0)
ret void
}

LLVM IR (-O2):
define void @lcd_rightscroll() {
%1 = tail call i32 @lcd_op(i32 28, i32 1, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage() {
  fprintf(stderr, "usage: gen_random_init\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [24 x i8] c"usage: gen_random_init\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [24 x i8] c"usage: gen_random_init\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int rave(void) { printf("RAVE "); }


x86 assembly (clang, -O0):
<rave>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rave>:
lea    0xee9(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"RAVE \00"
define i32 @rave() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@.str = [6 x i8] c"RAVE \00"
define i32 @rave() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ tempString;

/* Variables and functions */
int setStandardProcedure(char *);
int /*<<< orphan*/ snprintf(char *, int, char *, int);
int setMinElevationLimit(int min) {
  char tempString[16];
  snprintf(tempString, sizeof(tempString), "#:Sh%02d#", min);
  return (setStandardProcedure(tempString));
}


x86 assembly (clang, -O0):
<setMinElevationLimit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x20(%rbp),%rdi
mov    -0x4(%rbp),%ecx
mov    $0x10,%esi
lea    0xec2(%rip),%rdx
call   1040 <snprintf@plt>
lea    -0x20(%rbp),%rdi
call   1030 <setStandardProcedure@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setMinElevationLimit>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ecx
lea    0xed2(%rip),%rdx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x10,%esi
call   1040 <snprintf@plt>
mov    %rbx,%rdi
call   1030 <setStandardProcedure@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"#:Sh%02d#\00"
define i32 @setMinElevationLimit(i32 %0) {
%2 = alloca i32
%3 = alloca [16 x i8]
store i32 %0, i32* %2
%4 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%5 = load i32, i32* %2
%6 = call i32 @snprintf(i8* %4, i32 16, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%8 = call i32 @setStandardProcedure(i8* %7)
ret i32 %8
}

LLVM IR (-O2):
@.str = [10 x i8] c"#:Sh%02d#\00"
define i32 @setMinElevationLimit(i32 %0) {
%2 = alloca [16 x i8]
%3 = getelementptr inbounds [16 x i8], [16 x i8]* %2, i64 0, i64 0
%4 = call i32 @snprintf(i8* %3, i32 16, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %0)
%5 = call i32 @setStandardProcedure(i8* %3)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main() {
  char c = 'A';
  char *p;
  p = &c;
  printf("Address of c : %p\n", p);
  printf("Address of p : %p\n", &p);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x41,-0x5(%rbp)
lea    -0x5(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecf(%rip),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movb   $0x41,0xf(%rsp)
lea    0xf(%rsp),%rsi
mov    %rsi,0x10(%rsp)
lea    0xed6(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xedb(%rip),%rdi
lea    0x10(%rsp),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [19 x i8] c"Address of c : %p\0A\00"
@.str.1 = [19 x i8] c"Address of p : %p\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i8*
store i32 0, i32* %1
store i8 65, i8* %2
store i8* %2, i8** %3
%4 = load i8*, i8** %3
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8** %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"Address of c : %p\0A\00"
@.str.1 = [19 x i8] c"Address of p : %p\0A\00"
define i32 @main() {
%1 = alloca i8
%2 = alloca i8*
store i8 65, i8* %1
%3 = bitcast i8** %2 to i8*
store i8* %1, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %1)
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8** %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
void header(char *buf, char *content_type) {
  strcpy(buf, "HTTP/1.0 200 OK\r\n");
  if (content_type) {
    strcat(buf, "Content-type: \r\n");
    strcat(buf, content_type);
    strcat(buf, "\r\n");
  }
}


x86 assembly (clang, -O0):
<header>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec5(%rip),%rsi
call   1030 <strcpy@plt>
cmpq   $0x0,-0x10(%rbp)
je     1178 <header+0x58>
mov    -0x8(%rbp),%rdi
lea    0xebc(%rip),%rsi
call   1040 <strcat@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <strcat@plt>
mov    -0x8(%rbp),%rdi
lea    0xead(%rip),%rsi
call   1040 <strcat@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<header>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xecf(%rip),%rsi
call   1030 <strcpy@plt>
test   %r14,%r14
je     116b <header+0x4b>
lea    0xed0(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcat@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <strcat@plt>
lea    0xec4(%rip),%rsi
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <strcat@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [18 x i8] c"HTTP/1.0 200 OK\0D\0A\00"
@.str.1 = [17 x i8] c"Content-type: \0D\0A\00"
@.str.2 = [3 x i8] c"\0D\0A\00"
define void @header(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = call i32 @strcpy(i8* %5, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%7 = load i8*, i8** %4
%8 = icmp ne i8* %7, null
br i1 %8, label %9, label %17
9: ; preds = %2
%10 = load i8*, i8** %3
%11 = call i32 @strcat(i8* %10, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%12 = load i8*, i8** %3
%13 = load i8*, i8** %4
%14 = call i32 @strcat(i8* %12, i8* %13)
%15 = load i8*, i8** %3
%16 = call i32 @strcat(i8* %15, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
br label %17
17: ; preds = %9, %2
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"HTTP/1.0 200 OK\0D\0A\00"
@.str.1 = [17 x i8] c"Content-type: \0D\0A\00"
@.str.2 = [3 x i8] c"\0D\0A\00"
define void @header(i8* %0, i8* %1) {
%3 = tail call i32 @strcpy(i8* %0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i8* %1, null
br i1 %4, label %9, label %5
5: ; preds = %2
%6 = tail call i32 @strcat(i8* %0, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%7 = tail call i32 @strcat(i8* %0, i8* %1)
%8 = tail call i32 @strcat(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
br label %9
9: ; preds = %5, %2
ret void
}
/* Type definitions */
struct bi_tree {
  int dummy;
};

/* Variables and functions */
struct bi_tree *bi_tree_init_impl(size_t);
struct bi_tree *bi_tree_init(size_t n) {
  return bi_tree_init_impl(n);
}


x86 assembly (clang, -O0):
<bi_tree_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <bi_tree_init_impl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bi_tree_init>:
jmp    1030 <bi_tree_init_impl@plt>

LLVM IR (-O0):
%struct.bi_tree = type { i32 }
define %struct.bi_tree* @bi_tree_init(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call %struct.bi_tree* @bi_tree_init_impl(i64 %3)
ret %struct.bi_tree* %4
}

LLVM IR (-O2):
%struct.bi_tree = type { i32 }
define %struct.bi_tree* @bi_tree_init(i64 %0) {
%2 = tail call %struct.bi_tree* @bi_tree_init_impl(i64 %0)
ret %struct.bi_tree* %2
}
/* Variables and functions */
int /*<<< orphan*/ load_config_file(char *);
void load_server_config(void) { load_config_file("/etc/unfit"); }


x86 assembly (clang, -O0):
<load_server_config>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <load_config_file@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<load_server_config>:
lea    0xee9(%rip),%rdi
jmp    1030 <load_config_file@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"/etc/unfit\00"
define void @load_server_config() {
%1 = call i32 @load_config_file(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"/etc/unfit\00"
define void @load_server_config() {
%1 = tail call i32 @load_config_file(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret void
}
int debug(void) { return 1; }


x86 assembly (clang, -O0):
<debug>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<debug>:
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @debug() {
ret i32 1
}

LLVM IR (-O2):
define i32 @debug() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char *);
char *hux(char *s) {
  static char string[500];
  strcpy(string, "TOTO EST CONTENT");
  return string;
}


x86 assembly (clang, -O0):
<hux>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0x2f1d(%rip),%rdi
lea    0xed6(%rip),%rsi
call   1030 <strcpy@plt>
lea    0x2f0a(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hux>:
push   %rbx
lea    0x2f28(%rip),%rbx
lea    0xee1(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@hux.string = internal global [500 x i8] zeroinitializer
@.str = [17 x i8] c"TOTO EST CONTENT\00"
define i8* @hux(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @strcpy(i8* getelementptr inbounds ([500 x i8], [500 x i8]* @hux.string, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret i8* getelementptr inbounds ([500 x i8], [500 x i8]* @hux.string, i64 0, i64 0)
}

LLVM IR (-O2):
@hux.string = internal global [500 x i8] zeroinitializer
@.str = [17 x i8] c"TOTO EST CONTENT\00"
define i8* @hux(i8* nocapture readnone %0) {
%2 = tail call i32 @strcpy(i8* getelementptr inbounds ([500 x i8], [500 x i8]* @hux.string, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret i8* getelementptr inbounds ([500 x i8], [500 x i8]* @hux.string, i64 0, i64 0)
}
unsigned long bswap_ul(unsigned long in) {
  unsigned long out;
  out = ((in >> 24) & 0xFF) << 0;
  out |= ((in >> 16) & 0xFF) << 8;
  out |= ((in >> 8) & 0xFF) << 16;
  out |= ((in >> 0) & 0xFF) << 24;
  return out;
}


x86 assembly (clang, -O0):
<bswap_ul>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x18,%rax
and    $0xff,%rax
shl    $0x0,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x10,%rax
and    $0xff,%rax
shl    $0x8,%rax
or     -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x8,%rax
and    $0xff,%rax
shl    $0x10,%rax
or     -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x0,%rax
and    $0xff,%rax
shl    $0x18,%rax
or     -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bswap_ul>:
mov    %rdi,%rax
bswap  %eax
ret

LLVM IR (-O0):
define i64 @bswap_ul(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = lshr i64 %4, 24
%6 = and i64 %5, 255
%7 = shl i64 %6, 0
store i64 %7, i64* %3
%8 = load i64, i64* %2
%9 = lshr i64 %8, 16
%10 = and i64 %9, 255
%11 = shl i64 %10, 8
%12 = load i64, i64* %3
%13 = or i64 %12, %11
store i64 %13, i64* %3
%14 = load i64, i64* %2
%15 = lshr i64 %14, 8
%16 = and i64 %15, 255
%17 = shl i64 %16, 16
%18 = load i64, i64* %3
%19 = or i64 %18, %17
store i64 %19, i64* %3
%20 = load i64, i64* %2
%21 = lshr i64 %20, 0
%22 = and i64 %21, 255
%23 = shl i64 %22, 24
%24 = load i64, i64* %3
%25 = or i64 %24, %23
store i64 %25, i64* %3
%26 = load i64, i64* %3
ret i64 %26
}

LLVM IR (-O2):
define i64 @bswap_ul(i64 %0) {
%2 = trunc i64 %0 to i32
%3 = tail call i32 @llvm.bswap.i32(i32 %2)
%4 = zext i32 %3 to i64
ret i64 %4
}
/* Variables and functions */
char *libintl_dcngettext(char const *, char const *, char const *,
                         unsigned long, int);
char *dcngettext(const char *domainname, const char *msgid1, const char *msgid2,
                 unsigned long int n, int category) {
  return libintl_dcngettext(domainname, msgid1, msgid2, n, category);
}


x86 assembly (clang, -O0):
<dcngettext>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x24(%rbp),%r8d
call   1030 <libintl_dcngettext@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dcngettext>:
jmp    1030 <libintl_dcngettext@plt>

LLVM IR (-O0):
define i8* @dcngettext(i8* %0, i8* %1, i8* %2, i64 %3, i32 %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i64
%10 = alloca i32
store i8* %0, i8** %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i64 %3, i64* %9
store i32 %4, i32* %10
%11 = load i8*, i8** %6
%12 = load i8*, i8** %7
%13 = load i8*, i8** %8
%14 = load i64, i64* %9
%15 = load i32, i32* %10
%16 = call i8* @libintl_dcngettext(i8* %11, i8* %12, i8* %13, i64 %14, i32 %15)
ret i8* %16
}

LLVM IR (-O2):
define i8* @dcngettext(i8* %0, i8* %1, i8* %2, i64 %3, i32 %4) {
%6 = tail call i8* @libintl_dcngettext(i8* %0, i8* %1, i8* %2, i64 %3, i32 %4)
ret i8* %6
}
unsigned short unsignedshort_ignoring_signedlongint(unsigned short x,
                                                    signed long int y) {
  return x;
}


x86 assembly (clang, -O0):
<unsignedshort_ignoring_signedlongint>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %rsi,-0x10(%rbp)
movzwl -0x2(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<unsignedshort_ignoring_signedlongint>:
mov    %edi,%eax
ret

LLVM IR (-O0):
define zeroext i16 @unsignedshort_ignoring_signedlongint(i16 zeroext %0, i64 %1) {
%3 = alloca i16
%4 = alloca i64
store i16 %0, i16* %3
store i64 %1, i64* %4
%5 = load i16, i16* %3
ret i16 %5
}

LLVM IR (-O2):
define zeroext i16 @unsignedshort_ignoring_signedlongint(i16 returned zeroext %0, i64 %1) {
ret i16 %0
}
void snd_ak4113_resume(struct ak4113 *chip) {}


x86 assembly (clang, -O0):
<snd_ak4113_resume>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<snd_ak4113_resume>:
ret

LLVM IR (-O0):
%struct.ak4113 = type opaque
define void @snd_ak4113_resume(%struct.ak4113* %0) {
%2 = alloca %struct.ak4113*
store %struct.ak4113* %0, %struct.ak4113** %2
ret void
}

LLVM IR (-O2):
%struct.ak4113 = type opaque
define void @snd_ak4113_resume(%struct.ak4113* nocapture %0) {
ret void
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int x, y;
  x = __VERIFIER_nondet_int();
  y = __VERIFIER_nondet_int();
  while (x > 0 && y < 0) {
    x = x + y;
    y = y - 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0xd(%rbp)
jle    114c <main+0x3c>
cmpl   $0x0,-0xc(%rbp)
setl   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    115c <main+0x4c>
jmp    1173 <main+0x63>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1133 <main+0x23>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %4, i32* %2
%5 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %5, i32* %3
br label %6
6: ; preds = %14, %0
%7 = load i32, i32* %2
%8 = icmp sgt i32 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = load i32, i32* %3
%11 = icmp slt i32 %10, 0
br label %12
12: ; preds = %9, %6
%13 = phi i1 [ false, %6 ], [ %11, %9 ]
br i1 %13, label %14, label %20
14: ; preds = %12
%15 = load i32, i32* %2
%16 = load i32, i32* %3
%17 = add nsw i32 %15, %16
store i32 %17, i32* %2
%18 = load i32, i32* %3
%19 = sub nsw i32 %18, 1
store i32 %19, i32* %3
br label %6
20: ; preds = %12
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ vo_draw_alpha_rgb32_C(int, int, unsigned char *,
                                         unsigned char *, int, unsigned char *,
                                         int);
void vo_draw_alpha_rgb32(int w, int h, unsigned char *src, unsigned char *srca,
                         int srcstride, unsigned char *dstbase, int dststride) {
  vo_draw_alpha_rgb32_C(w, h, src, srca, srcstride, dstbase, dststride);
}


x86 assembly (clang, -O0):
<vo_draw_alpha_rgb32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x1c(%rbp),%r8d
mov    -0x28(%rbp),%r9
mov    0x10(%rbp),%eax
mov    %eax,(%rsp)
call   1030 <vo_draw_alpha_rgb32_C@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vo_draw_alpha_rgb32>:
jmp    1030 <vo_draw_alpha_rgb32_C@plt>

LLVM IR (-O0):
define void @vo_draw_alpha_rgb32(i32 %0, i32 %1, i8* %2, i8* %3, i32 %4, i8* %5, i32 %6) {
%8 = alloca i32
%9 = alloca i32
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i32
%13 = alloca i8*
%14 = alloca i32
store i32 %0, i32* %8
store i32 %1, i32* %9
store i8* %2, i8** %10
store i8* %3, i8** %11
store i32 %4, i32* %12
store i8* %5, i8** %13
store i32 %6, i32* %14
%15 = load i32, i32* %8
%16 = load i32, i32* %9
%17 = load i8*, i8** %10
%18 = load i8*, i8** %11
%19 = load i32, i32* %12
%20 = load i8*, i8** %13
%21 = load i32, i32* %14
%22 = call i32 @vo_draw_alpha_rgb32_C(i32 %15, i32 %16, i8* %17, i8* %18, i32 %19, i8* %20, i32 %21)
ret void
}

LLVM IR (-O2):
define void @vo_draw_alpha_rgb32(i32 %0, i32 %1, i8* %2, i8* %3, i32 %4, i8* %5, i32 %6) {
%8 = tail call i32 @vo_draw_alpha_rgb32_C(i32 %0, i32 %1, i8* %2, i8* %3, i32 %4, i8* %5, i32 %6)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_barrier_t;

/* Variables and functions */
int /*<<< orphan*/ pthread_barrier_init(int /*<<< orphan*/ *,
                                        int /*<<< orphan*/, int);
int main(int argc, char **argv) {
  pthread_barrier_t b;
  pthread_barrier_init(&b, 0, 1);
  pthread_barrier_init(&b, 0, 1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x14(%rbp),%rdi
xor    %esi,%esi
mov    $0x1,%edx
call   1030 <pthread_barrier_init@plt>
lea    -0x14(%rbp),%rdi
xor    %esi,%esi
mov    $0x1,%edx
call   1030 <pthread_barrier_init@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x1,%edx
call   1030 <pthread_barrier_init@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x1,%edx
call   1030 <pthread_barrier_init@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 @pthread_barrier_init(i32* %6, i32 0, i32 1)
%8 = call i32 @pthread_barrier_init(i32* %6, i32 0, i32 1)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i32 @pthread_barrier_init(i32* %3, i32 0, i32 1)
%6 = call i32 @pthread_barrier_init(i32* %3, i32 0, i32 1)
ret i32 0
}
int vazia(int fimLista) {
  if (fimLista == -1) {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<vazia>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0xffffffff,-0x8(%rbp)
jne    111d <vazia+0x1d>
movl   $0x1,-0x4(%rbp)
jmp    1124 <vazia+0x24>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<vazia>:
xor    %eax,%eax
cmp    $0xffffffff,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @vazia(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 1, i32* %2
br label %8
7: ; preds = %1
store i32 0, i32* %2
br label %8
8: ; preds = %7, %6
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
define i32 @vazia(i32 %0) {
%2 = icmp eq i32 %0, -1
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void delete_arg(char *arg) { free(arg); }


x86 assembly (clang, -O0):
<delete_arg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<delete_arg>:
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @delete_arg(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @free(i8* %3)
ret void
}

LLVM IR (-O2):
define void @delete_arg(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int tb_probe_wdl_impl(int /*<<< orphan*/, int /*<<< orphan*/,
                      int /*<<< orphan*/, int /*<<< orphan*/,
                      int /*<<< orphan*/, int /*<<< orphan*/,
                      int /*<<< orphan*/, int /*<<< orphan*/, unsigned int,
                      int);
unsigned tb_probe_wdl(uint64_t _white, uint64_t _black, uint64_t _kings,
                      uint64_t _queens, uint64_t _rooks, uint64_t _bishops,
                      uint64_t _knights, uint64_t _pawns, unsigned _ep,
                      bool _turn) {
  return tb_probe_wdl_impl(_white, _black, _kings, _queens, _rooks, _bishops,
                           _knights, _pawns, _ep, _turn);
}


x86 assembly (clang, -O0):
<tb_probe_wdl>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
sub    $0x38,%rsp
mov    0x28(%rbp),%eax
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %edi,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9d,-0x20(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    -0x1c(%rbp),%r8d
mov    -0x20(%rbp),%r9d
mov    0x10(%rbp),%ebx
mov    0x18(%rbp),%r11d
mov    0x20(%rbp),%r10d
mov    0x28(%rbp),%eax
mov    %ebx,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10d,0x10(%rsp)
mov    %eax,0x18(%rsp)
call   1030 <tb_probe_wdl_impl@plt>
add    $0x38,%rsp
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<tb_probe_wdl>:
jmp    1030 <tb_probe_wdl_impl@plt>

LLVM IR (-O0):
define i32 @tb_probe_wdl(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7, i32 %8, i32 %9) {
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
store i32 %0, i32* %11
store i32 %1, i32* %12
store i32 %2, i32* %13
store i32 %3, i32* %14
store i32 %4, i32* %15
store i32 %5, i32* %16
store i32 %6, i32* %17
store i32 %7, i32* %18
store i32 %8, i32* %19
store i32 %9, i32* %20
%21 = load i32, i32* %11
%22 = load i32, i32* %12
%23 = load i32, i32* %13
%24 = load i32, i32* %14
%25 = load i32, i32* %15
%26 = load i32, i32* %16
%27 = load i32, i32* %17
%28 = load i32, i32* %18
%29 = load i32, i32* %19
%30 = load i32, i32* %20
%31 = call i32 @tb_probe_wdl_impl(i32 %21, i32 %22, i32 %23, i32 %24, i32 %25, i32 %26, i32 %27, i32 %28, i32 %29, i32 %30)
ret i32 %31
}

LLVM IR (-O2):
define i32 @tb_probe_wdl(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7, i32 %8, i32 %9) {
%11 = tail call i32 @tb_probe_wdl_impl(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7, i32 %8, i32 %9)
ret i32 %11
}
void __error__(char *pcFilename, unsigned long ulLine) {}


x86 assembly (clang, -O0):
<__error__>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<__error__>:
ret

LLVM IR (-O0):
define void @__error__(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
ret void
}

LLVM IR (-O2):
define void @__error__(i8* nocapture %0, i64 %1) {
ret void
}
void gtk_selection_data_get_targets() {}


x86 assembly (clang, -O0):
<gtk_selection_data_get_targets>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gtk_selection_data_get_targets>:
ret

LLVM IR (-O0):
define void @gtk_selection_data_get_targets() {
ret void
}

LLVM IR (-O2):
define void @gtk_selection_data_get_targets() {
ret void
}
void swap(int arr[], int a, int b) {
  int tmp = arr[a];
  arr[a] = arr[b];
  arr[b] = tmp;
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
movslq %esi,%rax
mov    (%rdi,%rax,4),%ecx
movslq %edx,%rdx
mov    (%rdi,%rdx,4),%esi
mov    %esi,(%rdi,%rax,4)
mov    %ecx,(%rdi,%rdx,4)
ret

LLVM IR (-O0):
define void @swap(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32*, i32** %4
%9 = load i32, i32* %5
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i32, i32* %8, i64 %10
%12 = load i32, i32* %11
store i32 %12, i32* %7
%13 = load i32*, i32** %4
%14 = load i32, i32* %6
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i32, i32* %13, i64 %15
%17 = load i32, i32* %16
%18 = load i32*, i32** %4
%19 = load i32, i32* %5
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i32, i32* %18, i64 %20
store i32 %17, i32* %21
%22 = load i32, i32* %7
%23 = load i32*, i32** %4
%24 = load i32, i32* %6
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds i32, i32* %23, i64 %25
store i32 %22, i32* %26
ret void
}

LLVM IR (-O2):
define void @swap(i32* nocapture %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
%6 = load i32, i32* %5
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
store i32 %9, i32* %5
store i32 %6, i32* %8
ret void
}
/* Variables and functions */
scalar_t__ islower(char);
char toupper(char);
char touppercase(char ch) {
  if (islower(ch)) {
    ch = toupper(ch);
  }
  return ch;
}


x86 assembly (clang, -O0):
<touppercase>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <islower@plt>
cmp    $0x0,%rax
je     114d <touppercase+0x2d>
movsbl -0x1(%rbp),%edi
call   1040 <toupper@plt>
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<touppercase>:
push   %rbx
mov    %edi,%ebx
call   1030 <islower@plt>
test   %rax,%rax
je     1136 <touppercase+0x16>
movsbl %bl,%edi
pop    %rbx
jmp    1040 <toupper@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define signext i8 @touppercase(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i64 @islower(i8 signext %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i8, i8* %2
%8 = call signext i8 @toupper(i8 signext %7)
store i8 %8, i8* %2
br label %9
9: ; preds = %6, %1
%10 = load i8, i8* %2
ret i8 %10
}

LLVM IR (-O2):
define signext i8 @touppercase(i8 signext %0) {
%2 = tail call i64 @islower(i8 signext %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call signext i8 @toupper(i8 signext %0)
br label %6
6: ; preds = %4, %1
%7 = phi i8 [ %5, %4 ], [ %0, %1 ]
ret i8 %7
}
/* Variables and functions */
int strlen(char *);
void reverse(char s[]) {
  void reverser(char s[], int i, int len);
  reverser(s, 0, strlen(s));
}


x86 assembly (clang, -O0):
<reverse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%edx
xor    %esi,%esi
call   1040 <reverser@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reverse>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    %eax,%edx
pop    %rbx
jmp    1040 <reverser@plt>

LLVM IR (-O0):
define void @reverse(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
ret void
}

LLVM IR (-O2):
define void @reverse(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
tail call void @reverser(i8* %0, i32 0, i32 %2)
ret void
}
void set_operator_func(int opid) {}


x86 assembly (clang, -O0):
<set_operator_func>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_operator_func>:
ret

LLVM IR (-O0):
define void @set_operator_func(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret void
}

LLVM IR (-O2):
define void @set_operator_func(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __writeDigit(int);
int /*<<< orphan*/ __writeString(char *);
int write2DecimalDigit(int val) {
  __writeDigit(val / 100);
  __writeString(".");
  __writeDigit(val % 100);
}


x86 assembly (clang, -O0):
<write2DecimalDigit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1040 <__writeDigit@plt>
lea    0xebc(%rip),%rdi
call   1030 <__writeString@plt>
mov    -0x8(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %edx,%edi
call   1040 <__writeDigit@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write2DecimalDigit>:
push   %r14
push   %rbx
push   %rax
movslq %edi,%r14
imul   $0x51eb851f,%r14,%rbx
mov    %rbx,%rax
shr    $0x3f,%rax
sar    $0x25,%rbx
add    %eax,%ebx
mov    %ebx,%edi
call   1040 <__writeDigit@plt>
lea    0xeb7(%rip),%rdi
call   1030 <__writeString@plt>
imul   $0x64,%ebx,%eax
sub    %eax,%r14d
mov    %r14d,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <__writeDigit@plt>

LLVM IR (-O0):
@.str = [2 x i8] c".\00"
define i32 @write2DecimalDigit(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = sdiv i32 %4, 100
%6 = call i32 @__writeDigit(i32 %5)
%7 = call i32 @__writeString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* %3
%9 = srem i32 %8, 100
%10 = call i32 @__writeDigit(i32 %9)
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
@.str = [2 x i8] c".\00"
define i32 @write2DecimalDigit(i32 %0) {
%2 = sdiv i32 %0, 100
%3 = tail call i32 @__writeDigit(i32 %2)
%4 = tail call i32 @__writeString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%5 = srem i32 %0, 100
%6 = tail call i32 @__writeDigit(i32 %5)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void gcbs_mtabfree(void *mtab, void *unused) { free(mtab); }


x86 assembly (clang, -O0):
<gcbs_mtabfree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gcbs_mtabfree>:
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @gcbs_mtabfree(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = call i32 @free(i8* %5)
ret void
}

LLVM IR (-O2):
define void @gcbs_mtabfree(i8* nocapture %0, i8* nocapture readnone %1) {
%3 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isascii(int);
void t_isascii_0x73() {
  Assert_real((isascii(115)),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isascii.c",
              580, ("isascii should be 1 for s"));
}


x86 assembly (clang, -O0):
<t_isascii_0x73>:
push   %rbp
mov    %rsp,%rbp
mov    $0x73,%edi
call   1030 <isascii@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x244,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isascii_0x73>:
lea    0xee9(%rip),%rsi
lea    0xf8a(%rip),%rcx
mov    $0x1,%edi
mov    $0x244,%edx
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isascii.c\00"
@.str.1 = [26 x i8] c"isascii should be 1 for s\00"
define void @t_isascii_0x73() {
%1 = call i32 @isascii(i32 115)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 580, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isascii.c\00"
@.str.1 = [26 x i8] c"isascii should be 1 for s\00"
define void @t_isascii_0x73() {
%1 = tail call i32 @Assert_real(i32 1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 580, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}