xunge/DecIR huggingface dataset:
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint16_t;

/* Variables and functions */
uint16_t read_le16(const void *src) {
  const uint8_t *s = src;
  return (((uint16_t)s[1]) << 8) | (((uint16_t)s[0]) << 0);
}


x86 assembly (clang, -O0):
<read_le16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
shl    $0x8,%eax
mov    -0x10(%rbp),%rcx
mov    (%rcx),%rcx
shl    $0x0,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_le16>:
mov    0x8(%rdi),%eax
shl    $0x8,%eax
or     (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @read_le16(i8* %0) {
%2 = alloca i8*
%3 = alloca i64*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i64*
store i64* %5, i64** %3
%6 = load i64*, i64** %3
%7 = getelementptr inbounds i64, i64* %6, i64 1
%8 = load i64, i64* %7
%9 = trunc i64 %8 to i32
%10 = shl i32 %9, 8
%11 = load i64*, i64** %3
%12 = getelementptr inbounds i64, i64* %11, i64 0
%13 = load i64, i64* %12
%14 = trunc i64 %13 to i32
%15 = shl i32 %14, 0
%16 = or i32 %10, %15
ret i32 %16
}

LLVM IR (-O2):
define i32 @read_le16(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = getelementptr inbounds i8, i8* %0, i64 8
%4 = bitcast i8* %3 to i64*
%5 = load i64, i64* %4
%6 = trunc i64 %5 to i32
%7 = shl i32 %6, 8
%8 = load i64, i64* %2
%9 = trunc i64 %8 to i32
%10 = or i32 %7, %9
ret i32 %10
}
/* Type definitions */
struct fus_bigint_t {
  int dummy;
};

/* Variables and functions */
scalar_t__ fus_bigint_add(struct fus_bigint_t *, struct fus_bigint_t *);
int /*<<< orphan*/ fus_bigint_neg(struct fus_bigint_t *);
int fus_bigint_sub(struct fus_bigint_t *bi0, struct fus_bigint_t *bi1) {
  fus_bigint_neg(bi0);
  if (fus_bigint_add(bi0, bi1))
    return 1;
  fus_bigint_neg(bi0);
  return 0;
}


x86 assembly (clang, -O0):
<fus_bigint_sub>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <fus_bigint_neg@plt>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <fus_bigint_add@plt>
cmp    $0x0,%rax
je     115c <fus_bigint_sub+0x3c>
movl   $0x1,-0x4(%rbp)
jmp    116c <fus_bigint_sub+0x4c>
mov    -0x10(%rbp),%rdi
call   1030 <fus_bigint_neg@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fus_bigint_sub>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <fus_bigint_neg@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <fus_bigint_add@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
jne    1151 <fus_bigint_sub+0x31>
mov    %rbx,%rdi
call   1030 <fus_bigint_neg@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.fus_bigint_t = type { i32 }
define i32 @fus_bigint_sub(%struct.fus_bigint_t* %0, %struct.fus_bigint_t* %1) {
%3 = alloca i32
%4 = alloca %struct.fus_bigint_t*
%5 = alloca %struct.fus_bigint_t*
store %struct.fus_bigint_t* %0, %struct.fus_bigint_t** %4
store %struct.fus_bigint_t* %1, %struct.fus_bigint_t** %5
%6 = load %struct.fus_bigint_t*, %struct.fus_bigint_t** %4
%7 = call i32 @fus_bigint_neg(%struct.fus_bigint_t* %6)
%8 = load %struct.fus_bigint_t*, %struct.fus_bigint_t** %4
%9 = load %struct.fus_bigint_t*, %struct.fus_bigint_t** %5
%10 = call i64 @fus_bigint_add(%struct.fus_bigint_t* %8, %struct.fus_bigint_t* %9)
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %2
store i32 1, i32* %3
br label %16
13: ; preds = %2
%14 = load %struct.fus_bigint_t*, %struct.fus_bigint_t** %4
%15 = call i32 @fus_bigint_neg(%struct.fus_bigint_t* %14)
store i32 0, i32* %3
br label %16
16: ; preds = %13, %12
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
%struct.fus_bigint_t = type { i32 }
define i32 @fus_bigint_sub(%struct.fus_bigint_t* %0, %struct.fus_bigint_t* %1) {
%3 = tail call i32 @fus_bigint_neg(%struct.fus_bigint_t* %0)
%4 = tail call i64 @fus_bigint_add(%struct.fus_bigint_t* %0, %struct.fus_bigint_t* %1)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @fus_bigint_neg(%struct.fus_bigint_t* %0)
br label %8
8: ; preds = %2, %6
%9 = phi i32 [ 0, %6 ], [ 1, %2 ]
ret i32 %9
}
void ottery_st_prevent_backtracking_nolock(struct ottery_state *st) {
  (void)st;
}


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

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

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

LLVM IR (-O2):
%struct.ottery_state = type opaque
define void @ottery_st_prevent_backtracking_nolock(%struct.ottery_state* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print(int);
int main(void) {
  int i;
  for (i = 11; i <= 33; i += 2)
    print(i);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xb,-0x8(%rbp)
cmpl   $0x21,-0x8(%rbp)
jg     1146 <main+0x36>
mov    -0x8(%rbp),%edi
call   1030 <print@plt>
mov    -0x8(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xb,%edi
call   1030 <print@plt>
mov    $0xd,%edi
call   1030 <print@plt>
mov    $0xf,%edi
call   1030 <print@plt>
mov    $0x11,%edi
call   1030 <print@plt>
mov    $0x13,%edi
call   1030 <print@plt>
mov    $0x15,%edi
call   1030 <print@plt>
mov    $0x17,%edi
call   1030 <print@plt>
mov    $0x19,%edi
call   1030 <print@plt>
mov    $0x1b,%edi
call   1030 <print@plt>
mov    $0x1d,%edi
call   1030 <print@plt>
mov    $0x1f,%edi
call   1030 <print@plt>
mov    $0x21,%edi
call   1030 <print@plt>
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 11, i32* %2
br label %3
3: ; preds = %9, %0
%4 = load i32, i32* %2
%5 = icmp sle i32 %4, 33
br i1 %5, label %6, label %12
6: ; preds = %3
%7 = load i32, i32* %2
%8 = call i32 @print(i32 %7)
br label %9
9: ; preds = %6
%10 = load i32, i32* %2
%11 = add nsw i32 %10, 2
store i32 %11, i32* %2
br label %3
12: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @print(i32 11)
%2 = tail call i32 @print(i32 13)
%3 = tail call i32 @print(i32 15)
%4 = tail call i32 @print(i32 17)
%5 = tail call i32 @print(i32 19)
%6 = tail call i32 @print(i32 21)
%7 = tail call i32 @print(i32 23)
%8 = tail call i32 @print(i32 25)
%9 = tail call i32 @print(i32 27)
%10 = tail call i32 @print(i32 29)
%11 = tail call i32 @print(i32 31)
%12 = tail call i32 @print(i32 33)
ret i32 0
}
/* Variables and functions */
unsigned char inb(int);
int /*<<< orphan*/ outb(unsigned char, int);
void cs5535_enable_smbus(void) {
  unsigned char val;
  outb(0, 0x6000 + 0x05);
  val = inb(0x6000 + 0x05);
  val |= ((0x20 << 1) | 0x01);
  outb(val, 0x6000 + 0x05);
  val = inb(0x6000 + 0x04);
  val |= (0xEF | (0x01 << 7));
  outb(val, 0x6000 + 0x04);
}


x86 assembly (clang, -O0):
<cs5535_enable_smbus>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %edi,%edi
mov    $0x6005,%esi
call   1030 <outb@plt>
mov    $0x6005,%edi
call   1040 <inb@plt>
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
or     $0x41,%eax
mov    %al,-0x1(%rbp)
mov    $0x6005,%esi
movzbl -0x1(%rbp),%edi
call   1030 <outb@plt>
mov    $0x6004,%edi
call   1040 <inb@plt>
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
or     $0xef,%eax
mov    %al,-0x1(%rbp)
mov    $0x6004,%esi
movzbl -0x1(%rbp),%edi
call   1030 <outb@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cs5535_enable_smbus>:
push   %rax
xor    %edi,%edi
mov    $0x6005,%esi
call   1030 <outb@plt>
mov    $0x6005,%edi
call   1040 <inb@plt>
or     $0x41,%al
movzbl %al,%edi
mov    $0x6005,%esi
call   1030 <outb@plt>
mov    $0x6004,%edi
call   1040 <inb@plt>
or     $0xef,%al
movzbl %al,%edi
mov    $0x6004,%esi
pop    %rax
jmp    1030 <outb@plt>

LLVM IR (-O0):
define void @cs5535_enable_smbus() {
%1 = alloca i8
%2 = call i32 @outb(i8 zeroext 0, i32 24581)
%3 = call zeroext i8 @inb(i32 24581)
store i8 %3, i8* %1
%4 = load i8, i8* %1
%5 = zext i8 %4 to i32
%6 = or i32 %5, 65
%7 = trunc i32 %6 to i8
store i8 %7, i8* %1
%8 = load i8, i8* %1
%9 = call i32 @outb(i8 zeroext %8, i32 24581)
%10 = call zeroext i8 @inb(i32 24580)
store i8 %10, i8* %1
%11 = load i8, i8* %1
%12 = zext i8 %11 to i32
%13 = or i32 %12, 239
%14 = trunc i32 %13 to i8
store i8 %14, i8* %1
%15 = load i8, i8* %1
%16 = call i32 @outb(i8 zeroext %15, i32 24580)
ret void
}

LLVM IR (-O2):
define void @cs5535_enable_smbus() {
%1 = tail call i32 @outb(i8 zeroext 0, i32 24581)
%2 = tail call zeroext i8 @inb(i32 24581)
%3 = or i8 %2, 65
%4 = tail call i32 @outb(i8 zeroext %3, i32 24581)
%5 = tail call zeroext i8 @inb(i32 24580)
%6 = or i8 %5, -17
%7 = tail call i32 @outb(i8 zeroext %6, i32 24580)
ret void
}
void setPinFunction(int pinId, int func) {
  (*(unsigned int *)(0xe002c000UL)) &= ~(0x3 << (pinId * 2));
  (*(unsigned int *)(0xe002c000UL)) |= (func << (pinId * 2));
}


x86 assembly (clang, -O0):
<setPinFunction>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%ecx
shl    $0x1,%ecx
mov    $0x3,%eax
shl    %cl,%eax
mov    %eax,%ecx
xor    $0xffffffff,%ecx
mov    $0xe002c000,%eax
and    (%rax),%ecx
mov    $0xe002c000,%eax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%eax
mov    -0x4(%rbp),%ecx
shl    $0x1,%ecx
shl    %cl,%eax
mov    %eax,%ecx
mov    $0xe002c000,%eax
or     (%rax),%ecx
mov    $0xe002c000,%eax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<setPinFunction>:
lea    (%rdi,%rdi,1),%ecx
mov    $0x3,%eax
shl    %cl,%eax
not    %eax
mov    $0xe002c000,%edx
shl    %cl,%esi
and    (%rdx),%eax
or     %eax,%esi
mov    %esi,(%rdx)
ret

LLVM IR (-O0):
define void @setPinFunction(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 = mul nsw i32 %5, 2
%7 = shl i32 3, %6
%8 = xor i32 %7, -1
%9 = load i32, i32* inttoptr (i64 3758276608 to i32*)
%10 = and i32 %9, %8
store i32 %10, i32* inttoptr (i64 3758276608 to i32*)
%11 = load i32, i32* %4
%12 = load i32, i32* %3
%13 = mul nsw i32 %12, 2
%14 = shl i32 %11, %13
%15 = load i32, i32* inttoptr (i64 3758276608 to i32*)
%16 = or i32 %15, %14
store i32 %16, i32* inttoptr (i64 3758276608 to i32*)
ret void
}

LLVM IR (-O2):
define void @setPinFunction(i32 %0, i32 %1) {
%3 = shl nsw i32 %0, 1
%4 = shl i32 3, %3
%5 = xor i32 %4, -1
%6 = load i32, i32* inttoptr (i64 3758276608 to i32*)
%7 = and i32 %6, %5
%8 = shl i32 %1, %3
%9 = or i32 %7, %8
store i32 %9, i32* inttoptr (i64 3758276608 to i32*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ snprintf(char *, int, char *, int);
char *ALT_strsignal(int sig) {
  static char buf[100];
  snprintf(buf, 100, "SIG-%d", sig);
  return buf;
}


x86 assembly (clang, -O0):
<ALT_strsignal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
lea    0x2f1b(%rip),%rdi
mov    $0x64,%esi
lea    0xecf(%rip),%rdx
call   1030 <snprintf@plt>
lea    0x2f03(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ALT_strsignal>:
push   %rbx
mov    %edi,%ecx
lea    0x2f26(%rip),%rbx
lea    0xedf(%rip),%rdx
mov    %rbx,%rdi
mov    $0x64,%esi
call   1030 <snprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@ALT_strsignal.buf = internal global [100 x i8] zeroinitializer
@.str = [7 x i8] c"SIG-%d\00"
define i8* @ALT_strsignal(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @snprintf(i8* getelementptr inbounds ([100 x i8], [100 x i8]* @ALT_strsignal.buf, i64 0, i64 0), i32 100, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i8* getelementptr inbounds ([100 x i8], [100 x i8]* @ALT_strsignal.buf, i64 0, i64 0)
}

LLVM IR (-O2):
@ALT_strsignal.buf = internal global [100 x i8] zeroinitializer
@.str = [7 x i8] c"SIG-%d\00"
define i8* @ALT_strsignal(i32 %0) {
%2 = tail call i32 @snprintf(i8* getelementptr inbounds ([100 x i8], [100 x i8]* @ALT_strsignal.buf, i64 0, i64 0), i32 100, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i8* getelementptr inbounds ([100 x i8], [100 x i8]* @ALT_strsignal.buf, i64 0, i64 0)
}
void Init_Cokebank(void) {}


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

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

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

LLVM IR (-O2):
define void @Init_Cokebank() {
ret void
}
/* Variables and functions */
int ocorrencias(char *, char, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, char *, char *);
int main() {
  char palavra[30];
  char letra;
  scanf("%s %c", palavra, &letra);
  printf("%d", ocorrencias(palavra, letra, 0));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    -0x20(%rbp),%rsi
lea    0xebd(%rip),%rdi
lea    -0x21(%rbp),%rdx
call   1050 <scanf@plt>
lea    -0x20(%rbp),%rdi
xor    %edx,%edx
movsbl -0x21(%rbp),%esi
call   1030 <ocorrencias@plt>
mov    %eax,%esi
lea    0xea2(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
lea    0xec4(%rip),%rdi
lea    0x10(%rsp),%rbx
lea    0xf(%rsp),%rdx
mov    %rbx,%rsi
call   1050 <scanf@plt>
movsbl 0xf(%rsp),%esi
mov    %rbx,%rdi
xor    %edx,%edx
call   1030 <ocorrencias@plt>
lea    0xea2(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%s %c\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca [30 x i8]
%2 = alloca i8
%3 = getelementptr inbounds [30 x i8], [30 x i8]* %1, i64 0, i64 0
%4 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %3, i8* %2)
%5 = getelementptr inbounds [30 x i8], [30 x i8]* %1, i64 0, i64 0
%6 = load i8, i8* %2
%7 = call i32 @ocorrencias(i8* %5, i8 signext %6, i32 0)
%8 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"%s %c\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca [30 x i8]
%2 = alloca i8
%3 = getelementptr inbounds [30 x i8], [30 x i8]* %1, i64 0, i64 0
%4 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %3, i8* %2)
%5 = load i8, i8* %2
%6 = call i32 @ocorrencias(i8* %3, i8 signext %5, i32 0)
%7 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ip_init();
int main() {
  ip_init();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @ip_init()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @ip_init()
ret i32 0
}
int quan(val, table, size)
int val;
short *table;
int size;
{
  int i;
  for (i = 0; i < size; i++)
    if (val < *table++)
      break;
  return (i);
}


x86 assembly (clang, -O0):
<quan>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1156 <quan+0x56>
mov    -0x4(%rbp),%eax
mov    -0x10(%rbp),%rcx
mov    %rcx,%rdx
add    $0x2,%rdx
mov    %rdx,-0x10(%rbp)
movswl (%rcx),%ecx
cmp    %ecx,%eax
jge    1143 <quan+0x43>
jmp    1156 <quan+0x56>
jmp    1148 <quan+0x48>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1115 <quan+0x15>
mov    -0x18(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<quan>:
test   %edx,%edx
jle    1121 <quan+0x21>
mov    %edx,%eax
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
movswl (%rsi,%rcx,2),%edx
cmp    %edi,%edx
jg     1124 <quan+0x24>
add    $0x1,%rcx
cmp    %ecx,%eax
jne    1110 <quan+0x10>
ret
xor    %eax,%eax
ret
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @quan(i32 %0, i16* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i16*
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i16* %1, i16** %5
store i32 %2, i32* %6
store i32 0, i32* %7
br label %8
8: ; preds = %21, %3
%9 = load i32, i32* %7
%10 = load i32, i32* %6
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %24
12: ; preds = %8
%13 = load i32, i32* %4
%14 = load i16*, i16** %5
%15 = getelementptr inbounds i16, i16* %14, i32 1
store i16* %15, i16** %5
%16 = load i16, i16* %14
%17 = sext i16 %16 to i32
%18 = icmp slt i32 %13, %17
br i1 %18, label %19, label %20
19: ; preds = %12
br label %24
20: ; preds = %12
br label %21
21: ; preds = %20
%22 = load i32, i32* %7
%23 = add nsw i32 %22, 1
store i32 %23, i32* %7
br label %8
24: ; preds = %19, %8
%25 = load i32, i32* %7
ret i32 %25
}

LLVM IR (-O2):
define i32 @quan(i32 %0, i16* nocapture %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %15
5: ; preds = %3, %11
%6 = phi i32 [ %13, %11 ], [ 0, %3 ]
%7 = phi i16* [ %12, %11 ], [ %1, %3 ]
%8 = load i16, i16* %7
%9 = sext i16 %8 to i32
%10 = icmp sgt i32 %9, %0
br i1 %10, label %15, label %11
11: ; preds = %5
%12 = getelementptr inbounds i16, i16* %7, i64 1
%13 = add nuw nsw i32 %6, 1
%14 = icmp eq i32 %13, %2
br i1 %14, label %15, label %5
15: ; preds = %11, %5, %3
%16 = phi i32 [ 0, %3 ], [ %6, %5 ], [ %2, %11 ]
ret i32 %16
}
int rfkill_is_blocked(struct rfkill_data *rfkill) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.rfkill_data = type opaque
define i32 @rfkill_is_blocked(%struct.rfkill_data* nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
typedef int time;

/* Variables and functions */
int /*<<< orphan*/ SendChar(int);
void SetBuzzer(unsigned char time) {
  SendChar((0XEE) & 0xFF);
  SendChar((0x61) & 0xFF);
  SendChar((time)&0xFF);
  SendChar((((0XFFFCFFFF) >> 16) >> 8) & 0xFF);
  SendChar(((0XFFFCFFFF) >> 16) & 0xFF);
  SendChar((((0XFFFCFFFF) & 0xFFFF) >> 8) & 0xFF);
  SendChar(((0XFFFCFFFF) & 0xFFFF) & 0xFF);
}


x86 assembly (clang, -O0):
<SetBuzzer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0xee,%edi
call   1030 <SendChar@plt>
mov    $0x61,%edi
call   1030 <SendChar@plt>
movzbl -0x1(%rbp),%edi
and    $0xff,%edi
call   1030 <SendChar@plt>
mov    $0xff,%edi
call   1030 <SendChar@plt>
mov    $0xfc,%edi
call   1030 <SendChar@plt>
mov    $0xff,%edi
call   1030 <SendChar@plt>
mov    $0xff,%edi
call   1030 <SendChar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SetBuzzer>:
push   %rbx
mov    %edi,%ebx
mov    $0xee,%edi
call   1030 <SendChar@plt>
mov    $0x61,%edi
call   1030 <SendChar@plt>
mov    %ebx,%edi
call   1030 <SendChar@plt>
mov    $0xff,%edi
call   1030 <SendChar@plt>
mov    $0xfc,%edi
call   1030 <SendChar@plt>
mov    $0xff,%edi
call   1030 <SendChar@plt>
mov    $0xff,%edi
pop    %rbx
jmp    1030 <SendChar@plt>

LLVM IR (-O0):
define void @SetBuzzer(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call i32 @SendChar(i32 238)
%4 = call i32 @SendChar(i32 97)
%5 = load i8, i8* %2
%6 = zext i8 %5 to i32
%7 = and i32 %6, 255
%8 = call i32 @SendChar(i32 %7)
%9 = call i32 @SendChar(i32 255)
%10 = call i32 @SendChar(i32 252)
%11 = call i32 @SendChar(i32 255)
%12 = call i32 @SendChar(i32 255)
ret void
}

LLVM IR (-O2):
define void @SetBuzzer(i8 zeroext %0) {
%2 = tail call i32 @SendChar(i32 238)
%3 = tail call i32 @SendChar(i32 97)
%4 = zext i8 %0 to i32
%5 = tail call i32 @SendChar(i32 %4)
%6 = tail call i32 @SendChar(i32 255)
%7 = tail call i32 @SendChar(i32 252)
%8 = tail call i32 @SendChar(i32 255)
%9 = tail call i32 @SendChar(i32 255)
ret void
}
void ADC_DelSig_ISR3(void) {}


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

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

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

LLVM IR (-O2):
define void @ADC_DelSig_ISR3() {
ret void
}
/* Variables and functions */
void *realloc(void *, size_t);
void *defaultRealloc(void *vpt, size_t size) { return realloc(vpt, size); }


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

x86 assembly (clang, -O2):
<defaultRealloc>:
jmp    1030 <realloc@plt>

LLVM IR (-O0):
define i8* @defaultRealloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = load i64, i64* %4
%7 = call i8* @realloc(i8* %5, i64 %6)
ret i8* %7
}

LLVM IR (-O2):
define noalias i8* @defaultRealloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ fwrite(char *, int, int, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void test_write() { fwrite("Hello world\n", 1, 12, stdout); }


x86 assembly (clang, -O0):
<test_write>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%ecx
lea    0xedc(%rip),%rdi
mov    $0x1,%esi
mov    $0xc,%edx
call   1030 <fwrite@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_write>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%ecx
lea    0xee0(%rip),%rdi
mov    $0x1,%esi
mov    $0xc,%edx
jmp    1030 <fwrite@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"Hello world\0A\00"
@stdout = global i32 0
define void @test_write() {
%1 = load i32, i32* @stdout
%2 = call i32 @fwrite(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 1, i32 12, i32 %1)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"Hello world\0A\00"
@stdout = global i32 0
define void @test_write() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fwrite(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 1, i32 12, i32 %1)
ret void
}
void ScaleRowDown2Box_Odd_NEON() {}


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

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

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

LLVM IR (-O2):
define void @ScaleRowDown2Box_Odd_NEON() {
ret void
}
/* Variables and functions */
scalar_t__ zchin(int, int *);
int /*<<< orphan*/ zclose(int);
int nxttype(void) {
  int c;
  if (zchin(2, &c) < 0) {
    zclose(2);
    return (-1);
  } else {
    return ((unsigned)c);
  }
}


x86 assembly (clang, -O0):
<nxttype>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x2,%edi
lea    -0x8(%rbp),%rsi
call   1030 <zchin@plt>
cmp    $0x0,%rax
jge    1156 <nxttype+0x36>
mov    $0x2,%edi
call   1040 <zclose@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    115c <nxttype+0x3c>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nxttype>:
push   %rax
lea    0x4(%rsp),%rsi
mov    $0x2,%edi
call   1030 <zchin@plt>
test   %rax,%rax
js     113b <nxttype+0x1b>
mov    0x4(%rsp),%eax
pop    %rcx
ret
mov    $0x2,%edi
call   1040 <zclose@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @nxttype() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i64 @zchin(i32 2, i32* %1)
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 @zclose(i32 2)
br label %9
7: ; preds = %0
%8 = load i32, i32* %1
br label %9
9: ; preds = %7, %5
%10 = phi i32 [ -1, %5 ], [ %8, %7 ]
ret i32 %10
}
int do_265() { return 265; }


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

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

LLVM IR (-O0):
define i32 @do_265() {
ret i32 265
}

LLVM IR (-O2):
define i32 @do_265() {
ret i32 265
}
char *setlocale(int category, const char *locale) {
  ;
  return "C";
}


x86 assembly (clang, -O0):
<setlocale>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeee(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<setlocale>:
lea    0xef9(%rip),%rax
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c"C\00"
define i8* @setlocale(i32 %0, i8* nocapture readnone %1) {
ret i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int const num_factors(int);
int /*<<< orphan*/ printf(char *, int const, int);
int main() {
  const int max_factors = 500;
  int n = 1;
  int triangle = 1;
  while (1) {
    n++;
    triangle += n;
    if (num_factors(triangle) > max_factors) {
      break;
    }
  }
  printf("The first triangle number to have over %d factors is %d.\n",
         max_factors, triangle);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1f4,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
movl   $0x1,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%edi
call   1040 <num_factors@plt>
cmp    $0x1f4,%eax
jle    116e <main+0x4e>
jmp    1173 <main+0x53>
jmp    1144 <main+0x24>
mov    -0x10(%rbp),%edx
lea    0xe83(%rip),%rdi
mov    $0x1f4,%esi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    $0x1,%ebx
mov    $0x2,%ebp
nopl   (%rax)
add    %ebp,%ebx
mov    %ebx,%edi
call   1040 <num_factors@plt>
add    $0x1,%ebp
cmp    $0x1f5,%eax
jl     1130 <main+0x10>
lea    0xeb6(%rip),%rdi
mov    $0x1f4,%esi
mov    %ebx,%edx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [58 x i8] c"The first triangle number to have over %d factors is %d.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 500, i32* %2
store i32 1, i32* %3
store i32 1, i32* %4
br label %5
5: ; preds = %0, %15
%6 = load i32, i32* %3
%7 = add nsw i32 %6, 1
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = add nsw i32 %9, %8
store i32 %10, i32* %4
%11 = load i32, i32* %4
%12 = call i32 @num_factors(i32 %11)
%13 = icmp sgt i32 %12, 500
br i1 %13, label %14, label %15
14: ; preds = %5
br label %16
15: ; preds = %5
br label %5
16: ; preds = %14
%17 = load i32, i32* %4
%18 = call i32 @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0), i32 500, i32 %17)
%19 = load i32, i32* %1
ret i32 %19
}

LLVM IR (-O2):
@.str = [58 x i8] c"The first triangle number to have over %d factors is %d.\0A\00"
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = phi i32 [ 1, %0 ], [ %4, %1 ]
%3 = phi i32 [ 1, %0 ], [ %5, %1 ]
%4 = add nuw nsw i32 %2, 1
%5 = add nuw nsw i32 %3, %4
%6 = tail call i32 @num_factors(i32 %5)
%7 = icmp sgt i32 %6, 500
br i1 %7, label %8, label %1
8: ; preds = %1
%9 = tail call i32 @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0), i32 500, i32 %5)
ret i32 0
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
int /*<<< orphan*/ IntDisable(int);
int /*<<< orphan*/ IntUnregister(int);
int _USBIntNumberGet(int);
void USBIntUnregister(uint32_t ui32Base) {
  uint32_t ui32Int;
  ASSERT(ui32Base == 0x40050000);
  ui32Int = _USBIntNumberGet(ui32Base);
  ASSERT(ui32Int != 0);
  IntDisable(ui32Int);
  IntUnregister(ui32Int);
}


x86 assembly (clang, -O0):
<USBIntUnregister>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x40050000,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <ASSERT@plt>
mov    -0x4(%rbp),%edi
call   1060 <_USBIntNumberGet@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <ASSERT@plt>
mov    -0x8(%rbp),%edi
call   1030 <IntDisable@plt>
mov    -0x8(%rbp),%edi
call   1050 <IntUnregister@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<USBIntUnregister>:
push   %rbx
mov    %edi,%ebx
xor    %edi,%edi
cmp    $0x40050000,%ebx
sete   %dil
call   1040 <ASSERT@plt>
mov    %ebx,%edi
call   1060 <_USBIntNumberGet@plt>
mov    %eax,%ebx
xor    %edi,%edi
test   %eax,%eax
setne  %dil
call   1040 <ASSERT@plt>
mov    %ebx,%edi
call   1030 <IntDisable@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1050 <IntUnregister@plt>

LLVM IR (-O0):
define void @USBIntUnregister(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = icmp eq i32 %4, 1074069504
%6 = zext i1 %5 to i32
%7 = call i32 @ASSERT(i32 %6)
%8 = load i32, i32* %2
%9 = call i32 @_USBIntNumberGet(i32 %8)
store i32 %9, i32* %3
%10 = load i32, i32* %3
%11 = icmp ne i32 %10, 0
%12 = zext i1 %11 to i32
%13 = call i32 @ASSERT(i32 %12)
%14 = load i32, i32* %3
%15 = call i32 @IntDisable(i32 %14)
%16 = load i32, i32* %3
%17 = call i32 @IntUnregister(i32 %16)
ret void
}

LLVM IR (-O2):
define void @USBIntUnregister(i32 %0) {
%2 = icmp eq i32 %0, 1074069504
%3 = zext i1 %2 to i32
%4 = tail call i32 @ASSERT(i32 %3)
%5 = tail call i32 @_USBIntNumberGet(i32 %0)
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i32
%8 = tail call i32 @ASSERT(i32 %7)
%9 = tail call i32 @IntDisable(i32 %5)
%10 = tail call i32 @IntUnregister(i32 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_assert(int);
unsigned int __VERIFIER_nondet_uint();
int main(void) {
  unsigned int a = __VERIFIER_nondet_uint();
  if (a > 0) {
    __VERIFIER_assert(a > 0);
  } else {
    __VERIFIER_assert(a == 0);
  }
  return a;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <__VERIFIER_nondet_uint@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jbe    1159 <main+0x39>
cmpl   $0x0,-0x8(%rbp)
seta   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__VERIFIER_assert@plt>
jmp    116a <main+0x4a>
cmpl   $0x0,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__VERIFIER_assert@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <__VERIFIER_nondet_uint@plt>
mov    %eax,%ebx
mov    $0x1,%edi
call   1030 <__VERIFIER_assert@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_uint()
%2 = tail call i32 @__VERIFIER_assert(i32 1)
ret i32 %1
}
/* Type definitions */
struct cbor_buf {
  int dummy;
};

/* Variables and functions */
int cbor_buf_append_byte(struct cbor_buf *, int);
bool cbor_add_true(struct cbor_buf *buf) {
  return cbor_buf_append_byte(buf, 0xf5);
}


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

x86 assembly (clang, -O2):
<cbor_add_true>:
mov    $0xf5,%esi
jmp    1030 <cbor_buf_append_byte@plt>

LLVM IR (-O0):
%struct.cbor_buf = type { i32 }
define i32 @cbor_add_true(%struct.cbor_buf* %0) {
%2 = alloca %struct.cbor_buf*
store %struct.cbor_buf* %0, %struct.cbor_buf** %2
%3 = load %struct.cbor_buf*, %struct.cbor_buf** %2
%4 = call i32 @cbor_buf_append_byte(%struct.cbor_buf* %3, i32 245)
ret i32 %4
}

LLVM IR (-O2):
%struct.cbor_buf = type { i32 }
define i32 @cbor_add_true(%struct.cbor_buf* %0) {
%2 = tail call i32 @cbor_buf_append_byte(%struct.cbor_buf* %0, i32 245)
ret i32 %2
}
/* Variables and functions */
bool greater_or_equals(int excepted, int actual) { return actual >= excepted; }


x86 assembly (clang, -O0):
<greater_or_equals>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
setge  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<greater_or_equals>:
xor    %eax,%eax
cmp    %edi,%esi
setge  %al
ret

LLVM IR (-O0):
define i32 @greater_or_equals(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* %3
%7 = icmp sge i32 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @greater_or_equals(i32 %0, i32 %1) {
%3 = icmp sge i32 %1, %0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
scalar_t__ strcmp(char const *, char const *);
int equal_str(void *k1, void *k2) {
  return strcmp((const char *)k1, (const char *)k2) == 0;
}


x86 assembly (clang, -O0):
<equal_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @equal_str(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 = load i8*, i8** %4
%7 = call i64 @strcmp(i8* %5, i8* %6)
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @equal_str(i8* %0, i8* %1) {
%3 = tail call i64 @strcmp(i8* %0, i8* %1)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
void cpu_set_switches(unsigned long sw1, unsigned long sw2) {}


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

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

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

LLVM IR (-O2):
define void @cpu_set_switches(i64 %0, i64 %1) {
ret void
}
/* Type definitions */
struct lock {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ __enable_interrupt();
void unlock(struct lock *lock) { __enable_interrupt(); }


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

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

LLVM IR (-O0):
%struct.lock = type { i32 }
define void @unlock(%struct.lock* %0) {
%2 = alloca %struct.lock*
store %struct.lock* %0, %struct.lock** %2
%3 = call i32 (...) @__enable_interrupt()
ret void
}

LLVM IR (-O2):
%struct.lock = type { i32 }
define void @unlock(%struct.lock* nocapture readnone %0) {
%2 = tail call i32 (...) @__enable_interrupt()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ actuators_pwm_arch_init();
void actuators_init(void) { actuators_pwm_arch_init(); }


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

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

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

LLVM IR (-O2):
define void @actuators_init() {
%1 = tail call i32 (...) @actuators_pwm_arch_init()
ret void
}
/* Variables and functions */
int _isatty(int);
int isatty(int d) { return _isatty(d); }


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

x86 assembly (clang, -O2):
<isatty>:
jmp    1030 <_isatty@plt>

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

LLVM IR (-O2):
define i32 @isatty(i32 %0) {
%2 = tail call i32 @_isatty(i32 %0)
ret i32 %2
}
void print_node_default(int depth, char *name, char *value, void *client_data) {
  printf("%*s", depth * 4, "");
  printf("%s  %s.\n", name, change_newline2space(value));
}


x86 assembly (clang, -O0):
<print_node_default>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x4(%rbp),%esi
shl    $0x2,%esi
lea    0xebc(%rip),%rdi
lea    0xec1(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rdi
mov    $0x0,%al
call   1040 <change_newline2space@plt>
mov    -0x28(%rbp),%rsi
mov    %eax,%edx
lea    0xe92(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_node_default>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%rbx
mov    %rsi,%r14
lea    0x0(,%rdi,4),%esi
lea    0xec8(%rip),%rdi
lea    0xecd(%rip),%rdx
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <change_newline2space@plt>
lea    0xead(%rip),%rdi
mov    %r14,%rsi
mov    %eax,%edx
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%*s\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [9 x i8] c"%s %s.\0A\00"
define void @print_node_default(i32 %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
store i32 %0, i32* %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i32, i32* %5
%10 = mul nsw i32 %9, 4
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %10, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%12 = load i8*, i8** %6
%13 = load i8*, i8** %7
%14 = call i32 (i8*, ...) bitcast (i32 (...)* @change_newline2space to i32 (i8*, ...)*)(i8* %13)
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* %12, i32 %14)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%*s\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [9 x i8] c"%s %s.\0A\00"
define void @print_node_default(i32 %0, i8* %1, i8* %2, i8* nocapture readnone %3) {
%5 = shl nsw i32 %0, 2
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%7 = tail call i32 (i8*, ...) bitcast (i32 (...)* @change_newline2space to i32 (i8*, ...)*)(i8* %2)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* %1, i32 %7)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void addIndexRef(FILE *fo) {
  fprintf(fo, "<div><a href=\"#index\">index</a></div>\n");
}


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

x86 assembly (clang, -O2):
<addIndexRef>:
mov    %rdi,%rcx
lea    0xee6(%rip),%rdi
mov    $0x26,%esi
mov    $0x1,%edx
jmp    1030 <fwrite@plt>

LLVM IR (-O0):
@.str = [39 x i8] c"<div><a href=\22#index\22>index</a></div>\0A\00"
define void @addIndexRef(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [39 x i8] c"<div><a href=\22#index\22>index</a></div>\0A\00"
define void @addIndexRef(i32* nocapture %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i64 38, i64 1, i32* %0)
ret void
}
/* Type definitions */
struct stack_impl {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void stack_impl_ops_push(struct stack_impl *stack_impl, int val) {
  printf("stack_impl::push()\n");
}


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

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

LLVM IR (-O0):
%struct.stack_impl = type { i32 }
@.str = [20 x i8] c"stack_impl::push()\0A\00"
define void @stack_impl_ops_push(%struct.stack_impl* %0, i32 %1) {
%3 = alloca %struct.stack_impl*
%4 = alloca i32
store %struct.stack_impl* %0, %struct.stack_impl** %3
store i32 %1, i32* %4
%5 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.stack_impl = type { i32 }
@str = [19 x i8] c"stack_impl::push()\00"
define void @stack_impl_ops_push(%struct.stack_impl* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ strlen(char *);
int /*<<< orphan*/ write(int, char *, int /*<<< orphan*/);
void die(char *s) {
  write(2, s, strlen(s));
  exit(111);
}


x86 assembly (clang, -O0):
<die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x10(%rbp),%rsi
mov    %eax,%edx
mov    $0x2,%edi
call   1030 <write@plt>
mov    $0x6f,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<die>:
push   %rbx
mov    %rdi,%rbx
call   1040 <strlen@plt>
mov    $0x2,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <write@plt>
mov    $0x6f,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
define void @die(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
%6 = call i32 @write(i32 2, i8* %3, i32 %5)
%7 = call i32 @exit(i32 111)
unreachable
}

LLVM IR (-O2):
define void @die(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = tail call i32 @write(i32 2, i8* %0, i32 %2)
%4 = tail call i32 @exit(i32 111)
unreachable
}
/* Variables and functions */
int getn(int, int);
int get4() { return getn(4, 1); }


x86 assembly (clang, -O0):
<get4>:
push   %rbp
mov    %rsp,%rbp
mov    $0x4,%edi
mov    $0x1,%esi
call   1030 <getn@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<get4>:
mov    $0x4,%edi
mov    $0x1,%esi
jmp    1030 <getn@plt>

LLVM IR (-O0):
define i32 @get4() {
%1 = call i32 @getn(i32 4, i32 1)
ret i32 %1
}

LLVM IR (-O2):
define i32 @get4() {
%1 = tail call i32 @getn(i32 4, i32 1)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ TimerRefreshChannel(unsigned int);
void TimerRefresh(void) {
  unsigned int i;
  for (i = 0; i < 4; ++i)
    TimerRefreshChannel(i);
}


x86 assembly (clang, -O0):
<TimerRefresh>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x4,-0x4(%rbp)
jae    113f <TimerRefresh+0x2f>
mov    -0x4(%rbp),%edi
call   1030 <TimerRefreshChannel@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <TimerRefresh+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TimerRefresh>:
push   %rax
xor    %edi,%edi
call   1030 <TimerRefreshChannel@plt>
mov    $0x1,%edi
call   1030 <TimerRefreshChannel@plt>
mov    $0x2,%edi
call   1030 <TimerRefreshChannel@plt>
mov    $0x3,%edi
pop    %rax
jmp    1030 <TimerRefreshChannel@plt>

LLVM IR (-O0):
define void @TimerRefresh() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %8, %0
%3 = load i32, i32* %1
%4 = icmp ult i32 %3, 4
br i1 %4, label %5, label %11
5: ; preds = %2
%6 = load i32, i32* %1
%7 = call i32 @TimerRefreshChannel(i32 %6)
br label %8
8: ; preds = %5
%9 = load i32, i32* %1
%10 = add i32 %9, 1
store i32 %10, i32* %1
br label %2
11: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @TimerRefresh() {
%1 = tail call i32 @TimerRefreshChannel(i32 0)
%2 = tail call i32 @TimerRefreshChannel(i32 1)
%3 = tail call i32 @TimerRefreshChannel(i32 2)
%4 = tail call i32 @TimerRefreshChannel(i32 3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Help();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void Usage(void) {
  Help();
  exit(0);
}


x86 assembly (clang, -O0):
<Usage>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <Help@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<Usage>:
push   %rax
xor    %eax,%eax
call   1030 <Help@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @Usage() {
%1 = call i32 (...) @Help()
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @Usage() {
%1 = tail call i32 (...) @Help()
%2 = tail call i32 @exit(i32 0)
unreachable
}