xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ UPnPResponse_RenderingControl_GetMute(void *, int);
int /*<<< orphan*/ printf(char *, unsigned int, char *);
void UPnPRenderingControl_GetMute(void *upnptoken, unsigned int InstanceID,
                                  char *Channel) {
  printf("Invoke: UPnPRenderingControl_GetMute(%u,%s);\r\n", InstanceID,
         Channel);
  UPnPResponse_RenderingControl_GetMute(upnptoken, 1);
}


x86 assembly (clang, -O0):
<UPnPRenderingControl_GetMute>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
lea    0xebf(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
call   1040 <UPnPResponse_RenderingControl_GetMute@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UPnPRenderingControl_GetMute>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
pop    %rbx
jmp    1040 <UPnPResponse_RenderingControl_GetMute@plt>

LLVM IR (-O0):
@.str = [47 x i8] c"Invoke: UPnPRenderingControl_GetMute(%u,%s);\0D\0A\00"
define void @UPnPRenderingControl_GetMute(i8* %0, i32 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i32, i32* %5
%8 = load i8*, i8** %6
%9 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i32 %7, i8* %8)
%10 = load i8*, i8** %4
%11 = call i32 @UPnPResponse_RenderingControl_GetMute(i8* %10, i32 1)
ret void
}

LLVM IR (-O2):
@.str = [47 x i8] c"Invoke: UPnPRenderingControl_GetMute(%u,%s);\0D\0A\00"
define void @UPnPRenderingControl_GetMute(i8* %0, i32 %1, i8* %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i32 %1, i8* %2)
%5 = tail call i32 @UPnPResponse_RenderingControl_GetMute(i8* %0, i32 1)
ret void
}
int test_imm_82uint16_mem(unsigned short *val) {
  return ((*val) & (-0x82 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_82uint16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%edx
and    $0xffffff7e,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_82uint16_mem>:
movzwl (%rdi),%eax
test   $0xff7e,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_82uint16_mem(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
%5 = zext i16 %4 to i32
%6 = and i32 %5, -130
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_82uint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -130
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ sleep(int);
int /*<<< orphan*/ stdout;
cycle() {
  fflush(stdout);
  sleep(1);
}


x86 assembly (clang, -O0):
<cycle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2eb1(%rip),%rax
mov    (%rax),%edi
call   1030 <fflush@plt>
mov    $0x1,%edi
call   1040 <sleep@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cycle>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
call   1030 <fflush@plt>
mov    $0x1,%edi
pop    %rax
jmp    1040 <sleep@plt>

LLVM IR (-O0):
@stdout = global i32 0
define i32 @cycle() {
%1 = alloca i32
%2 = load i32, i32* @stdout
%3 = call i32 @fflush(i32 %2)
%4 = call i32 @sleep(i32 1)
%5 = load i32, i32* %1
ret i32 %5
}

LLVM IR (-O2):
@stdout = global i32 0
define i32 @cycle() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fflush(i32 %1)
%3 = tail call i32 @sleep(i32 1)
ret i32 undef
}
/* Variables and functions */
scalar_t__ config_WITH_CARDREADER();
int config_READER_BULCRYPT(void) { return config_WITH_CARDREADER() ? 1 : 0; }


x86 assembly (clang, -O0):
<config_READER_BULCRYPT>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <config_WITH_CARDREADER@plt>
mov    %rax,%rdx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<config_READER_BULCRYPT>:
push   %rax
xor    %eax,%eax
call   1030 <config_WITH_CARDREADER@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @config_READER_BULCRYPT() {
%1 = call i64 (...) @config_WITH_CARDREADER()
%2 = icmp ne i64 %1, 0
%3 = zext i1 %2 to i64
%4 = select i1 %2, i32 1, i32 0
ret i32 %4
}

LLVM IR (-O2):
define i32 @config_READER_BULCRYPT() {
%1 = tail call i64 (...) @config_WITH_CARDREADER()
%2 = icmp ne i64 %1, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int strcmp(char *const, char *const);
int cstring_cmp(const void *a, const void *b) {
  return strcmp(*(char *const *)a, *(char *const *)b);
}


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

x86 assembly (clang, -O2):
<cstring_cmp>:
mov    (%rdi),%rdi
mov    (%rsi),%rsi
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
define i32 @cstring_cmp(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 = bitcast i8* %5 to i8**
%7 = load i8*, i8** %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i8**
%10 = load i8*, i8** %9
%11 = call i32 @strcmp(i8* %7, i8* %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @cstring_cmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = load i8*, i8** %3
%5 = bitcast i8* %1 to i8**
%6 = load i8*, i8** %5
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %4, i8* dereferenceable(1) %6)
ret i32 %7
}
int sipdomain_add(const char *ifname, int ifindex, const char *domain) {
  return 0;
}


x86 assembly (clang, -O0):
<sipdomain_add>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sipdomain_add>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @sipdomain_add(i8* %0, i32 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
ret i32 0
}

LLVM IR (-O2):
define i32 @sipdomain_add(i8* nocapture readnone %0, i32 %1, i8* nocapture readnone %2) {
ret i32 0
}
double fun_double(double a, double b) { return a; }


x86 assembly (clang, -O0):
<fun_double>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

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

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

LLVM IR (-O2):
define double @fun_double(double returned %0, double %1) {
ret double %0
}
/* Variables and functions */
int /*<<< orphan*/ driveRaw(int, int, int, int);
void driveTank(int speedRight, int speedLeft) {
  driveRaw(speedLeft, speedLeft, speedRight, speedRight);
}


x86 assembly (clang, -O0):
<driveTank>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x4(%rbp),%edx
mov    -0x4(%rbp),%ecx
call   1030 <driveRaw@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<driveTank>:
mov    %edi,%ecx
mov    %esi,%edi
mov    %ecx,%edx
jmp    1030 <driveRaw@plt>

LLVM IR (-O0):
define void @driveTank(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32, i32* %4
%7 = load i32, i32* %3
%8 = load i32, i32* %3
%9 = call i32 @driveRaw(i32 %5, i32 %6, i32 %7, i32 %8)
ret void
}

LLVM IR (-O2):
define void @driveTank(i32 %0, i32 %1) {
%3 = tail call i32 @driveRaw(i32 %1, i32 %1, i32 %0, i32 %0)
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ message_info(char *);
int /*<<< orphan*/ msg_server_created();
int start_server() {
  message_info("Creating login server");
  msg_server_created();
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<start_server>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <message_info@plt>
mov    $0x0,%al
call   1040 <msg_server_created@plt>
mov    0x2ea2(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<start_server>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <message_info@plt>
xor    %eax,%eax
call   1040 <msg_server_created@plt>
mov    0x2ea5(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [22 x i8] c"Creating login server\00"
@EXIT_SUCCESS = global i32 0
define i32 @start_server() {
%1 = call i32 @message_info(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @msg_server_created()
%3 = load i32, i32* @EXIT_SUCCESS
ret i32 %3
}

LLVM IR (-O2):
@.str = [22 x i8] c"Creating login server\00"
@EXIT_SUCCESS = global i32 0
define i32 @start_server() {
%1 = tail call i32 @message_info(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @msg_server_created()
%3 = load i32, i32* @EXIT_SUCCESS
ret i32 %3
}
unsigned char scan(const unsigned char *s) {
  unsigned char *cr;
  unsigned char ch;
  {
    unsigned char ch;
    ch = *cr;
    switch (ch) {
    case 0x81:
      goto yy3;
    case 0x82:
      goto yy5;
    default:
      goto yy2;
    }
  yy2:
  yy3:
    ++cr;
    return 'a';
  yy5:
    ++cr;
    return 'b';
  }
}


x86 assembly (clang, -O0):
<scan>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x1a(%rbp)
movzbl -0x1a(%rbp),%eax
mov    %eax,-0x20(%rbp)
sub    $0x81,%eax
je     113b <scan+0x3b>
jmp    1128 <scan+0x28>
mov    -0x20(%rbp),%eax
sub    $0x82,%eax
je     1140 <scan+0x40>
jmp    1145 <scan+0x45>
jmp    114f <scan+0x4f>
jmp    1164 <scan+0x64>
jmp    114a <scan+0x4a>
jmp    114f <scan+0x4f>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
movb   $0x61,-0x1(%rbp)
jmp    1174 <scan+0x74>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
movb   $0x62,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<scan>:
mov    $0x61,%al
ret

LLVM IR (-O0):
define zeroext i8 @scan(i8* %0) {
%2 = alloca i8
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
store i8* %0, i8** %3
%7 = load i8*, i8** %4
%8 = load i8, i8* %7
store i8 %8, i8* %6
%9 = load i8, i8* %6
%10 = zext i8 %9 to i32
switch i32 %10, label %13 [
i32 129, label %11
i32 130, label %12
]
11: ; preds = %1
br label %15
12: ; preds = %1
br label %18
13: ; preds = %1
br label %14
14: ; preds = %13
br label %15
15: ; preds = %14, %11
%16 = load i8*, i8** %4
%17 = getelementptr inbounds i8, i8* %16, i32 1
store i8* %17, i8** %4
store i8 97, i8* %2
br label %21
18: ; preds = %12
%19 = load i8*, i8** %4
%20 = getelementptr inbounds i8, i8* %19, i32 1
store i8* %20, i8** %4
store i8 98, i8* %2
br label %21
21: ; preds = %18, %15
%22 = load i8, i8* %2
ret i8 %22
}

LLVM IR (-O2):
define zeroext i8 @scan(i8* nocapture readnone %0) {
ret i8 97
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void PrintBits(unsigned num) {
  unsigned max_pow = 1 << sizeof(unsigned) * 8 - 1;
  while (max_pow) {
    printf("%d", !!(max_pow & num));
    max_pow >>= 1;
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<PrintBits>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x80000000,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     115d <PrintBits+0x4d>
mov    -0x8(%rbp),%eax
and    -0x4(%rbp),%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%esi
lea    0xeb8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <PrintBits+0x12>
lea    0xe9f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PrintBits>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edi,%r15d
mov    $0x80000000,%ebx
lea    0xeca(%rip),%r14
mov    $0x80000000,%ebp
nopl   0x0(%rax,%rax,1)
xor    %esi,%esi
test   %r15d,%ebx
setne  %sil
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
shr    %ebp
cmp    $0x1,%ebx
mov    %ebp,%ebx
ja     1140 <PrintBits+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [2 x i8] c"\0A\00"
define void @PrintBits(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 -2147483648, i32* %3
br label %4
4: ; preds = %7, %1
%5 = load i32, i32* %3
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %18
7: ; preds = %4
%8 = load i32, i32* %3
%9 = load i32, i32* %2
%10 = and i32 %8, %9
%11 = icmp ne i32 %10, 0
%12 = xor i1 %11, true
%13 = xor i1 %12, true
%14 = zext i1 %13 to i32
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %14)
%16 = load i32, i32* %3
%17 = lshr i32 %16, 1
store i32 %17, i32* %3
br label %4
18: ; preds = %4
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @PrintBits(i32 %0) {
br label %2
2: ; preds = %1, %2
%3 = phi i32 [ -2147483648, %1 ], [ %8, %2 ]
%4 = and i32 %3, %0
%5 = icmp ne i32 %4, 0
%6 = zext i1 %5 to i32
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = lshr i32 %3, 1
%9 = icmp ult i32 %3, 2
br i1 %9, label %10, label %2
10: ; preds = %2
%11 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ getpagesize();
scalar_t__ posix_memalign(void **, int /*<<< orphan*/, size_t);
void *valloc(size_t i) {
  void *ret;
  if (posix_memalign(&ret, getpagesize(), i) != 0)
    ret = NULL;
  return ret;
}


x86 assembly (clang, -O0):
<valloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <getpagesize@plt>
mov    %eax,%esi
mov    -0x8(%rbp),%rdx
lea    -0x10(%rbp),%rdi
call   1040 <posix_memalign@plt>
cmp    $0x0,%rax
je     1154 <valloc+0x34>
movq   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<valloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
xor    %r14d,%r14d
xor    %eax,%eax
call   1030 <getpagesize@plt>
mov    %rsp,%rdi
mov    %eax,%esi
mov    %rbx,%rdx
call   1040 <posix_memalign@plt>
test   %rax,%rax
jne    1147 <valloc+0x27>
mov    (%rsp),%r14
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @valloc(i64 %0) {
%2 = alloca i8*
%3 = bitcast i8** %2 to i8*
%4 = tail call i32 (...) @getpagesize()
%5 = call i64 @posix_memalign(i8** %2, i32 %4, i64 %0)
%6 = icmp eq i64 %5, 0
%7 = load i8*, i8** %2
%8 = select i1 %6, i8* %7, i8* null
ret i8* %8
}
/* Variables and functions */
int /*<<< orphan*/ UPnPResponse_RenderingControl_GetBlueVideoGain(void *, int);
int /*<<< orphan*/ printf(char *, unsigned int);
void UPnPRenderingControl_GetBlueVideoGain(void *upnptoken,
                                           unsigned int InstanceID) {
  printf("Invoke: UPnPRenderingControl_GetBlueVideoGain(%u);\r\n", InstanceID);
  UPnPResponse_RenderingControl_GetBlueVideoGain(upnptoken, 250);
}


x86 assembly (clang, -O0):
<UPnPRenderingControl_GetBlueVideoGain>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
mov    $0xfa,%esi
call   1040 <UPnPResponse_RenderingControl_GetBlueVideoGain@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UPnPRenderingControl_GetBlueVideoGain>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xfa,%esi
pop    %rbx
jmp    1040 <UPnPResponse_RenderingControl_GetBlueVideoGain@plt>

LLVM IR (-O0):
@.str = [53 x i8] c"Invoke: UPnPRenderingControl_GetBlueVideoGain(%u);\0D\0A\00"
define void @UPnPRenderingControl_GetBlueVideoGain(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = call i32 @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = load i8*, i8** %3
%8 = call i32 @UPnPResponse_RenderingControl_GetBlueVideoGain(i8* %7, i32 250)
ret void
}

LLVM IR (-O2):
@.str = [53 x i8] c"Invoke: UPnPRenderingControl_GetBlueVideoGain(%u);\0D\0A\00"
define void @UPnPRenderingControl_GetBlueVideoGain(i8* %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0), i32 %1)
%4 = tail call i32 @UPnPResponse_RenderingControl_GetBlueVideoGain(i8* %0, i32 250)
ret void
}
void gpio_mlb_active(void) {}


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

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

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

LLVM IR (-O2):
define void @gpio_mlb_active() {
ret void
}
/* Variables and functions */
int mus_close(int);
int close_sound_input(int fd) { return (mus_close(fd)); }


x86 assembly (clang, -O0):
<close_sound_input>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <mus_close@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<close_sound_input>:
jmp    1030 <mus_close@plt>

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

LLVM IR (-O2):
define i32 @close_sound_input(i32 %0) {
%2 = tail call i32 @mus_close(i32 %0)
ret i32 %2
}
/* Variables and functions */
int screen_control(int);
int main(void) {
  int game_state = 0;
  while (game_state > -1) {
    game_state = screen_control(game_state);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xffffffff,-0x8(%rbp)
jle    1140 <main+0x30>
mov    -0x8(%rbp),%edi
call   1030 <screen_control@plt>
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %eax,%edi
call   1030 <screen_control@plt>
test   %eax,%eax
jns    1120 <main+0x10>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %3, %1 ]
%3 = tail call i32 @screen_control(i32 %2)
%4 = icmp sgt i32 %3, -1
br i1 %4, label %1, label %5
5: ; preds = %1
ret i32 0
}
/* Variables and functions */
char *malloc(scalar_t__);
int /*<<< orphan*/ strcpy(char *, char const *);
scalar_t__ strlen(char const *);
char *strdup(char const *string) {
  char *new_string;
  new_string = malloc(strlen(string) + 1);
  if (new_string != NULL)
    strcpy(new_string, string);
  return new_string;
}


x86 assembly (clang, -O0):
<strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     116d <strdup+0x3d>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strdup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1158 <strdup+0x28>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @strdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = add nsw i64 %5, 1
%7 = call i8* @malloc(i64 %6)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = icmp ne i8* %8, null
br i1 %9, label %10, label %14
10: ; preds = %1
%11 = load i8*, i8** %3
%12 = load i8*, i8** %2
%13 = call i32 @strcpy(i8* %11, i8* %12)
br label %14
14: ; preds = %10, %1
%15 = load i8*, i8** %3
ret i8* %15
}

LLVM IR (-O2):
define i8* @strdup(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i8* @malloc(i64 %3)
%5 = icmp eq i8* %4, null
br i1 %5, label %8, label %6
6: ; preds = %1
%7 = tail call i32 @strcpy(i8* %4, i8* %0)
br label %8
8: ; preds = %6, %1
ret i8* %4
}
void module1_section3_topic6() {}


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

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

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

LLVM IR (-O2):
define void @module1_section3_topic6() {
ret void
}
int fun_1() { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @fun_1() {
ret i32 1
}
/* Type definitions */
typedef scalar_t__ int32_t;

/* Variables and functions */
int /*<<< orphan*/ set_rounding();
void cvt_s_w(const int32_t *source, float *dest) {
  set_rounding();
  *dest = (float)*source;
}


x86 assembly (clang, -O0):
<cvt_s_w>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <set_rounding@plt>
mov    -0x8(%rbp),%rax
cvtsi2ssq (%rax),%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cvt_s_w>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <set_rounding@plt>
cvtsi2ssq (%rbx),%xmm0
movss  %xmm0,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @cvt_s_w(i64* %0, float* %1) {
%3 = alloca i64*
%4 = alloca float*
store i64* %0, i64** %3
store float* %1, float** %4
%5 = call i32 (...) @set_rounding()
%6 = load i64*, i64** %3
%7 = load i64, i64* %6
%8 = sitofp i64 %7 to float
%9 = load float*, float** %4
store float %8, float* %9
ret void
}

LLVM IR (-O2):
define void @cvt_s_w(i64* nocapture %0, float* nocapture writeonly %1) {
%3 = tail call i32 (...) @set_rounding()
%4 = load i64, i64* %0
%5 = sitofp i64 %4 to float
store float %5, float* %1
ret void
}
/* Type definitions */
struct ev_loop {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ev_verify(struct ev_loop *);
void ev_loop_verify(struct ev_loop *loop) { ev_verify(loop); }


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

x86 assembly (clang, -O2):
<ev_loop_verify>:
jmp    1030 <ev_verify@plt>

LLVM IR (-O0):
%struct.ev_loop = type { i32 }
define void @ev_loop_verify(%struct.ev_loop* %0) {
%2 = alloca %struct.ev_loop*
store %struct.ev_loop* %0, %struct.ev_loop** %2
%3 = load %struct.ev_loop*, %struct.ev_loop** %2
%4 = call i32 @ev_verify(%struct.ev_loop* %3)
ret void
}

LLVM IR (-O2):
%struct.ev_loop = type { i32 }
define void @ev_loop_verify(%struct.ev_loop* %0) {
%2 = tail call i32 @ev_verify(%struct.ev_loop* %0)
ret void
}
/* Type definitions */
struct histogram {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *path_common(struct histogram *, int);
char *string_format(char *, char *);
char *path_of_page(struct histogram *h, int only_base_name) {
  char *common = path_common(h, only_base_name);
  char *path = string_format("%s.html", common);
  free(common);
  return path;
}


x86 assembly (clang, -O0):
<path_of_page>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1050 <path_common@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xea6(%rip),%rdi
call   1040 <string_format@plt>
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<path_of_page>:
push   %r14
push   %rbx
push   %rax
call   1050 <path_common@plt>
mov    %rax,%rbx
lea    0xebd(%rip),%rdi
mov    %rax,%rsi
call   1040 <string_format@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.histogram = type { i32 }
@.str = [8 x i8] c"%s.html\00"
define i8* @path_of_page(%struct.histogram* %0, i32 %1) {
%3 = alloca %struct.histogram*
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
store %struct.histogram* %0, %struct.histogram** %3
store i32 %1, i32* %4
%7 = load %struct.histogram*, %struct.histogram** %3
%8 = load i32, i32* %4
%9 = call i8* @path_common(%struct.histogram* %7, i32 %8)
store i8* %9, i8** %5
%10 = load i8*, i8** %5
%11 = call i8* @string_format(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %10)
store i8* %11, i8** %6
%12 = load i8*, i8** %5
%13 = call i32 @free(i8* %12)
%14 = load i8*, i8** %6
ret i8* %14
}

LLVM IR (-O2):
%struct.histogram = type { i32 }
@.str = [8 x i8] c"%s.html\00"
define i8* @path_of_page(%struct.histogram* %0, i32 %1) {
%3 = tail call i8* @path_common(%struct.histogram* %0, i32 %1)
%4 = tail call i8* @string_format(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = tail call i32 @free(i8* %3)
ret i8* %4
}
unsigned long ftpmap_checksum(const char *s) {
  unsigned long checksum = 0UL;
  while (*s != 0) {
    checksum += (unsigned char)*s++;
  }
  return checksum;
}


x86 assembly (clang, -O0):
<ftpmap_checksum>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     113f <ftpmap_checksum+0x3f>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movzbl (%rax),%eax
add    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <ftpmap_checksum+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ftpmap_checksum>:
mov    (%rdi),%cl
test   %cl,%cl
je     1122 <ftpmap_checksum+0x22>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
movzbl %cl,%ecx
add    %rcx,%rax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <ftpmap_checksum+0x10>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i64 @ftpmap_checksum(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
store i8* %0, i8** %2
store i64 0, i64* %3
br label %4
4: ; preds = %9, %1
%5 = load i8*, i8** %2
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %16
9: ; preds = %4
%10 = load i8*, i8** %2
%11 = getelementptr inbounds i8, i8* %10, i32 1
store i8* %11, i8** %2
%12 = load i8, i8* %10
%13 = zext i8 %12 to i64
%14 = load i64, i64* %3
%15 = add i64 %14, %13
store i64 %15, i64* %3
br label %4
16: ; preds = %4
%17 = load i64, i64* %3
ret i64 %17
}

LLVM IR (-O2):
define i64 @ftpmap_checksum(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %11, %4 ], [ %2, %1 ]
%6 = phi i64 [ %10, %4 ], [ 0, %1 ]
%7 = phi i8* [ %8, %4 ], [ %0, %1 ]
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = zext i8 %5 to i64
%10 = add i64 %6, %9
%11 = load i8, i8* %8
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %4, %1
%14 = phi i64 [ 0, %1 ], [ %10, %4 ]
ret i64 %14
}
/* Variables and functions */
scalar_t__ strtol(char *, int /*<<< orphan*/ *, int);
int charToInt(char d) {
  char str[2];
  str[0] = d;
  str[1] = '\0';
  return (int)strtol(str, NULL, 10);
}


x86 assembly (clang, -O0):
<charToInt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
mov    %al,-0x3(%rbp)
movb   $0x0,-0x2(%rbp)
lea    -0x3(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1030 <strtol@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<charToInt>:
push   %rax
mov    %dil,0x6(%rsp)
movb   $0x0,0x7(%rsp)
lea    0x6(%rsp),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1030 <strtol@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @charToInt(i8 signext %0) {
%2 = alloca i8
%3 = alloca [2 x i8]
store i8 %0, i8* %2
%4 = load i8, i8* %2
%5 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 0
store i8 %4, i8* %5
%6 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 1
store i8 0, i8* %6
%7 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 0
%8 = call i64 @strtol(i8* %7, i32* null, i32 10)
%9 = trunc i64 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @charToInt(i8 signext %0) {
%2 = alloca [2 x i8]
%3 = getelementptr inbounds [2 x i8], [2 x i8]* %2, i64 0, i64 0
store i8 %0, i8* %3
%4 = getelementptr inbounds [2 x i8], [2 x i8]* %2, i64 0, i64 1
store i8 0, i8* %4
%5 = call i64 @strtol(i8* nocapture %3, i32* null, i32 10)
%6 = trunc i64 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ dger_(int *, int *, double *, double *, int *, double *,
                         int *, double *, int *);
void wcc_dger_(int *M, int *N, char *ALPHA, char *X, int *INCX, char *Y,
               int *INCY, char *A, int *LDA) {
  dger_(M, N, (double *)ALPHA, (double *)X, INCX, (double *)Y, INCY,
        (double *)A, LDA);
}


x86 assembly (clang, -O0):
<wcc_dger_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%r9
mov    0x10(%rbp),%r11
mov    0x18(%rbp),%r10
mov    0x20(%rbp),%rax
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
call   1030 <dger_@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wcc_dger_>:
jmp    1030 <dger_@plt>

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

LLVM IR (-O2):
define void @wcc_dger_(i32* %0, i32* %1, i8* %2, i8* %3, i32* %4, i8* %5, i32* %6, i8* %7, i32* %8) {
%10 = bitcast i8* %2 to double*
%11 = bitcast i8* %3 to double*
%12 = bitcast i8* %5 to double*
%13 = bitcast i8* %7 to double*
%14 = tail call i32 @dger_(i32* %0, i32* %1, double* %10, double* %11, i32* %4, double* %12, i32* %6, double* %13, i32* %8)
ret void
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int i, j;
  i = __VERIFIER_nondet_int();
  j = __VERIFIER_nondet_int();
  while (i < 5) {
    j = 0;
    while (i > 2 && j <= 9) {
      j = j + 1;
    }
    i = i + 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)
cmpl   $0x5,-0x8(%rbp)
jge    1189 <main+0x79>
movl   $0x0,-0xc(%rbp)
xor    %eax,%eax
cmpl   $0x2,-0x8(%rbp)
mov    %al,-0xd(%rbp)
jle    115d <main+0x4d>
cmpl   $0x9,-0xc(%rbp)
setle  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    116d <main+0x5d>
jmp    117b <main+0x6b>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1144 <main+0x34>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%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 = %21, %0
%7 = load i32, i32* %2
%8 = icmp slt i32 %7, 5
br i1 %8, label %9, label %24
9: ; preds = %6
store i32 0, i32* %3
br label %10
10: ; preds = %18, %9
%11 = load i32, i32* %2
%12 = icmp sgt i32 %11, 2
br i1 %12, label %13, label %16
13: ; preds = %10
%14 = load i32, i32* %3
%15 = icmp sle i32 %14, 9
br label %16
16: ; preds = %13, %10
%17 = phi i1 [ false, %10 ], [ %15, %13 ]
br i1 %17, label %18, label %21
18: ; preds = %16
%19 = load i32, i32* %3
%20 = add nsw i32 %19, 1
store i32 %20, i32* %3
br label %10
21: ; preds = %16
%22 = load i32, i32* %2
%23 = add nsw i32 %22, 1
store i32 %23, i32* %2
br label %6
24: ; preds = %6
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 */
scalar_t__ UINT_MAX;
double urand();
double __random(void) {
  return urand() / (double)UINT_MAX;
  ;
}


x86 assembly (clang, -O0):
<__random>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <urand@plt>
mov    0x2ec6(%rip),%rax
cvtsi2sdq (%rax),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<__random>:
push   %rax
xor    %eax,%eax
call   1030 <urand@plt>
mov    0x2ec9(%rip),%rax
cvtsi2sdq (%rax),%xmm1
divsd  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@UINT_MAX = global i64 0
define double @__random() {
%1 = call double (...) @urand()
%2 = load i64, i64* @UINT_MAX
%3 = sitofp i64 %2 to double
%4 = fdiv double %1, %3
ret double %4
}

LLVM IR (-O2):
@UINT_MAX = global i64 0
define double @__random() {
%1 = tail call double (...) @urand()
%2 = load i64, i64* @UINT_MAX
%3 = sitofp i64 %2 to double
%4 = fdiv double %1, %3
ret double %4
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ add_sub_butterfly(int /*<<< orphan*/ *,
                                     int /*<<< orphan*/ *const, int);
int /*<<< orphan*/ idct32_34_8x32_quarter_1_2(int /*<<< orphan*/ const *const,
                                              int /*<<< orphan*/ *);
int /*<<< orphan*/ idct32_34_8x32_quarter_3_4(int /*<<< orphan*/ const *const,
                                              int /*<<< orphan*/ *);
void idct32_34_8x32_sse2(const __m128i *const in, __m128i *const out) {
  __m128i temp[32];
  idct32_34_8x32_quarter_1_2(in, temp);
  idct32_34_8x32_quarter_3_4(in, temp);
  add_sub_butterfly(temp, out, 32);
}


x86 assembly (clang, -O0):
<idct32_34_8x32_sse2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x90(%rbp),%rsi
call   1050 <idct32_34_8x32_quarter_1_2@plt>
mov    -0x8(%rbp),%rdi
lea    -0x90(%rbp),%rsi
call   1030 <idct32_34_8x32_quarter_3_4@plt>
lea    -0x90(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x20,%edx
call   1040 <add_sub_butterfly@plt>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<idct32_34_8x32_sse2>:
push   %r15
push   %r14
push   %rbx
sub    $0x80,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %rsp,%r15
mov    %r15,%rsi
call   1050 <idct32_34_8x32_quarter_1_2@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1030 <idct32_34_8x32_quarter_3_4@plt>
mov    %r15,%rdi
mov    %r14,%rsi
mov    $0x20,%edx
call   1040 <add_sub_butterfly@plt>
add    $0x80,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @idct32_34_8x32_sse2(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca [32 x i32]
store i32* %0, i32** %3
store i32* %1, i32** %4
%6 = load i32*, i32** %3
%7 = getelementptr inbounds [32 x i32], [32 x i32]* %5, i64 0, i64 0
%8 = call i32 @idct32_34_8x32_quarter_1_2(i32* %6, i32* %7)
%9 = load i32*, i32** %3
%10 = getelementptr inbounds [32 x i32], [32 x i32]* %5, i64 0, i64 0
%11 = call i32 @idct32_34_8x32_quarter_3_4(i32* %9, i32* %10)
%12 = getelementptr inbounds [32 x i32], [32 x i32]* %5, i64 0, i64 0
%13 = load i32*, i32** %4
%14 = call i32 @add_sub_butterfly(i32* %12, i32* %13, i32 32)
ret void
}

LLVM IR (-O2):
define void @idct32_34_8x32_sse2(i32* %0, i32* %1) {
%3 = alloca [32 x i32]
%4 = bitcast [32 x i32]* %3 to i8*
%5 = getelementptr inbounds [32 x i32], [32 x i32]* %3, i64 0, i64 0
%6 = call i32 @idct32_34_8x32_quarter_1_2(i32* %0, i32* %5)
%7 = call i32 @idct32_34_8x32_quarter_3_4(i32* %0, i32* %5)
%8 = call i32 @add_sub_butterfly(i32* %5, i32* %1, i32 32)
ret void
}
int g(int x) { return x + x; }


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

x86 assembly (clang, -O2):
<g>:
lea    (%rdi,%rdi,1),%eax
ret

LLVM IR (-O0):
define i32 @g(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = add nsw i32 %3, %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @g(i32 %0) {
%2 = shl nsw i32 %0, 1
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;
typedef void *uint32_t;

/* Variables and functions */
void *cblByteOrderSwap32(void *);
uint64_t cblByteOrderSwap64(uint64_t swap) {
  union {
    uint64_t _u64;
    uint32_t _u32s[2];
  } tmp, result;
  tmp._u64 = swap;
  result._u32s[0] = cblByteOrderSwap32(tmp._u32s[1]);
  result._u32s[1] = cblByteOrderSwap32(tmp._u32s[0]);
  return result._u64;
}


x86 assembly (clang, -O0):
<cblByteOrderSwap64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <cblByteOrderSwap32@plt>
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <cblByteOrderSwap32@plt>
mov    %rax,-0x20(%rbp)
mov    -0x28(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cblByteOrderSwap64>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%r14d
call   1030 <cblByteOrderSwap32@plt>
mov    %rax,%rbx
mov    %r14,%rdi
call   1030 <cblByteOrderSwap32@plt>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%union.anon = type { [2 x i8*] }
define i32 @cblByteOrderSwap64(i32 %0) {
%2 = alloca i32
%3 = alloca %union.anon
%4 = alloca %union.anon
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = bitcast %union.anon* %3 to i32*
store i32 %5, i32* %6
%7 = bitcast %union.anon* %3 to [2 x i8*]*
%8 = getelementptr inbounds [2 x i8*], [2 x i8*]* %7, i64 0, i64 1
%9 = load i8*, i8** %8
%10 = call i8* @cblByteOrderSwap32(i8* %9)
%11 = bitcast %union.anon* %4 to [2 x i8*]*
%12 = getelementptr inbounds [2 x i8*], [2 x i8*]* %11, i64 0, i64 0
store i8* %10, i8** %12
%13 = bitcast %union.anon* %3 to [2 x i8*]*
%14 = getelementptr inbounds [2 x i8*], [2 x i8*]* %13, i64 0, i64 0
%15 = load i8*, i8** %14
%16 = call i8* @cblByteOrderSwap32(i8* %15)
%17 = bitcast %union.anon* %4 to [2 x i8*]*
%18 = getelementptr inbounds [2 x i8*], [2 x i8*]* %17, i64 0, i64 1
store i8* %16, i8** %18
%19 = bitcast %union.anon* %4 to i32*
%20 = load i32, i32* %19
ret i32 %20
}

LLVM IR (-O2):
define i32 @cblByteOrderSwap64(i32 %0) {
%2 = zext i32 %0 to i64
%3 = inttoptr i64 %2 to i8*
%4 = tail call i8* @cblByteOrderSwap32(i8* undef)
%5 = tail call i8* @cblByteOrderSwap32(i8* %3)
%6 = ptrtoint i8* %4 to i64
%7 = trunc i64 %6 to i32
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void help() {
  printf("change directory\n"
         "-h|--help for help\n"
         "-v|--version to get version infor\n");
}


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

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

LLVM IR (-O0):
@.str = [71 x i8] c"change directory\0A-h|--help for help\0A-v|--version to get version infor\0A\00"
define void @help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [70 x i8] c"change directory\0A-h|--help for help\0A-v|--version to get version infor\00"
define void @help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([70 x i8], [70 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int anotherFunction5();
scalar_t__ malloc(int);
int function_with_leak5() {
  char *x = (char *)malloc(12);
  return anotherFunction5();
}


x86 assembly (clang, -O0):
<function_with_leak5>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xc,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <anotherFunction5@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<function_with_leak5>:
push   %rax
mov    $0xc,%edi
call   1040 <malloc@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <anotherFunction5@plt>

LLVM IR (-O0):
define i32 @function_with_leak5() {
%1 = alloca i8*
%2 = call i64 @malloc(i32 12)
%3 = inttoptr i64 %2 to i8*
store i8* %3, i8** %1
%4 = call i32 (...) @anotherFunction5()
ret i32 %4
}

LLVM IR (-O2):
define i32 @function_with_leak5() {
%1 = tail call i64 @malloc(i32 12)
%2 = tail call i32 (...) @anotherFunction5()
ret i32 %2
}
unsigned int bcdtobin(unsigned int bcd) {
  return ((bcd >> 4) & 0x0f) * 10 + (bcd & 0x0f);
}


x86 assembly (clang, -O0):
<bcdtobin>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x4,%eax
and    $0xf,%eax
imul   $0xa,%eax,%eax
mov    -0x4(%rbp),%ecx
and    $0xf,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bcdtobin>:
mov    %edi,%eax
shr    $0x4,%eax
and    $0xf,%eax
lea    (%rax,%rax,4),%eax
and    $0xf,%edi
lea    (%rdi,%rax,2),%eax
ret

LLVM IR (-O0):
define i32 @bcdtobin(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = lshr i32 %3, 4
%5 = and i32 %4, 15
%6 = mul i32 %5, 10
%7 = load i32, i32* %2
%8 = and i32 %7, 15
%9 = add i32 %6, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @bcdtobin(i32 %0) {
%2 = lshr i32 %0, 4
%3 = and i32 %2, 15
%4 = mul nuw nsw i32 %3, 10
%5 = and i32 %0, 15
%6 = add nuw nsw i32 %4, %5
ret i32 %6
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void _lrshift(uint32_t value[]) {
  if (value[1] & 1)
    value[0] = (value[0] >> 1) | 0x80000000;
  else
    value[0] = (value[0] >> 1) & 0x7FFFFFFF;
  value[1] = (value[1] >> 1) & 0x7FFFFFFF;
}


x86 assembly (clang, -O0):
<_lrshift>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1135 <_lrshift+0x35>
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
sar    $0x1,%ecx
or     $0x80000000,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
jmp    114a <_lrshift+0x4a>
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
sar    $0x1,%ecx
and    $0x7fffffff,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%ecx
sar    $0x1,%ecx
and    $0x7fffffff,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x4(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<_lrshift>:
mov    (%rdi),%eax
mov    0x4(%rdi),%ecx
shrd   $0x1,%ecx,%eax
mov    %eax,(%rdi)
shr    %ecx
mov    %ecx,0x4(%rdi)
ret

LLVM IR (-O0):
define void @_lrshift(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 1
%5 = load i32, i32* %4
%6 = and i32 %5, 1
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %16
8: ; preds = %1
%9 = load i32*, i32** %2
%10 = getelementptr inbounds i32, i32* %9, i64 0
%11 = load i32, i32* %10
%12 = ashr i32 %11, 1
%13 = or i32 %12, -2147483648
%14 = load i32*, i32** %2
%15 = getelementptr inbounds i32, i32* %14, i64 0
store i32 %13, i32* %15
br label %24
16: ; preds = %1
%17 = load i32*, i32** %2
%18 = getelementptr inbounds i32, i32* %17, i64 0
%19 = load i32, i32* %18
%20 = ashr i32 %19, 1
%21 = and i32 %20, 2147483647
%22 = load i32*, i32** %2
%23 = getelementptr inbounds i32, i32* %22, i64 0
store i32 %21, i32* %23
br label %24
24: ; preds = %16, %8
%25 = load i32*, i32** %2
%26 = getelementptr inbounds i32, i32* %25, i64 1
%27 = load i32, i32* %26
%28 = ashr i32 %27, 1
%29 = and i32 %28, 2147483647
%30 = load i32*, i32** %2
%31 = getelementptr inbounds i32, i32* %30, i64 1
store i32 %29, i32* %31
ret void
}

LLVM IR (-O2):
define void @_lrshift(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 1
%3 = load i32, i32* %2
%4 = load i32, i32* %0
%5 = call i32 @llvm.fshl.i32(i32 %3, i32 %4, i32 31)
store i32 %5, i32* %0
%6 = lshr i32 %3, 1
store i32 %6, i32* %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gets(char *);
int /*<<< orphan*/ puts(char *);
main() {
  char cadena[50];
  puts("Escriba un texto:");
  gets(cadena);
  puts("El texto escrito es:");
  puts(cadena);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
lea    0xed1(%rip),%rdi
call   1030 <puts@plt>
lea    -0x40(%rbp),%rdi
call   1040 <gets@plt>
lea    0xece(%rip),%rdi
call   1030 <puts@plt>
lea    -0x40(%rbp),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x40,%rsp
lea    0xed4(%rip),%rdi
call   1030 <puts@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <gets@plt>
lea    0xecf(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"Escriba un texto:\00"
@.str.1 = [21 x i8] c"El texto escrito es:\00"
define i32 @main() {
%1 = alloca [50 x i8]
%2 = call i32 @puts(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%3 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 0
%4 = call i32 @gets(i8* %3)
%5 = call i32 @puts(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
%6 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 0
%7 = call i32 @puts(i8* %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [18 x i8] c"Escriba un texto:\00"
@.str.1 = [21 x i8] c"El texto escrito es:\00"
define i32 @main() {
%1 = alloca [50 x i8]
%2 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 0
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @gets(i8* %2)
%5 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 @puts(i8* %2)
ret i32 0
}