xunge/DecIR huggingface dataset:
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned long time;
};
typedef TYPE_1__ XLeaveWindowEvent;

/* Variables and functions */
void set_XLeaveWindowEvent_time(void *_p, unsigned long _v) {
  ((XLeaveWindowEvent *)_p)->time = (unsigned long)_v;
}


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

x86 assembly (clang, -O2):
<set_XLeaveWindowEvent_time>:
mov    %rsi,(%rdi)
ret

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

LLVM IR (-O2):
define void @set_XLeaveWindowEvent_time(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
unsigned char bin2hex(unsigned char a) {
  if (a < 10)
    return '0' + a;
  else
    return 'A' - 10 + a;
}


x86 assembly (clang, -O0):
<bin2hex>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movzbl -0x2(%rbp),%eax
cmp    $0xa,%eax
jge    1126 <bin2hex+0x26>
movzbl -0x2(%rbp),%eax
add    $0x30,%eax
mov    %al,-0x1(%rbp)
jmp    1130 <bin2hex+0x30>
movzbl -0x2(%rbp),%eax
add    $0x37,%eax
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bin2hex>:
cmp    $0xa,%dil
mov    $0x30,%ecx
mov    $0x37,%eax
cmovb  %ecx,%eax
add    %dil,%al
ret

LLVM IR (-O0):
define zeroext i8 @bin2hex(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = icmp slt i32 %5, 10
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i8, i8* %3
%9 = zext i8 %8 to i32
%10 = add nsw i32 48, %9
%11 = trunc i32 %10 to i8
store i8 %11, i8* %2
br label %17
12: ; preds = %1
%13 = load i8, i8* %3
%14 = zext i8 %13 to i32
%15 = add nsw i32 55, %14
%16 = trunc i32 %15 to i8
store i8 %16, i8* %2
br label %17
17: ; preds = %12, %7
%18 = load i8, i8* %2
ret i8 %18
}

LLVM IR (-O2):
define zeroext i8 @bin2hex(i8 zeroext %0) {
%2 = icmp ult i8 %0, 10
%3 = select i1 %2, i8 48, i8 55
%4 = add i8 %3, %0
ret i8 %4
}
int main() {
  int sum = 0;
  int i, n = 10;
  i = 0;
  for (;;) {
    if (i >= n) {
      break;
    }
    sum += i;
    i++;
  }
  for (i = 0;; i++) {
    if (i == n / 2) {
      break;
    }
    sum -= 1;
  }
  i = 0;
  for (; i < n / 3;) {
    sum -= i;
    i++;
  }
  return sum;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0xa,-0x10(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jl     1131 <main+0x31>
jmp    1148 <main+0x48>
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1120 <main+0x20>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
cmp    %ecx,%eax
jne    1172 <main+0x72>
jmp    1189 <main+0x89>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    114f <main+0x4f>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x18(%rbp),%eax
cmp    %ecx,%eax
jge    11c7 <main+0xc7>
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1190 <main+0x90>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
store i32 10, i32* %4
store i32 0, i32* %3
br label %5
5: ; preds = %10, %0
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = icmp sge i32 %6, %7
br i1 %8, label %9, label %10
9: ; preds = %5
br label %16
10: ; preds = %5
%11 = load i32, i32* %3
%12 = load i32, i32* %2
%13 = add nsw i32 %12, %11
store i32 %13, i32* %2
%14 = load i32, i32* %3
%15 = add nsw i32 %14, 1
store i32 %15, i32* %3
br label %5
16: ; preds = %9
store i32 0, i32* %3
br label %17
17: ; preds = %26, %16
%18 = load i32, i32* %3
%19 = load i32, i32* %4
%20 = sdiv i32 %19, 2
%21 = icmp eq i32 %18, %20
br i1 %21, label %22, label %23
22: ; preds = %17
br label %29
23: ; preds = %17
%24 = load i32, i32* %2
%25 = sub nsw i32 %24, 1
store i32 %25, i32* %2
br label %26
26: ; preds = %23
%27 = load i32, i32* %3
%28 = add nsw i32 %27, 1
store i32 %28, i32* %3
br label %17
29: ; preds = %22
store i32 0, i32* %3
br label %30
30: ; preds = %35, %29
%31 = load i32, i32* %3
%32 = load i32, i32* %4
%33 = sdiv i32 %32, 3
%34 = icmp slt i32 %31, %33
br i1 %34, label %35, label %41
35: ; preds = %30
%36 = load i32, i32* %3
%37 = load i32, i32* %2
%38 = sub nsw i32 %37, %36
store i32 %38, i32* %2
%39 = load i32, i32* %3
%40 = add nsw i32 %39, 1
store i32 %40, i32* %3
br label %30
41: ; preds = %30
%42 = load i32, i32* %2
ret i32 %42
}

LLVM IR (-O2):
define i32 @main() {
ret i32 37
}
void ExttRadacctAuxTable(void) {}


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

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

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

LLVM IR (-O2):
define void @ExttRadacctAuxTable() {
ret void
}
int pr_a(int x) { return x + 1; }


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

x86 assembly (clang, -O2):
<pr_a>:
lea    0x1(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @pr_a(i32 %0) {
%2 = add nsw i32 %0, 1
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ Arc170(long, long, long, long, double, double, unsigned long,
                          unsigned long);
void arc(long x, long y, long rx, long ry, double sa, double ea,
         unsigned long cfg, unsigned long cbg) {
  Arc170(x, y, rx, ry, sa, ea, cfg, cbg);
}


x86 assembly (clang, -O0):
<arc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
movsd  %xmm0,-0x28(%rbp)
movsd  %xmm1,-0x30(%rbp)
mov    %r8,-0x38(%rbp)
mov    %r9,-0x40(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
movsd  -0x28(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
mov    -0x38(%rbp),%r8
mov    -0x40(%rbp),%r9
call   1030 <Arc170@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<arc>:
jmp    1030 <Arc170@plt>

LLVM IR (-O0):
define void @arc(i64 %0, i64 %1, i64 %2, i64 %3, double %4, double %5, i64 %6, i64 %7) {
%9 = alloca i64
%10 = alloca i64
%11 = alloca i64
%12 = alloca i64
%13 = alloca double
%14 = alloca double
%15 = alloca i64
%16 = alloca i64
store i64 %0, i64* %9
store i64 %1, i64* %10
store i64 %2, i64* %11
store i64 %3, i64* %12
store double %4, double* %13
store double %5, double* %14
store i64 %6, i64* %15
store i64 %7, i64* %16
%17 = load i64, i64* %9
%18 = load i64, i64* %10
%19 = load i64, i64* %11
%20 = load i64, i64* %12
%21 = load double, double* %13
%22 = load double, double* %14
%23 = load i64, i64* %15
%24 = load i64, i64* %16
%25 = call i32 @Arc170(i64 %17, i64 %18, i64 %19, i64 %20, double %21, double %22, i64 %23, i64 %24)
ret void
}

LLVM IR (-O2):
define void @arc(i64 %0, i64 %1, i64 %2, i64 %3, double %4, double %5, i64 %6, i64 %7) {
%9 = tail call i32 @Arc170(i64 %0, i64 %1, i64 %2, i64 %3, double %4, double %5, i64 %6, i64 %7)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ aa_endconv_st_le(void *, float *, int);
void aa_endconv_st_le_s(void *dst, float src) {
  aa_endconv_st_le(dst, &src, sizeof(float));
}


x86 assembly (clang, -O0):
<aa_endconv_st_le_s>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x4,%edx
call   1030 <aa_endconv_st_le@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aa_endconv_st_le_s>:
push   %rax
movss  %xmm0,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x4,%edx
call   1030 <aa_endconv_st_le@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @aa_endconv_st_le_s(i8* %0, float %1) {
%3 = alloca float
store float %1, float* %3
%4 = call i32 @aa_endconv_st_le(i8* %0, float* %3, i32 4)
ret void
}
int foo(int i) { return i + 1 > i; }


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

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

LLVM IR (-O0):
define i32 @foo(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 1
%5 = load i32, i32* %2
%6 = icmp sgt i32 %4, %5
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @foo(i32 %0) {
ret i32 1
}
int test_imm_03uint64_lowword_mem(unsigned long long *val) {
  return ((*val) & (0x03 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_03uint64_lowword_mem>:
testb  $0x3,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_03uint64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 3
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
scalar_t__ tolower(int);
void preprocessor_toLower(char *str) {
  char *src = str;
  while (*src != '\0') {
    *src = (char)tolower((int)*src);
    src++;
  }
}


x86 assembly (clang, -O0):
<preprocessor_toLower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1159 <preprocessor_toLower+0x49>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <tolower@plt>
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1124 <preprocessor_toLower+0x14>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<preprocessor_toLower>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1136 <preprocessor_toLower+0x26>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <tolower@plt>
mov    %al,-0x1(%rbx)
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <preprocessor_toLower+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @preprocessor_toLower(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %11, %4 ], [ %2, %1 ]
%6 = phi i8* [ %10, %4 ], [ %0, %1 ]
%7 = sext i8 %5 to i32
%8 = tail call i64 @tolower(i32 %7)
%9 = trunc i64 %8 to i8
store i8 %9, i8* %6
%10 = getelementptr inbounds i8, i8* %6, i64 1
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %4, %1
ret void
}
int main() {
  unsigned long long i = 0;
  while (1) {
    i++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    %rax,-0x10(%rbp)
jmp    1113 <main+0x13>

x86 assembly (clang, -O2):
<main>:
jmp    1100 <main>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
store i32 0, i32* %1
store i64 0, i64* %2
br label %3
3: ; preds = %0, %3
%4 = load i64, i64* %2
%5 = add i64 %4, 1
store i64 %5, i64* %2
br label %3
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %1, %0
br label %1
}
void mmc3_switch_banks() { return; }


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

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

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

LLVM IR (-O2):
define void @mmc3_switch_banks() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char const *);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ stdout;
void specprint(const char *str) {
  printf("%s\n", str);
  fflush(stdin);
  fflush(stdout);
}


x86 assembly (clang, -O0):
<specprint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
mov    0x2e87(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<specprint>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2eb1(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
mov    0x2e93(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1040 <fflush@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@stdin = global i32 0
@stdout = global i32 0
define void @specprint(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = load i32, i32* @stdin
%6 = call i32 @fflush(i32 %5)
%7 = load i32, i32* @stdout
%8 = call i32 @fflush(i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@stdin = global i32 0
@stdout = global i32 0
define void @specprint(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = load i32, i32* @stdin
%4 = tail call i32 @fflush(i32 %3)
%5 = load i32, i32* @stdout
%6 = tail call i32 @fflush(i32 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ calldolower(int);
char calldoupper(int, char, float);
int main(int argc, char **argv) {
  char x = calldoupper(argc, *argv[2], 0.5f);
  calldolower(argc + *argv[1]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
movss  0xeb7(%rip),%xmm0
movsbl (%rax),%esi
call   1040 <calldoupper@plt>
mov    %al,-0x11(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movsbl (%rax),%eax
add    %eax,%edi
call   1030 <calldolower@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    0x10(%rsi),%rax
movsbl (%rax),%esi
movss  0xec9(%rip),%xmm0
call   1040 <calldoupper@plt>
mov    0x8(%rbx),%rax
movsbl (%rax),%edi
add    %ebp,%edi
call   1030 <calldolower@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = load i8**, i8*** %5
%9 = getelementptr inbounds i8*, i8** %8, i64 2
%10 = load i8*, i8** %9
%11 = load i8, i8* %10
%12 = call signext i8 @calldoupper(i32 %7, i8 signext %11, float 5.000000e-01)
store i8 %12, i8* %6
%13 = load i32, i32* %4
%14 = load i8**, i8*** %5
%15 = getelementptr inbounds i8*, i8** %14, i64 1
%16 = load i8*, i8** %15
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = add nsw i32 %13, %18
%20 = call i32 @calldolower(i32 %19)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 2
%4 = load i8*, i8** %3
%5 = load i8, i8* %4
%6 = tail call signext i8 @calldoupper(i32 %0, i8 signext %5, float 5.000000e-01)
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = add nsw i32 %10, %0
%12 = tail call i32 @calldolower(i32 %11)
ret i32 0
}
/* Type definitions */
struct sockaddr_un {
  int dummy;
};
struct sockaddr {
  int dummy;
};
typedef int socklen_t;
typedef int /*<<< orphan*/ sa;

/* Variables and functions */
int net_generic_accept(char *, int, struct sockaddr *, int *);
int net_unix_accept(char *err, int sock) {
  int fd;
  struct sockaddr_un sa;
  socklen_t salen = sizeof(sa);
  if ((fd = net_generic_accept(err, sock, (struct sockaddr *)&sa, &salen)) ==
      -1) {
    return -1;
  }
  return fd;
}


x86 assembly (clang, -O0):
<net_unix_accept>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
movl   $0x4,-0x24(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
lea    -0x20(%rbp),%rdx
lea    -0x24(%rbp),%rcx
call   1030 <net_generic_accept@plt>
mov    %eax,-0x18(%rbp)
cmp    $0xffffffff,%eax
jne    1152 <net_unix_accept+0x42>
movl   $0xffffffff,-0x4(%rbp)
jmp    1158 <net_unix_accept+0x48>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<net_unix_accept>:
sub    $0x18,%rsp
movl   $0x4,0xc(%rsp)
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1030 <net_generic_accept@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.sockaddr_un = type { i32 }
%struct.sockaddr = type { i32 }
define i32 @net_unix_accept(i8* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca %struct.sockaddr_un
%8 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 4, i32* %8
%9 = load i8*, i8** %4
%10 = load i32, i32* %5
%11 = bitcast %struct.sockaddr_un* %7 to %struct.sockaddr*
%12 = call i32 @net_generic_accept(i8* %9, i32 %10, %struct.sockaddr* %11, i32* %8)
store i32 %12, i32* %6
%13 = icmp eq i32 %12, -1
br i1 %13, label %14, label %15
14: ; preds = %2
store i32 -1, i32* %3
br label %17
15: ; preds = %2
%16 = load i32, i32* %6
store i32 %16, i32* %3
br label %17
17: ; preds = %15, %14
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
%struct.sockaddr_un = type { i32 }
%struct.sockaddr = type { i32 }
define i32 @net_unix_accept(i8* %0, i32 %1) {
%3 = alloca %struct.sockaddr_un
%4 = alloca i32
%5 = bitcast %struct.sockaddr_un* %3 to i8*
%6 = bitcast i32* %4 to i8*
store i32 4, i32* %4
%7 = bitcast %struct.sockaddr_un* %3 to %struct.sockaddr*
%8 = call i32 @net_generic_accept(i8* %0, i32 %1, %struct.sockaddr* %7, i32* %4)
ret i32 %8
}
/* Variables and functions */
int slot_find_by_pid(int /*<<< orphan*/);
int slot_find_empty() { return slot_find_by_pid(0); }


x86 assembly (clang, -O0):
<slot_find_empty>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <slot_find_by_pid@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<slot_find_empty>:
xor    %edi,%edi
jmp    1030 <slot_find_by_pid@plt>

LLVM IR (-O0):
define i32 @slot_find_empty() {
%1 = call i32 @slot_find_by_pid(i32 0)
ret i32 %1
}

LLVM IR (-O2):
define i32 @slot_find_empty() {
%1 = tail call i32 @slot_find_by_pid(i32 0)
ret i32 %1
}
int adjust_num_gangs(int num_gangs, int limit) {
  if (num_gangs > limit) {
    return limit;
  }
  return num_gangs;
}


x86 assembly (clang, -O0):
<adjust_num_gangs>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1121 <adjust_num_gangs+0x21>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1127 <adjust_num_gangs+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<adjust_num_gangs>:
mov    %edi,%eax
cmp    %esi,%edi
cmovg  %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @adjust_num_gangs(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %1, i32 %0
ret i32 %4
}
/* Forward declarations */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ si_addr;
};
typedef TYPE_1__ siginfo_t;

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int, long);
void sigsegv_handler(int sig, siginfo_t *si, void *unused) {
  (void)(unused);
  printf("SIGSEGV(%d) recieved at address: 0x%lx.\n", sig, (long)si->si_addr);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<sigsegv_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e90(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<sigsegv_handler>:
push   %rax
mov    %edi,%eax
mov    (%rsi),%rdx
lea    0xed3(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
%struct.TYPE_3__ = type { i64 }
@.str = [41 x i8] c"SIGSEGV(%d) recieved at address: 0x%lx.\0A\00"
@EXIT_FAILURE = global i32 0
define void @sigsegv_handler(i32 %0, %struct.TYPE_3__* %1, i8* %2) {
%4 = alloca i32
%5 = alloca %struct.TYPE_3__*
%6 = alloca i8*
store i32 %0, i32* %4
store %struct.TYPE_3__* %1, %struct.TYPE_3__** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %6
%8 = load i32, i32* %4
%9 = load %struct.TYPE_3__*, %struct.TYPE_3__** %5
%10 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %9, i32 0, i32 0
%11 = load i64, i64* %10
%12 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i32 %8, i64 %11)
%13 = load i32, i32* @EXIT_FAILURE
%14 = call i32 @exit(i32 %13)
unreachable
}

LLVM IR (-O2):
%struct.TYPE_3__ = type { i64 }
@.str = [41 x i8] c"SIGSEGV(%d) recieved at address: 0x%lx.\0A\00"
@EXIT_FAILURE = global i32 0
define void @sigsegv_handler(i32 %0, %struct.TYPE_3__* nocapture %1, i8* nocapture readnone %2) {
%4 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %1, i64 0, i32 0
%5 = load i64, i64* %4
%6 = tail call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i32 %0, i64 %5)
%7 = load i32, i32* @EXIT_FAILURE
%8 = tail call i32 @exit(i32 %7)
unreachable
}
int skip_atoi(const char **s) {
  int i = 0;
  while (((**s) - '0' + 0U <= 9U))
    i = i * 10 + *((*s)++) - '0';
  return i;
}


x86 assembly (clang, -O0):
<skip_atoi>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
sub    $0x30,%eax
add    $0x0,%eax
cmp    $0x9,%eax
ja     114d <skip_atoi+0x4d>
imul   $0xa,-0xc(%rbp),%eax
mov    -0x8(%rbp),%rdx
mov    (%rdx),%rcx
mov    %rcx,%rsi
add    $0x1,%rsi
mov    %rsi,(%rdx)
movsbl (%rcx),%ecx
add    %ecx,%eax
sub    $0x30,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <skip_atoi+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_atoi>:
mov    (%rdi),%rcx
movsbl (%rcx),%edx
add    $0xffffffd0,%edx
xor    %eax,%eax
cmp    $0x9,%edx
ja     113f <skip_atoi+0x3f>
add    $0x1,%rcx
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
lea    (%rax,%rax,4),%eax
mov    %rcx,(%rdi)
movsbl -0x1(%rcx),%edx
lea    (%rdx,%rax,2),%eax
add    $0xffffffd0,%eax
movsbl (%rcx),%edx
add    $0xffffffd0,%edx
add    $0x1,%rcx
cmp    $0xa,%edx
jb     1120 <skip_atoi+0x20>
ret

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

LLVM IR (-O2):
define i32 @skip_atoi(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = add nsw i32 %4, -48
%6 = icmp ult i32 %5, 10
br i1 %6, label %7, label %20
7: ; preds = %1, %7
%8 = phi i8* [ %11, %7 ], [ %2, %1 ]
%9 = phi i32 [ %15, %7 ], [ 0, %1 ]
%10 = mul nsw i32 %9, 10
%11 = getelementptr inbounds i8, i8* %8, i64 1
store i8* %11, i8** %0
%12 = load i8, i8* %8
%13 = sext i8 %12 to i32
%14 = add i32 %10, -48
%15 = add i32 %14, %13
%16 = load i8, i8* %11
%17 = sext i8 %16 to i32
%18 = add nsw i32 %17, -48
%19 = icmp ult i32 %18, 10
br i1 %19, label %7, label %20
20: ; preds = %7, %1
%21 = phi i32 [ 0, %1 ], [ %15, %7 ]
ret i32 %21
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned long colormap;
};
typedef TYPE_1__ XWindowAttributes;

/* Variables and functions */
void set_XWindowAttributes_colormap(void *_p, unsigned long _v) {
  ((XWindowAttributes *)_p)->colormap = (unsigned long)_v;
}


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

x86 assembly (clang, -O2):
<set_XWindowAttributes_colormap>:
mov    %rsi,(%rdi)
ret

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

LLVM IR (-O2):
define void @set_XWindowAttributes_colormap(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
/* Variables and functions */
int fdt_add_subnode_namelen(void *, int, char const *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char const *);
int fdt_add_subnode(void *fdt, int parentoffset, const char *name) {
  return fdt_add_subnode_namelen(fdt, parentoffset, name, strlen(name));
}


x86 assembly (clang, -O0):
<fdt_add_subnode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x30(%rbp),%rdi
mov    -0x24(%rbp),%esi
mov    -0x20(%rbp),%rdx
mov    %eax,%ecx
call   1040 <fdt_add_subnode_namelen@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fdt_add_subnode>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%rbx
mov    %esi,%r14d
mov    %rdi,%rbp
mov    %rdx,%rdi
call   1030 <strlen@plt>
mov    %rbp,%rdi
mov    %r14d,%esi
mov    %rbx,%rdx
mov    %eax,%ecx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <fdt_add_subnode_namelen@plt>

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

LLVM IR (-O2):
define i32 @fdt_add_subnode(i8* %0, i32 %1, i8* %2) {
%4 = tail call i32 @strlen(i8* %2)
%5 = tail call i32 @fdt_add_subnode_namelen(i8* %0, i32 %1, i8* %2, i32 %4)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ gator_buffer_write_bytes(int, int, char const *, int);
int /*<<< orphan*/ gator_buffer_write_packed_int(int, int, int);
int strlen(char const *);
void gator_buffer_write_string(int cpu, int buftype, const char *x) {
  int len = strlen(x);
  gator_buffer_write_packed_int(cpu, buftype, len);
  gator_buffer_write_bytes(cpu, buftype, x, len);
}


x86 assembly (clang, -O0):
<gator_buffer_write_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x14(%rbp),%edx
call   1040 <gator_buffer_write_packed_int@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
call   1050 <gator_buffer_write_bytes@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gator_buffer_write_string>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %esi,%r15d
mov    %edi,%ebx
mov    %rdx,%rdi
call   1030 <strlen@plt>
mov    %eax,%ebp
mov    %ebx,%edi
mov    %r15d,%esi
mov    %eax,%edx
call   1040 <gator_buffer_write_packed_int@plt>
mov    %ebx,%edi
mov    %r15d,%esi
mov    %r14,%rdx
mov    %ebp,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1050 <gator_buffer_write_bytes@plt>

LLVM IR (-O0):
define void @gator_buffer_write_string(i32 %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%8 = load i8*, i8** %6
%9 = call i32 @strlen(i8* %8)
store i32 %9, i32* %7
%10 = load i32, i32* %4
%11 = load i32, i32* %5
%12 = load i32, i32* %7
%13 = call i32 @gator_buffer_write_packed_int(i32 %10, i32 %11, i32 %12)
%14 = load i32, i32* %4
%15 = load i32, i32* %5
%16 = load i8*, i8** %6
%17 = load i32, i32* %7
%18 = call i32 @gator_buffer_write_bytes(i32 %14, i32 %15, i8* %16, i32 %17)
ret void
}

LLVM IR (-O2):
define void @gator_buffer_write_string(i32 %0, i32 %1, i8* %2) {
%4 = tail call i32 @strlen(i8* %2)
%5 = tail call i32 @gator_buffer_write_packed_int(i32 %0, i32 %1, i32 %4)
%6 = tail call i32 @gator_buffer_write_bytes(i32 %0, i32 %1, i8* %2, i32 %4)
ret void
}
/* Variables and functions */
double __nv_yn(int, double);
double yn(int __a, double __b) { return __nv_yn(__a, __b); }


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

x86 assembly (clang, -O2):
<yn>:
jmp    1030 <__nv_yn@plt>

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

LLVM IR (-O2):
define double @yn(i32 %0, double %1) {
%3 = tail call double @__nv_yn(i32 %0, double %1)
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ I2CStatsHandle();
int /*<<< orphan*/ UAVObjUpdated(int /*<<< orphan*/);
void I2CStatsUpdated() { UAVObjUpdated(I2CStatsHandle()); }


x86 assembly (clang, -O0):
<I2CStatsUpdated>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <I2CStatsHandle@plt>
mov    %eax,%edi
call   1030 <UAVObjUpdated@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<I2CStatsUpdated>:
push   %rax
xor    %eax,%eax
call   1040 <I2CStatsHandle@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <UAVObjUpdated@plt>

LLVM IR (-O0):
define void @I2CStatsUpdated() {
%1 = call i32 (...) @I2CStatsHandle()
%2 = call i32 @UAVObjUpdated(i32 %1)
ret void
}

LLVM IR (-O2):
define void @I2CStatsUpdated() {
%1 = tail call i32 (...) @I2CStatsHandle()
%2 = tail call i32 @UAVObjUpdated(i32 %1)
ret void
}
/* Type definitions */
struct db_query {
  int dummy;
};
typedef int /*<<< orphan*/ sqlite3_stmt;

/* Variables and functions */
scalar_t__ sqlite3_column_text(int /*<<< orphan*/ *, int);
const char *db_column_text(struct db_query *query, int i) {
  if (query == NULL)
    return NULL;
  return (const char *)sqlite3_column_text((sqlite3_stmt *)query, i);
}


x86 assembly (clang, -O0):
<db_column_text>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1137 <db_column_text+0x27>
movq   $0x0,-0x8(%rbp)
jmp    1147 <db_column_text+0x37>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <sqlite3_column_text@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<db_column_text>:
test   %rdi,%rdi
je     1120 <db_column_text+0x10>
push   %rax
call   1030 <sqlite3_column_text@plt>
add    $0x8,%rsp
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
%struct.db_query = type { i32 }
define i8* @db_column_text(%struct.db_query* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca %struct.db_query*
%5 = alloca i32
store %struct.db_query* %0, %struct.db_query** %4
store i32 %1, i32* %5
%6 = load %struct.db_query*, %struct.db_query** %4
%7 = icmp eq %struct.db_query* %6, null
br i1 %7, label %8, label %9
8: ; preds = %2
store i8* null, i8** %3
br label %15
9: ; preds = %2
%10 = load %struct.db_query*, %struct.db_query** %4
%11 = bitcast %struct.db_query* %10 to i32*
%12 = load i32, i32* %5
%13 = call i64 @sqlite3_column_text(i32* %11, i32 %12)
%14 = inttoptr i64 %13 to i8*
store i8* %14, i8** %3
br label %15
15: ; preds = %9, %8
%16 = load i8*, i8** %3
ret i8* %16
}

LLVM IR (-O2):
%struct.db_query = type { i32 }
define i8* @db_column_text(%struct.db_query* %0, i32 %1) {
%3 = icmp eq %struct.db_query* %0, null
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = getelementptr %struct.db_query, %struct.db_query* %0, i64 0, i32 0
%6 = tail call i64 @sqlite3_column_text(i32* %5, i32 %1)
%7 = inttoptr i64 %6 to i8*
br label %8
8: ; preds = %2, %4
%9 = phi i8* [ %7, %4 ], [ null, %2 ]
ret i8* %9
}
/* Variables and functions */
int /*<<< orphan*/ fftss_r4_fma_o_b(double *, double *, double *, long, long);
void fftss_r4_bgl_pl_o_b(double *vi, double *vo, double *wn, long bsize,
                         long blocks) {
  fftss_r4_fma_o_b(vi, vo, wn, bsize, blocks);
}


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

x86 assembly (clang, -O2):
<fftss_r4_bgl_pl_o_b>:
jmp    1030 <fftss_r4_fma_o_b@plt>

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

LLVM IR (-O2):
define void @fftss_r4_bgl_pl_o_b(double* %0, double* %1, double* %2, i64 %3, i64 %4) {
%6 = tail call i32 @fftss_r4_fma_o_b(double* %0, double* %1, double* %2, i64 %3, i64 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char *);
void strcpy_ok(char *a, char *b) { strcpy(a, b); }


x86 assembly (clang, -O0):
<strcpy_ok>:
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 <strcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy_ok>:
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
define void @strcpy_ok(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 i32 @strcpy(i8* %5, i8* %6)
ret void
}

LLVM IR (-O2):
define void @strcpy_ok(i8* %0, i8* %1) {
%3 = tail call i32 @strcpy(i8* %0, i8* %1)
ret void
}
int numa_node_to_cpus(int node, unsigned long *buffer, int buffer_len) {
  return 1;
}


x86 assembly (clang, -O0):
<numa_node_to_cpus>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    $0x1,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @numa_node_to_cpus(i32 %0, i64* nocapture readnone %1, i32 %2) {
ret i32 1
}
void kiInitBus(void) {}


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

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

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

LLVM IR (-O2):
define void @kiInitBus() {
ret void
}
void movUCL(unsigned char *src, long *dst) { *dst = *src; }


x86 assembly (clang, -O0):
<movUCL>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<movUCL>:
movzbl (%rdi),%eax
mov    %rax,(%rsi)
ret

LLVM IR (-O0):
define void @movUCL(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 i8, i8* %5
%7 = zext i8 %6 to i64
%8 = load i64*, i64** %4
store i64 %7, i64* %8
ret void
}

LLVM IR (-O2):
define void @movUCL(i8* nocapture %0, i64* nocapture writeonly %1) {
%3 = load i8, i8* %0
%4 = zext i8 %3 to i64
store i64 %4, i64* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  printf("Hello Älvsjö!\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed3(%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
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"Hello \C3\84lvsj\C3\B6!\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [16 x i8] c"Hello \C3\84lvsj\C3\B6!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void printversion() { printf("Hydrogen Debugger 1.0 by James Spann"); }


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

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

LLVM IR (-O0):
@.str = [37 x i8] c"Hydrogen Debugger 1.0 by James Spann\00"
define void @printversion() {
%1 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [37 x i8] c"Hydrogen Debugger 1.0 by James Spann\00"
define void @printversion() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
char *skip_lws(char *);
int /*<<< orphan*/ strspn(char *, char *);
char *skip_eolws(char *str) {
  str = skip_lws(str);
  str += strspn(str, "\r\n");
  return str;
}


x86 assembly (clang, -O0):
<skip_eolws>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <skip_lws@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xebc(%rip),%rsi
call   1030 <strspn@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_eolws>:
push   %rbx
call   1040 <skip_lws@plt>
mov    %rax,%rbx
lea    0xed0(%rip),%rsi
mov    %rax,%rdi
call   1030 <strspn@plt>
cltq
add    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"\0D\0A\00"
define i8* @skip_eolws(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* @skip_lws(i8* %3)
store i8* %4, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @strspn(i8* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%7 = load i8*, i8** %2
%8 = sext i32 %6 to i64
%9 = getelementptr inbounds i8, i8* %7, i64 %8
store i8* %9, i8** %2
%10 = load i8*, i8** %2
ret i8* %10
}

LLVM IR (-O2):
@.str = [3 x i8] c"\0D\0A\00"
define i8* @skip_eolws(i8* %0) {
%2 = tail call i8* @skip_lws(i8* %0)
%3 = tail call i32 @strspn(i8* %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %2, i64 %4
ret i8* %5
}
void delayus(unsigned char dus) {
  unsigned char i;
  unsigned char m;
  for (i = 0; i < dus; i++) {
    ;
  }
}


x86 assembly (clang, -O0):
<delayus>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movb   $0x0,-0x2(%rbp)
movzbl -0x2(%rbp),%eax
movzbl -0x1(%rbp),%ecx
cmp    %ecx,%eax
jge    1130 <delayus+0x30>
jmp    1123 <delayus+0x23>
mov    -0x2(%rbp),%al
add    $0x1,%al
mov    %al,-0x2(%rbp)
jmp    110e <delayus+0xe>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @delayus(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %2
store i8 0, i8* %3
br label %5
5: ; preds = %12, %1
%6 = load i8, i8* %3
%7 = zext i8 %6 to i32
%8 = load i8, i8* %2
%9 = zext i8 %8 to i32
%10 = icmp slt i32 %7, %9
br i1 %10, label %11, label %15
11: ; preds = %5
br label %12
12: ; preds = %11
%13 = load i8, i8* %3
%14 = add i8 %13, 1
store i8 %14, i8* %3
br label %5
15: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @delayus(i8 zeroext %0) {
ret void
}
void iowrite8(unsigned short port, unsigned char v) {
  __asm__ __volatile__("outb %0, %1" : : "a"(v), "dN"(port));
}


x86 assembly (clang, -O0):
<iowrite8>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %al,-0x3(%rbp)
mov    -0x3(%rbp),%al
mov    -0x2(%rbp),%dx
out    %al,(%dx)
pop    %rbp
ret

x86 assembly (clang, -O2):
<iowrite8>:
mov    %esi,%eax
mov    %edi,%edx
out    %al,(%dx)
ret

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

LLVM IR (-O2):
define void @iowrite8(i16 zeroext %0, i8 zeroext %1) {
tail call void asm sideeffect "outb $0, $1", "{ax},{dx}N,~{dirflag},~{fpsr},~{flags}"(i8 %1, i16 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ poof();
__attribute__((transaction_safe)) void TMlist_free() { poof(); }


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

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

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

LLVM IR (-O2):
define void @TMlist_free() {
%1 = tail call i32 (...) @poof()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ xlFmtError(char *);
void xlTooMany(void) { xlFmtError("too many arguments"); }


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

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

LLVM IR (-O0):
@.str = [19 x i8] c"too many arguments\00"
define void @xlTooMany() {
%1 = call i32 @xlFmtError(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"too many arguments\00"
define void @xlTooMany() {
%1 = tail call i32 @xlFmtError(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int strlonger(char *, char *);
int main() {
  char *s = "ab";
  char *t = "bcd";
  int longer = strlonger(s, t);
  printf("longer %d\n", longer);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    0xec2(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strlonger@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%esi
lea    0xea8(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [3 x i8] c"ab\00"
@.str.1 = [4 x i8] c"bcd\00"
@.str.2 = [11 x i8] c"longer %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
store i32 0, i32* %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %2
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8** %3
%5 = load i8*, i8** %2
%6 = load i8*, i8** %3
%7 = call i32 @strlonger(i8* %5, i8* %6)
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i32 %8)
ret i32 0
}

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


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

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

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

LLVM IR (-O2):
define void @gtk_accelerator_parse() {
ret void
}