xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
double scanf(char *, double *);
int main() {
  double a, result_a;
  printf("Podaj liczbe rzeczywista: ");
  result_a = scanf("%f", &a);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
lea    0xee0(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movsd  %xmm0,-0x10(%rbp)
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
lea    0xee7(%rip),%rdi
mov    %rsp,%rsi
call   1040 <scanf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [27 x i8] c"Podaj liczbe rzeczywista: \00"
@.str.1 = [3 x i8] c"%f\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%4 = call double @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), double* %1)
store double %4, double* %2
ret i32 0
}

LLVM IR (-O2):
@.str = [27 x i8] c"Podaj liczbe rzeczywista: \00"
@.str.1 = [3 x i8] c"%f\00"
define i32 @main() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%4 = call double @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), double* %1)
ret i32 0
}
/* Variables and functions */
char fgetc(unsigned int);
int /*<<< orphan*/ isdigit(char);
unsigned fscan_udecimal(unsigned f) {
  unsigned value;
  char c;
  value = 0;
  while (1) {
    c = fgetc(f);
    if (!isdigit(c))
      break;
    value *= 10;
    value += c - '0';
  }
  return value;
}


x86 assembly (clang, -O0):
<fscan_udecimal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <fgetc@plt>
mov    %al,-0x9(%rbp)
movsbl -0x9(%rbp),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%eax
jne    1154 <fscan_udecimal+0x34>
jmp    116d <fscan_udecimal+0x4d>
imul   $0xa,-0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
movsbl -0x9(%rbp),%eax
sub    $0x30,%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1132 <fscan_udecimal+0x12>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fscan_udecimal>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%r14d
call   1040 <fgetc@plt>
mov    %eax,%ebx
movsbl %al,%edi
call   1030 <isdigit@plt>
xor    %ebp,%ebp
test   %eax,%eax
je     1163 <fscan_udecimal+0x43>
nopl   0x0(%rax)
lea    0x0(%rbp,%rbp,4),%eax
movsbl %bl,%ecx
lea    (%rcx,%rax,2),%ebp
add    $0xffffffd0,%ebp
mov    %r14d,%edi
call   1040 <fgetc@plt>
mov    %eax,%ebx
movsbl %al,%edi
call   1030 <isdigit@plt>
test   %eax,%eax
jne    1140 <fscan_udecimal+0x20>
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @fscan_udecimal(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i8
store i32 %0, i32* %2
store i32 0, i32* %3
br label %5
5: ; preds = %1, %12
%6 = load i32, i32* %2
%7 = call signext i8 @fgetc(i32 %6)
store i8 %7, i8* %4
%8 = load i8, i8* %4
%9 = call i32 @isdigit(i8 signext %8)
%10 = icmp ne i32 %9, 0
br i1 %10, label %12, label %11
11: ; preds = %5
br label %20
12: ; preds = %5
%13 = load i32, i32* %3
%14 = mul i32 %13, 10
store i32 %14, i32* %3
%15 = load i8, i8* %4
%16 = sext i8 %15 to i32
%17 = sub nsw i32 %16, 48
%18 = load i32, i32* %3
%19 = add i32 %18, %17
store i32 %19, i32* %3
br label %5
20: ; preds = %11
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
define i32 @fscan_udecimal(i32 %0) {
%2 = tail call signext i8 @fgetc(i32 %0)
%3 = tail call i32 @isdigit(i8 signext %2)
%4 = icmp eq i32 %3, 0
br i1 %4, label %15, label %5
5: ; preds = %1, %5
%6 = phi i8 [ %12, %5 ], [ %2, %1 ]
%7 = phi i32 [ %11, %5 ], [ 0, %1 ]
%8 = mul i32 %7, 10
%9 = sext i8 %6 to i32
%10 = add i32 %8, -48
%11 = add i32 %10, %9
%12 = tail call signext i8 @fgetc(i32 %0)
%13 = tail call i32 @isdigit(i8 signext %12)
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %5
15: ; preds = %5, %1
%16 = phi i32 [ 0, %1 ], [ %11, %5 ]
ret i32 %16
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *s) {
  fprintf(stderr,
          "usage: %s interface "
          "[auto|10baseT|10base2|aui|100baseT|##]\n",
          s);
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [60 x i8] c"usage: %s interface [auto|10baseT|10base2|aui|100baseT|##]\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [60 x i8] c"usage: %s interface [auto|10baseT|10base2|aui|100baseT|##]\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
__float128 from_sign_char_load(signed char *a) { return (__float128)*a; }


x86 assembly (clang, -O0):
<from_sign_char_load>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%al
movsbl %al,%edi
call   1120 <__floatsitf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<from_sign_char_load>:
push   %rax
movsbl (%rdi),%edi
call   1110 <__floatsitf>
pop    %rax
ret
nopl   0x0(%rax,%rax,1)

LLVM IR (-O0):
define fp128 @from_sign_char_load(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = sitofp i8 %4 to fp128
ret fp128 %5
}

LLVM IR (-O2):
define fp128 @from_sign_char_load(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = sitofp i8 %2 to fp128
ret fp128 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void get_architecture(void) { printf("ARM"); }


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"ARM\00"
define void @get_architecture() {
%1 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"ARM\00"
define void @get_architecture() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ writeUART(int, unsigned char *);
void system_set_watchdog(char cTimer) {
  unsigned char ucWatchDogDemand[3] = {'\x001', '\x035', ' '};
  ucWatchDogDemand[2] = 255 - cTimer;
  writeUART(3, ucWatchDogDemand);
}


x86 assembly (clang, -O0):
<system_set_watchdog>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    0xedb(%rip),%ax
mov    %ax,-0x4(%rbp)
mov    0xed3(%rip),%al
mov    %al,-0x2(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0xff,%eax
sub    %ecx,%eax
mov    %al,-0x2(%rbp)
lea    -0x4(%rbp),%rsi
mov    $0x3,%edi
call   1030 <writeUART@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<system_set_watchdog>:
push   %rax
movw   $0x3501,0x4(%rsp)
not    %dil
mov    %dil,0x6(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x3,%edi
call   1030 <writeUART@plt>
pop    %rax
ret

LLVM IR (-O0):
@__const.system_set_watchdog.ucWatchDogDemand = [3 x i8] c"\015 "
define void @system_set_watchdog(i8 signext %0) {
%2 = alloca i8
%3 = alloca [3 x i8]
store i8 %0, i8* %2
%4 = bitcast [3 x i8]* %3 to i8*
%5 = load i8, i8* %2
%6 = sext i8 %5 to i32
%7 = sub nsw i32 255, %6
%8 = trunc i32 %7 to i8
%9 = getelementptr inbounds [3 x i8], [3 x i8]* %3, i64 0, i64 2
store i8 %8, i8* %9
%10 = getelementptr inbounds [3 x i8], [3 x i8]* %3, i64 0, i64 0
%11 = call i32 @writeUART(i32 3, i8* %10)
ret void
}

LLVM IR (-O2):
define void @system_set_watchdog(i8 signext %0) {
%2 = alloca [3 x i8]
%3 = getelementptr inbounds [3 x i8], [3 x i8]* %2, i64 0, i64 0
%4 = bitcast [3 x i8]* %2 to i16*
store i16 13569, i16* %4
%5 = xor i8 %0, -1
%6 = getelementptr inbounds [3 x i8], [3 x i8]* %2, i64 0, i64 2
store i8 %5, i8* %6
%7 = call i32 @writeUART(i32 3, i8* %3)
ret void
}
/* Variables and functions */
int recibeXtra(int, void *, int, int /*<<< orphan*/);
int recibe(int sockConexion, void *datos, int numDatos) {
  return recibeXtra(sockConexion, datos, numDatos, 0);
}


x86 assembly (clang, -O0):
<recibe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
xor    %ecx,%ecx
call   1030 <recibeXtra@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<recibe>:
xor    %ecx,%ecx
jmp    1030 <recibeXtra@plt>

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

LLVM IR (-O2):
define i32 @recibe(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32 @recibeXtra(i32 %0, i8* %1, i32 %2, i32 0)
ret i32 %4
}
adrx0imm1(r0, r1, x0, x1, p0, p1) int r0, r1;
int *p0, *p1;
{
  if ((((int *)10000000)[x0]) <= 33)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<adrx0imm1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
movslq -0x10(%rbp),%rcx
mov    $0x989680,%eax
cmpl   $0x21,(%rax,%rcx,4)
jg     1137 <adrx0imm1+0x37>
movl   $0x1,-0x4(%rbp)
jmp    113e <adrx0imm1+0x3e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<adrx0imm1>:
movslq %edx,%rcx
xor    %eax,%eax
cmpl   $0x22,0x989680(,%rcx,4)
22
setl   %al
ret

LLVM IR (-O0):
define i32 @adrx0imm1(i32 %0, i32 %1, i32 %2, i32 %3, i32* %4, i32* %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32*
%13 = alloca i32*
store i32 %0, i32* %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i32* %4, i32** %12
store i32* %5, i32** %13
%14 = load i32, i32* %10
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i32, i32* inttoptr (i64 10000000 to i32*), i64 %15
%17 = load i32, i32* %16
%18 = icmp sle i32 %17, 33
br i1 %18, label %19, label %20
19: ; preds = %6
store i32 1, i32* %7
br label %21
20: ; preds = %6
store i32 0, i32* %7
br label %21
21: ; preds = %20, %19
%22 = load i32, i32* %7
ret i32 %22
}

LLVM IR (-O2):
define i32 @adrx0imm1(i32 %0, i32 %1, i32 %2, i32 %3, i32* nocapture readnone %4, i32* nocapture readnone %5) {
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i32, i32* inttoptr (i64 10000000 to i32*), i64 %7
%9 = load i32, i32* %8
%10 = icmp slt i32 %9, 34
%11 = zext i1 %10 to i32
ret i32 %11
}
signed int convert_unsigned_int_to_signed_int(unsigned int x) { return x; }


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

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

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

LLVM IR (-O2):
define i32 @convert_unsigned_int_to_signed_int(i32 returned %0) {
ret i32 %0
}
int PyMPELog_Finish(void) {
  int ierr = 0;
  return ierr;
}


x86 assembly (clang, -O0):
<PyMPELog_Finish>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @PyMPELog_Finish() {
ret i32 0
}
/* Variables and functions */
double rdz_now();
double rdz_duration(double start) { return rdz_now() - start; }


x86 assembly (clang, -O0):
<rdz_duration>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    $0x0,%al
call   1030 <rdz_now@plt>
subsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rdz_duration>:
push   %rax
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1030 <rdz_now@plt>
subsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @rdz_duration(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = call double (...) @rdz_now()
%4 = load double, double* %2
%5 = fsub double %3, %4
ret double %5
}

LLVM IR (-O2):
define double @rdz_duration(double %0) {
%2 = tail call double (...) @rdz_now()
%3 = fsub double %2, %0
ret double %3
}
/* Type definitions */
struct event_sync_ctx {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct event_sync_ctx *);
void event_sync_ctx_delete(struct event_sync_ctx *event_sync_ctx) {
  free(event_sync_ctx);
}


x86 assembly (clang, -O0):
<event_sync_ctx_delete>:
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):
<event_sync_ctx_delete>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct.event_sync_ctx = type { i32 }
define void @event_sync_ctx_delete(%struct.event_sync_ctx* nocapture %0) {
%2 = tail call i32 @free(%struct.event_sync_ctx* %0)
ret void
}
void ExttPaymentAuxTable(void) {}


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

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

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

LLVM IR (-O2):
define void @ExttPaymentAuxTable() {
ret void
}
/* Type definitions */
struct oscap_string_iterator {
  int dummy;
};
struct oscap_iterator {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(int /*<<< orphan*/);
int /*<<< orphan*/ oscap_iterator_detach(struct oscap_iterator *);
void oscap_string_iterator_remove(struct oscap_string_iterator *it) {
  free(oscap_iterator_detach(((struct oscap_iterator *)(it))));
}


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

x86 assembly (clang, -O2):
<oscap_string_iterator_remove>:
push   %rax
call   1040 <oscap_iterator_detach@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.oscap_string_iterator = type { i32 }
%struct.oscap_iterator = type { i32 }
define void @oscap_string_iterator_remove(%struct.oscap_string_iterator* %0) {
%2 = alloca %struct.oscap_string_iterator*
store %struct.oscap_string_iterator* %0, %struct.oscap_string_iterator** %2
%3 = load %struct.oscap_string_iterator*, %struct.oscap_string_iterator** %2
%4 = bitcast %struct.oscap_string_iterator* %3 to %struct.oscap_iterator*
%5 = call i32 @oscap_iterator_detach(%struct.oscap_iterator* %4)
%6 = call i32 @free(i32 %5)
ret void
}

LLVM IR (-O2):
%struct.oscap_string_iterator = type { i32 }
%struct.oscap_iterator = type { i32 }
define void @oscap_string_iterator_remove(%struct.oscap_string_iterator* %0) {
%2 = bitcast %struct.oscap_string_iterator* %0 to %struct.oscap_iterator*
%3 = tail call i32 @oscap_iterator_detach(%struct.oscap_iterator* %2)
%4 = tail call i32 @free(i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bar(int /*<<< orphan*/, int /*<<< orphan*/,
                       int /*<<< orphan*/, int /*<<< orphan*/,
                       int /*<<< orphan*/);
int /*<<< orphan*/ memcpy(int /*<<< orphan*/, int /*<<< orphan*/,
                          int /*<<< orphan*/);
void foo(void) {
  memcpy(0, 0, 0);
  bar(0, 0, 0, 0, 0);
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
xor    %edx,%edx
mov    %edx,%edi
mov    %edx,%esi
call   1040 <memcpy@plt>
xor    %r8d,%r8d
mov    %r8d,%edi
mov    %r8d,%esi
mov    %r8d,%edx
mov    %r8d,%ecx
call   1030 <bar@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rax
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1040 <memcpy@plt>
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
pop    %rax
jmp    1030 <bar@plt>

LLVM IR (-O0):
define void @foo() {
%1 = call i32 @memcpy(i32 0, i32 0, i32 0)
%2 = call i32 @bar(i32 0, i32 0, i32 0, i32 0, i32 0)
ret void
}

LLVM IR (-O2):
define void @foo() {
%1 = tail call i32 @memcpy(i32 0, i32 0, i32 0)
%2 = tail call i32 @bar(i32 0, i32 0, i32 0, i32 0, i32 0)
ret void
}
/* Variables and functions */
int japi_list(int, int);
int j_list(int arg0, int arg1) { return (japi_list(arg0, arg1)); }


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

x86 assembly (clang, -O2):
<j_list>:
jmp    1030 <japi_list@plt>

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

LLVM IR (-O2):
define i32 @j_list(i32 %0, i32 %1) {
%3 = tail call i32 @japi_list(i32 %0, i32 %1)
ret i32 %3
}
void caam_algapi_hash_exit(void) {}


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

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

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

LLVM IR (-O2):
define void @caam_algapi_hash_exit() {
ret void
}
float f_fp_scalar_1(float x) { return x; }


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

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

LLVM IR (-O0):
define float @f_fp_scalar_1(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
ret float %3
}

LLVM IR (-O2):
define float @f_fp_scalar_1(float returned %0) {
ret float %0
}
__attribute__((__no__)) void do_nothing_packed_zero(struct test_packed *ptr) {
  if ((unsigned long)ptr > 0x2)
    return;
  else
    return;
}


x86 assembly (clang, -O0):
<do_nothing_packed_zero>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmp    $0x2,%rax
jbe    111b <do_nothing_packed_zero+0x1b>
jmp    1120 <do_nothing_packed_zero+0x20>
jmp    1120 <do_nothing_packed_zero+0x20>
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.test_packed = type opaque
define void @do_nothing_packed_zero(%struct.test_packed* %0) {
%2 = alloca %struct.test_packed*
store %struct.test_packed* %0, %struct.test_packed** %2
%3 = load %struct.test_packed*, %struct.test_packed** %2
%4 = ptrtoint %struct.test_packed* %3 to i64
%5 = icmp ugt i64 %4, 2
br i1 %5, label %6, label %7
6: ; preds = %1
br label %8
7: ; preds = %1
br label %8
8: ; preds = %7, %6
ret void
}

LLVM IR (-O2):
%struct.test_packed = type opaque
define void @do_nothing_packed_zero(%struct.test_packed* nocapture %0) {
ret void
}
void nbrEnd2NAMED_BACKREFERENCE_END() {}


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

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

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

LLVM IR (-O2):
define void @nbrEnd2NAMED_BACKREFERENCE_END() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ output(int);
void main() {
  int y;
  y = 11;
  output(y);
}


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

x86 assembly (clang, -O2):
<main>:
mov    $0xb,%edi
jmp    1030 <output@plt>

LLVM IR (-O0):
define void @main() {
%1 = alloca i32
store i32 11, i32* %1
%2 = load i32, i32* %1
%3 = call i32 @output(i32 %2)
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 @output(i32 11)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ executeApplescriptToGetString(char *, char *, char *);
int strlen(char *);
int getArtistName(char *name) {
  executeApplescriptToGetString("iTunes", "artist of current track as string",
                                name);
  return strlen(name);
}


x86 assembly (clang, -O0):
<getArtistName>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
lea    0xec9(%rip),%rdi
lea    0xec9(%rip),%rsi
call   1030 <executeApplescriptToGetString@plt>
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getArtistName>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
lea    0xed5(%rip),%rsi
mov    %rbx,%rdx
call   1030 <executeApplescriptToGetString@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <strlen@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"iTunes\00"
@.str.1 = [34 x i8] c"artist of current track as string\00"
define i32 @getArtistName(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @executeApplescriptToGetString(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), i8* %3)
%5 = load i8*, i8** %2
%6 = call i32 @strlen(i8* %5)
ret i32 %6
}

LLVM IR (-O2):
@.str = [7 x i8] c"iTunes\00"
@.str.1 = [34 x i8] c"artist of current track as string\00"
define i32 @getArtistName(i8* %0) {
%2 = tail call i32 @executeApplescriptToGetString(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%3 = tail call i32 @strlen(i8* %0)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void free_page(unsigned long page) { free((void *)page); }


x86 assembly (clang, -O0):
<free_page>:
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):
<free_page>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @free_page(i64 %0) {
%2 = inttoptr i64 %0 to i8*
%3 = tail call i32 @free(i8* %2)
ret void
}
float test_nextafterf(float x, float y) { return __builtin_nextafterf(x, y); }


x86 assembly (clang, -O0):
<test_nextafterf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
call   1030 <nextafterf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_nextafterf>:
jmp    1030 <nextafterf@plt>

LLVM IR (-O0):
define float @test_nextafterf(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = call float @nextafterf(float %5, float %6)
ret float %7
}

LLVM IR (-O2):
define float @test_nextafterf(float %0, float %1) {
%3 = tail call float @nextafterf(float %0, float %1)
ret float %3
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ UARTSendData(int *, int);
int32_t AckPacket(void) {
  uint8_t ui8Ack;
  ui8Ack = 0xcc;
  return (UARTSendData(&ui8Ack, 1));
}


x86 assembly (clang, -O0):
<AckPacket>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xcc,-0x4(%rbp)
lea    -0x4(%rbp),%rdi
mov    $0x1,%esi
call   1030 <UARTSendData@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<AckPacket>:
push   %rax
movl   $0xcc,0x4(%rsp)
lea    0x4(%rsp),%rdi
mov    $0x1,%esi
call   1030 <UARTSendData@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @AckPacket() {
%1 = alloca i32
store i32 204, i32* %1
%2 = call i32 @UARTSendData(i32* %1, i32 1)
ret i32 %2
}

LLVM IR (-O2):
define i32 @AckPacket() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 204, i32* %1
%3 = call i32 @UARTSendData(i32* %1, i32 1)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
scalar_t__ fwrite(char const *, int, int /*<<< orphan*/, int /*<<< orphan*/ *);
int /*<<< orphan*/ strlen(char const *);
int fputs(const char *s, FILE *stream) {
  if (fwrite(s, sizeof(char), strlen(s), stream) == 0) {
    return -1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<fputs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x20(%rbp),%rdi
mov    %eax,%edx
mov    -0x18(%rbp),%rcx
mov    $0x1,%esi
call   1040 <fwrite@plt>
cmp    $0x0,%rax
jne    116b <fputs+0x4b>
movl   $0xffffffff,-0x4(%rbp)
jmp    1172 <fputs+0x52>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fputs>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
mov    %eax,%edx
mov    %r14,%rcx
call   1040 <fwrite@plt>
cmp    $0x1,%rax
sbb    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @fputs(i8* %0, i32* nocapture %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = tail call i64 @fwrite(i8* %0, i32 1, i32 %3, i32* %1)
%5 = icmp eq i64 %4, 0
%6 = sext i1 %5 to i32
ret i32 %6
}
void USBOTGMode(unsigned long ulBase) {
  ;
  (*((volatile unsigned char *)(ulBase + 0x0000041C))) = 0;
}


x86 assembly (clang, -O0):
<USBOTGMode>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movb   $0x0,0x41c(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<USBOTGMode>:
movb   $0x0,0x41c(%rdi)
ret

LLVM IR (-O0):
define void @USBOTGMode(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add i64 %3, 1052
%5 = inttoptr i64 %4 to i8*
store volatile i8 0, i8* %5
ret void
}

LLVM IR (-O2):
define void @USBOTGMode(i64 %0) {
%2 = add i64 %0, 1052
%3 = inttoptr i64 %2 to i8*
store volatile i8 0, i8* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ my_putstr(char *);
int how_many_life_does_i_have(int vie_actu, int vie_perdu) {
  int result;
  if (vie_actu <= vie_perdu) {
    my_putstr("Vous etes mort dans d'atroce souffrance\n");
    return (0);
  } else {
    result = vie_actu - vie_perdu;
    my_putstr("Vous etes toujours en vie\n");
    vie_actu = result;
    return (vie_actu);
  }
}


x86 assembly (clang, -O0):
<how_many_life_does_i_have>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     1142 <how_many_life_does_i_have+0x32>
lea    0xecf(%rip),%rdi
call   1030 <my_putstr@plt>
movl   $0x0,-0x4(%rbp)
jmp    1163 <how_many_life_does_i_have+0x53>
mov    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
lea    0xed7(%rip),%rdi
call   1030 <my_putstr@plt>
mov    -0x10(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<how_many_life_does_i_have>:
push   %rbx
xor    %ebx,%ebx
sub    %esi,%edi
lea    0xf0d(%rip),%rcx
lea    0xedd(%rip),%rax
cmovg  %rcx,%rax
cmovg  %edi,%ebx
mov    %rax,%rdi
call   1030 <my_putstr@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [41 x i8] c"Vous etes mort dans d'atroce souffrance\0A\00"
@.str.1 = [27 x i8] c"Vous etes toujours en vie\0A\00"
define i32 @how_many_life_does_i_have(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = icmp sle i32 %7, %8
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = call i32 @my_putstr(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %3
br label %19
12: ; preds = %2
%13 = load i32, i32* %4
%14 = load i32, i32* %5
%15 = sub nsw i32 %13, %14
store i32 %15, i32* %6
%16 = call i32 @my_putstr(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
%17 = load i32, i32* %6
store i32 %17, i32* %4
%18 = load i32, i32* %4
store i32 %18, i32* %3
br label %19
19: ; preds = %12, %10
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
@.str = [41 x i8] c"Vous etes mort dans d'atroce souffrance\0A\00"
@.str.1 = [27 x i8] c"Vous etes toujours en vie\0A\00"
define i32 @how_many_life_does_i_have(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = sub nsw i32 %0, %1
%5 = select i1 %3, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0)
%6 = select i1 %3, i32 %4, i32 0
%7 = tail call i32 @my_putstr(i8* %5)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_error();
int __VERIFIER_nondet_int();
int id(int);
void main() {
  int input = __VERIFIER_nondet_int();
  int result = id(input);
  if (result == 1000) {
    __VERIFIER_error();
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <id@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x3e8,-0x8(%rbp)
jne    1161 <main+0x31>
mov    $0x0,%al
call   1040 <__VERIFIER_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,%edi
call   1050 <id@plt>
cmp    $0x3e8,%eax
jne    114e <main+0x1e>
xor    %eax,%eax
pop    %rcx
jmp    1040 <__VERIFIER_error@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %3, i32* %1
%4 = load i32, i32* %1
%5 = call i32 @id(i32 %4)
store i32 %5, i32* %2
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 1000
br i1 %7, label %8, label %10
8: ; preds = %0
%9 = call i32 (...) @__VERIFIER_error()
br label %10
10: ; preds = %8, %0
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 @id(i32 %1)
%3 = icmp eq i32 %2, 1000
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = tail call i32 (...) @__VERIFIER_error()
br label %6
6: ; preds = %4, %0
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ cursor;
};
typedef TYPE_1__ XSetWindowAttributes;

/* Variables and functions */
unsigned long get_XSetWindowAttributes_cursor(void *_p) {
  return (unsigned long)((XSetWindowAttributes *)_p)->cursor;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i64 @get_XSetWindowAttributes_cursor(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @get_XSetWindowAttributes_cursor(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ stringPointer();
int main() { stringPointer(); }


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @stringPointer()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @stringPointer()
ret i32 0
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int /*<<< orphan*/);
int /*<<< orphan*/ _UARTBaseValid(int);
uint32_t UARTTxIntModeGet(uint32_t ui32Base) {
  ASSERT(_UARTBaseValid(ui32Base));
  return ((*((volatile uint32_t *)(ui32Base + 0x00000030))) &
          (0x00000010 | 0x00000000));
}


x86 assembly (clang, -O0):
<UARTTxIntModeGet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <_UARTBaseValid@plt>
mov    %eax,%edi
call   1040 <ASSERT@plt>
mov    -0x4(%rbp),%eax
add    $0x30,%eax
cltq
mov    (%rax),%eax
and    $0x10,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UARTTxIntModeGet>:
push   %rbx
mov    %edi,%ebx
call   1030 <_UARTBaseValid@plt>
mov    %eax,%edi
call   1040 <ASSERT@plt>
movslq %ebx,%rax
mov    0x30(%rax),%eax
and    $0x10,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @UARTTxIntModeGet(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @_UARTBaseValid(i32 %3)
%5 = call i32 @ASSERT(i32 %4)
%6 = load i32, i32* %2
%7 = add nsw i32 %6, 48
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to i32*
%10 = load volatile i32, i32* %9
%11 = and i32 %10, 16
ret i32 %11
}

LLVM IR (-O2):
define i32 @UARTTxIntModeGet(i32 %0) {
%2 = tail call i32 @_UARTBaseValid(i32 %0)
%3 = tail call i32 @ASSERT(i32 %2)
%4 = add nsw i32 %0, 48
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i32*
%7 = load volatile i32, i32* %6
%8 = and i32 %7, 16
ret i32 %8
}
void pr_command(command) int *command;
{
  int i = 0;
  int token;
  while (1) {
    token = command[i];
    plintf("%d %d \n", i, token);
    if (token == 999)
      return;
    i++;
  }
}


x86 assembly (clang, -O0):
<pr_command>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
lea    0xec2(%rip),%rdi
mov    $0x0,%al
call   1030 <plintf@plt>
cmpl   $0x3e7,-0x10(%rbp)
jne    1158 <pr_command+0x48>
add    $0x10,%rsp
pop    %rbp
ret
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <pr_command+0x13>

x86 assembly (clang, -O2):
<pr_command>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r15
lea    0xedf(%rip),%r14
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    (%r15,%rbx,4),%ebp
mov    %r14,%rdi
mov    %ebx,%esi
mov    %ebp,%edx
xor    %eax,%eax
call   1030 <plintf@plt>
add    $0x1,%rbx
cmp    $0x3e7,%ebp
jne    1130 <pr_command+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [8 x i8] c"%d %d \0A\00"
define void @pr_command(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
store i32* %0, i32** %2
store i32 0, i32* %3
br label %5
5: ; preds = %1, %17
%6 = load i32*, i32** %2
%7 = load i32, i32* %3
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i32, i32* %6, i64 %8
%10 = load i32, i32* %9
store i32 %10, i32* %4
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @plintf to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %11, i32 %12)
%14 = load i32, i32* %4
%15 = icmp eq i32 %14, 999
br i1 %15, label %16, label %17
16: ; preds = %5
ret void
17: ; preds = %5
%18 = load i32, i32* %3
%19 = add nsw i32 %18, 1
store i32 %19, i32* %3
br label %5
}

LLVM IR (-O2):
@.str = [8 x i8] c"%d %d \0A\00"
define void @pr_command(i32* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %9, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i32, i32* %0, i64 %3
%5 = load i32, i32* %4
%6 = trunc i64 %3 to i32
%7 = tail call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @plintf to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %5)
%8 = icmp eq i32 %5, 999
%9 = add nuw i64 %3, 1
br i1 %8, label %10, label %2
10: ; preds = %2
ret void
}
char getchar(void) {
  while (((*((volatile unsigned long *)0x7F005018)) & 0x7f) == 0)
    ;
  return (*((volatile unsigned char *)0x7F005024));
}


x86 assembly (clang, -O0):
<getchar>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <getchar+0x9>
mov    $0x7f005018,%eax
mov    (%rax),%rax
and    $0x7f,%rax
cmp    $0x0,%rax
jne    1124 <getchar+0x24>
jmp    1109 <getchar+0x9>
mov    $0x7f005024,%eax
mov    (%rax),%al
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getchar>:
testq  $0x7f,0x7f005018
je     1100 <getchar>
mov    0x7f005024,%al
ret

LLVM IR (-O0):
define signext i8 @getchar() {
br label %1
1: ; preds = %5, %0
%2 = load volatile i64, i64* inttoptr (i64 2130726936 to i64*)
%3 = and i64 %2, 127
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %1
br label %1
6: ; preds = %1
%7 = load volatile i8, i8* inttoptr (i64 2130726948 to i8*)
ret i8 %7
}

LLVM IR (-O2):
define signext i8 @getchar() {
br label %1
1: ; preds = %1, %0
%2 = load volatile i64, i64* inttoptr (i64 2130726936 to i64*)
%3 = and i64 %2, 127
%4 = icmp eq i64 %3, 0
br i1 %4, label %1, label %5
5: ; preds = %1
%6 = load volatile i8, i8* inttoptr (i64 2130726948 to i8*)
ret i8 %6
}
int db_close() { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @db_close() {
ret i32 1
}
double Uglue(double Phi, double T, double mu) {
  return Phi * T * mu * mu * T * Phi * Phi * mu;
}


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

x86 assembly (clang, -O2):
<Uglue>:
movapd %xmm0,%xmm3
mulsd  %xmm1,%xmm3
mulsd  %xmm2,%xmm3
mulsd  %xmm2,%xmm3
mulsd  %xmm1,%xmm3
mulsd  %xmm0,%xmm3
mulsd  %xmm3,%xmm0
mulsd  %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @Uglue(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %4
%8 = load double, double* %5
%9 = fmul double %7, %8
%10 = load double, double* %6
%11 = fmul double %9, %10
%12 = load double, double* %6
%13 = fmul double %11, %12
%14 = load double, double* %5
%15 = fmul double %13, %14
%16 = load double, double* %4
%17 = fmul double %15, %16
%18 = load double, double* %4
%19 = fmul double %17, %18
%20 = load double, double* %6
%21 = fmul double %19, %20
ret double %21
}

LLVM IR (-O2):
define double @Uglue(double %0, double %1, double %2) {
%4 = fmul double %0, %1
%5 = fmul double %4, %2
%6 = fmul double %5, %2
%7 = fmul double %6, %1
%8 = fmul double %7, %0
%9 = fmul double %8, %0
%10 = fmul double %9, %2
ret double %10
}
/* Variables and functions */
size_t atomic_add_return(size_t *, int);
size_t atomic_inc_return(size_t *x) { return atomic_add_return(x, 1); }


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

x86 assembly (clang, -O2):
<atomic_inc_return>:
mov    $0x1,%esi
jmp    1030 <atomic_add_return@plt>

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

LLVM IR (-O2):
define i64 @atomic_inc_return(i64* %0) {
%2 = tail call i64 @atomic_add_return(i64* %0, i32 1)
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int val = 10;
  printf("%d\n", val);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0xa,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 10)
ret i32 0
}
void ff_hevc_put_hevc_uni_qpel_v24_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_qpel_v24_10_sse4() {
ret void
}
/* Variables and functions */
int rand();
int foo() {
  int n = rand();
  return n;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <rand@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @foo() {
%1 = alloca i32
%2 = call i32 (...) @rand()
store i32 %2, i32* %1
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @foo() {
%1 = tail call i32 (...) @rand()
ret i32 %1
}
unsigned char to_hex(unsigned char code) {
  static unsigned char hex[] = "0123456789ABCDEF";
  return hex[code & 15];
}


x86 assembly (clang, -O0):
<to_hex>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
and    $0xf,%eax
movslq %eax,%rcx
lea    0x2f15(%rip),%rax
movzbl (%rax,%rcx,1),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<to_hex>:
and    $0xf,%edi
lea    0xef6(%rip),%rax
mov    (%rdi,%rax,1),%al
ret

LLVM IR (-O0):
@to_hex.hex = internal global [17 x i8] c"0123456789ABCDEF\00"
define zeroext i8 @to_hex(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = and i32 %4, 15
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds [17 x i8], [17 x i8]* @to_hex.hex, i64 0, i64 %6
%8 = load i8, i8* %7
ret i8 %8
}

LLVM IR (-O2):
@to_hex.hex = internal unnamed_addr constant [17 x i8] c"0123456789ABCDEF\00"
define zeroext i8 @to_hex(i8 zeroext %0) {
%2 = and i8 %0, 15
%3 = zext i8 %2 to i64
%4 = getelementptr inbounds [17 x i8], [17 x i8]* @to_hex.hex, i64 0, i64 %3
%5 = load i8, i8* %4
ret i8 %5
}
/* Variables and functions */
int /*<<< orphan*/ glColor3f(float const, float const, float const);
void setcolor(const float r, const float v, const float b) {
  glColor3f(r, v, b);
}


x86 assembly (clang, -O0):
<setcolor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm2
call   1030 <glColor3f@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setcolor>:
jmp    1030 <glColor3f@plt>

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

LLVM IR (-O2):
define void @setcolor(float %0, float %1, float %2) {
%4 = tail call i32 @glColor3f(float %0, float %1, float %2)
ret void
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int IoSetDeviceInterfaceState(int SymbolicLinkName, int Enable) {
  {
    int tmp_ndt_6;
    tmp_ndt_6 = __VERIFIER_nondet_int();
    if (tmp_ndt_6 == 0) {
      goto switch_7_0;
    } else {
      goto switch_7_default;
      if (0) {
      switch_7_0:
        return (0);
      switch_7_default:;
        return (-1073741823);
      } else {
      }
    }
  }
}


x86 assembly (clang, -O0):
<IoSetDeviceInterfaceState>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jne    1137 <IoSetDeviceInterfaceState+0x27>
jmp    113c <IoSetDeviceInterfaceState+0x2c>
jmp    1148 <IoSetDeviceInterfaceState+0x38>
movl   $0x0,-0x4(%rbp)
jmp    114f <IoSetDeviceInterfaceState+0x3f>
movl   $0xc0000001,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IoSetDeviceInterfaceState>:
push   %rax
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
test   %eax,%eax
mov    $0xc0000001,%ecx
cmovne %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @IoSetDeviceInterfaceState(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%7 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %7, i32* %6
%8 = load i32, i32* %6
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %2
br label %14
11: ; preds = %2
br label %15
12: ; No predecessors!
br i1 false, label %13, label %16
13: ; preds = %12
br label %14
14: ; preds = %13, %10
store i32 0, i32* %3
br label %18
15: ; preds = %11
store i32 -1073741823, i32* %3
br label %18
16: ; preds = %12
br label %17
17: ; preds = %16
br label %18
18: ; preds = %14, %15, %17
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
define i32 @IoSetDeviceInterfaceState(i32 %0, i32 %1) {
%3 = tail call i32 (...) @__VERIFIER_nondet_int()
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 0, i32 -1073741823
ret i32 %5
}