xunge/DecIR huggingface dataset:
/* Type definitions */
struct enemy {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ enemy_get_sprite(struct enemy const *);
int sprite_col(int /*<<< orphan*/);
int enemy_get_col(struct enemy const *e) {
  if (e == NULL)
    return -1;
  return sprite_col(enemy_get_sprite(e));
}


x86 assembly (clang, -O0):
<enemy_get_col>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1143 <enemy_get_col+0x23>
movl   $0xffffffff,-0x4(%rbp)
jmp    1156 <enemy_get_col+0x36>
mov    -0x10(%rbp),%rdi
call   1030 <enemy_get_sprite@plt>
mov    %eax,%edi
call   1040 <sprite_col@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<enemy_get_col>:
test   %rdi,%rdi
je     1133 <enemy_get_col+0x13>
push   %rax
call   1030 <enemy_get_sprite@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <sprite_col@plt>
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
%struct.enemy = type { i32 }
define i32 @enemy_get_col(%struct.enemy* %0) {
%2 = alloca i32
%3 = alloca %struct.enemy*
store %struct.enemy* %0, %struct.enemy** %3
%4 = load %struct.enemy*, %struct.enemy** %3
%5 = icmp eq %struct.enemy* %4, null
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 -1, i32* %2
br label %11
7: ; preds = %1
%8 = load %struct.enemy*, %struct.enemy** %3
%9 = call i32 @enemy_get_sprite(%struct.enemy* %8)
%10 = call i32 @sprite_col(i32 %9)
store i32 %10, i32* %2
br label %11
11: ; preds = %7, %6
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
%struct.enemy = type { i32 }
define i32 @enemy_get_col(%struct.enemy* %0) {
%2 = icmp eq %struct.enemy* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i32 @enemy_get_sprite(%struct.enemy* %0)
%5 = tail call i32 @sprite_col(i32 %4)
br label %6
6: ; preds = %1, %3
%7 = phi i32 [ %5, %3 ], [ -1, %1 ]
ret i32 %7
}
void bwb_Warning_Clear(void) {
  bwx_DEBUG(__FUNCTION__);
  bwb_Warning(0, "");
}


x86 assembly (clang, -O0):
<bwb_Warning_Clear>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
mov    $0x0,%al
call   1030 <bwx_DEBUG@plt>
xor    %edi,%edi
lea    0xed6(%rip),%rsi
mov    $0x0,%al
call   1040 <bwb_Warning@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<bwb_Warning_Clear>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1030 <bwx_DEBUG@plt>
lea    0xedb(%rip),%rsi
xor    %edi,%edi
xor    %eax,%eax
pop    %rcx
jmp    1040 <bwb_Warning@plt>

LLVM IR (-O0):
@__FUNCTION__.bwb_Warning_Clear = [18 x i8] c"bwb_Warning_Clear\00"
@.str = [1 x i8] zeroinitializer
define void @bwb_Warning_Clear() {
%1 = call i32 (i8*, ...) bitcast (i32 (...)* @bwx_DEBUG to i32 (i8*, ...)*)(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @__FUNCTION__.bwb_Warning_Clear, i64 0, i64 0))
%2 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @bwb_Warning to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__FUNCTION__.bwb_Warning_Clear = [18 x i8] c"bwb_Warning_Clear\00"
@.str = [1 x i8] zeroinitializer
define void @bwb_Warning_Clear() {
%1 = tail call i32 (i8*, ...) bitcast (i32 (...)* @bwx_DEBUG to i32 (i8*, ...)*)(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @__FUNCTION__.bwb_Warning_Clear, i64 0, i64 0))
%2 = tail call i32 (i32, i8*, ...) bitcast (i32 (...)* @bwb_Warning to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
uint8_t get_u8(const void *ptr) { return *((uint8_t *)ptr); }


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

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

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

LLVM IR (-O2):
define i32 @get_u8(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, int /*<<< orphan*/ *, int);
void pack_to_h16(void *v, uint16_t u) { memcpy(v, &u, sizeof(uint16_t)); }


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

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

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

LLVM IR (-O2):
define void @pack_to_h16(i8* %0, i32 %1) {
%3 = alloca i32
store i32 %1, i32* %3
%4 = call i32 @memcpy(i8* %0, i32* %3, i32 4)
ret void
}
void kmain() {
  SetTextColor(0x03 | 0x08, 0x00);
  kprintf("\nSystem OK...halting.");
  do {
    __asm__ __volatile__("cli  \n\t"
                         "hlt");
  } while (1 == 1);
}


x86 assembly (clang, -O0):
<kmain>:
push   %rbp
mov    %rsp,%rbp
mov    $0xb,%edi
xor    %esi,%esi
mov    $0x0,%al
call   1030 <SetTextColor@plt>
lea    0xec7(%rip),%rdi
mov    $0x0,%al
call   1040 <kprintf@plt>
cli
hlt
mov    $0x1,%al
test   $0x1,%al
jne    1140 <kmain+0x20>
jmp    1151 <kmain+0x31>
pop    %rbp
ret

x86 assembly (clang, -O2):
<kmain>:
push   %rax
mov    $0xb,%edi
xor    %esi,%esi
xor    %eax,%eax
call   1030 <SetTextColor@plt>
lea    0xeca(%rip),%rdi
xor    %eax,%eax
call   1040 <kprintf@plt>
nopl   (%rax)
cli
hlt
jmp    1140 <kmain+0x20>

LLVM IR (-O0):
@.str = [22 x i8] c"\0ASystem OK...halting.\00"
define void @kmain() {
%1 = call i32 (i32, i32, ...) bitcast (i32 (...)* @SetTextColor to i32 (i32, i32, ...)*)(i32 11, i32 0)
%2 = call i32 (i8*, ...) bitcast (i32 (...)* @kprintf to i32 (i8*, ...)*)(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
br label %3
3: ; preds = %4, %0
br label %4
4: ; preds = %3
br i1 true, label %3, label %5
5: ; preds = %4
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"\0ASystem OK...halting.\00"
define void @kmain() {
%1 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @SetTextColor to i32 (i32, i32, ...)*)(i32 11, i32 0)
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @kprintf to i32 (i8*, ...)*)(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
br label %3
3: ; preds = %3, %0
tail call void asm sideeffect "cli \0A\09hlt", "~{dirflag},~{fpsr},~{flags}"()
br label %3
}
int sum(int num1, int num2, int num3) { return num1 + num2 + num3; }


x86 assembly (clang, -O0):
<sum>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sum>:
lea    (%rdi,%rsi,1),%eax
add    %edx,%eax
ret

LLVM IR (-O0):
define i32 @sum(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = add nsw i32 %7, %8
%10 = load i32, i32* %6
%11 = add nsw i32 %9, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @sum(i32 %0, i32 %1, i32 %2) {
%4 = add nsw i32 %1, %0
%5 = add nsw i32 %4, %2
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ main2(int, char **);
int main(int ac, char *av[]) { main2(ac, av); }


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @main2(i32 %0, i8** %1)
ret i32 0
}
int main() {
  asm volatile("" : : : "memory");
  struct A *r = f1("{ \"id\": null, \"blahah\": \"foobarbazbar\", \"barbar\": "
                   "{ \"barbarbarba\":"
                   "\"abcdefgh\", \"ijklmnopqr\": "
                   "\"stuvwxyzabcdefghijklmnopqrstuv\", \"xyzxyz\":"
                   " [ \"1\" ] } }");
  if (!r)
    __builtin_abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1040 <f1@plt>
cltq
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1153 <main+0x33>
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1040 <f1@plt>
test   %eax,%eax
je     1137 <main+0x17>
xor    %eax,%eax
pop    %rcx
ret
call   1030 <abort@plt>

LLVM IR (-O0):
%struct.A = type opaque
@.str = [148 x i8] c"{ \22id\22: null, \22blahah\22: \22foobarbazbar\22, \22barbar\22: { \22barbarbarba\22:\22abcdefgh\22, \22ijklmnopqr\22: \22stuvwxyzabcdefghijklmnopqrstuv\22, \22xyzxyz\22: [ \221\22 ] } }\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.A*
store i32 0, i32* %1
%3 = call i32 (i8*, ...) bitcast (i32 (...)* @f1 to i32 (i8*, ...)*)(i8* getelementptr inbounds ([148 x i8], [148 x i8]* @.str, i64 0, i64 0))
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to %struct.A*
store %struct.A* %5, %struct.A** %2
%6 = load %struct.A*, %struct.A** %2
%7 = icmp ne %struct.A* %6, null
br i1 %7, label %9, label %8
8: ; preds = %0
unreachable
9: ; preds = %0
ret i32 0
}

LLVM IR (-O2):
@.str = [148 x i8] c"{ \22id\22: null, \22blahah\22: \22foobarbazbar\22, \22barbar\22: { \22barbarbarba\22:\22abcdefgh\22, \22ijklmnopqr\22: \22stuvwxyzabcdefghijklmnopqrstuv\22, \22xyzxyz\22: [ \221\22 ] } }\00"
define i32 @main() {
tail call void asm sideeffect "", "~{memory},~{dirflag},~{fpsr},~{flags}"()
%1 = tail call i32 (i8*, ...) bitcast (i32 (...)* @f1 to i32 (i8*, ...)*)(i8* getelementptr inbounds ([148 x i8], [148 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i32 %1, 0
br i1 %2, label %3, label %4
3: ; preds = %0
tail call void @abort()
unreachable
4: ; preds = %0
ret i32 0
}
void INT_Excep_TMR1_CMI1B(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_TMR1_CMI1B() {
ret void
}
/* Variables and functions */
double exp(double);
double aic_weight_nominator(double aic_score) { return exp(-0.5 * aic_score); }


x86 assembly (clang, -O0):
<aic_weight_nominator>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xedb(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
call   1030 <exp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aic_weight_nominator>:
mulsd  0xee8(%rip),%xmm0
jmp    1030 <exp@plt>

LLVM IR (-O0):
define double @aic_weight_nominator(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double -5.000000e-01, %3
%5 = call double @exp(double %4)
ret double %5
}

LLVM IR (-O2):
define double @aic_weight_nominator(double %0) {
%2 = fmul double %0, -5.000000e-01
%3 = tail call double @exp(double %2)
ret double %3
}
/* Variables and functions */
int sr_strcmp0(char const *, char const *);
int sr_ptrstrcmp(const void *s1, const void *s2) {
  return sr_strcmp0(*(const char **)s1, *(const char **)s2);
}


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

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

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

LLVM IR (-O2):
define i32 @sr_ptrstrcmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = load i8*, i8** %3
%5 = bitcast i8* %1 to i8**
%6 = load i8*, i8** %5
%7 = tail call i32 @sr_strcmp0(i8* %4, i8* %6)
ret i32 %7
}
int calcDelay(int prevSlot, int nextSlot) {
  if (nextSlot > prevSlot) {
    return (nextSlot - prevSlot);
  } else {
    return (8 - nextSlot + prevSlot);
  }
}


x86 assembly (clang, -O0):
<calcDelay>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1124 <calcDelay+0x24>
mov    -0xc(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1132 <calcDelay+0x32>
mov    $0x8,%eax
sub    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<calcDelay>:
mov    %esi,%ecx
sub    %edi,%ecx
mov    $0x8,%eax
sub    %ecx,%eax
sub    %edi,%esi
cmovg  %esi,%eax
ret

LLVM IR (-O0):
define i32 @calcDelay(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* %5
%7 = load i32, i32* %4
%8 = icmp sgt i32 %6, %7
br i1 %8, label %9, label %13
9: ; preds = %2
%10 = load i32, i32* %5
%11 = load i32, i32* %4
%12 = sub nsw i32 %10, %11
store i32 %12, i32* %3
br label %18
13: ; preds = %2
%14 = load i32, i32* %5
%15 = sub nsw i32 8, %14
%16 = load i32, i32* %4
%17 = add nsw i32 %15, %16
store i32 %17, i32* %3
br label %18
18: ; preds = %13, %9
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
define i32 @calcDelay(i32 %0, i32 %1) {
%3 = icmp sgt i32 %1, %0
%4 = sub nsw i32 %1, %0
%5 = add i32 %0, 8
%6 = sub i32 %5, %1
%7 = select i1 %3, i32 %4, i32 %6
ret i32 %7
}
/* Variables and functions */
int rename_file(char const *, char const *);
int replace_file(const char *dst, const char *src) {
  return rename_file(dst, src);
}


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

x86 assembly (clang, -O2):
<replace_file>:
jmp    1030 <rename_file@plt>

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

LLVM IR (-O2):
define i32 @replace_file(i8* %0, i8* %1) {
%3 = tail call i32 @rename_file(i8* %0, i8* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ cnfExprt(char *, char *const, int);
int /*<<< orphan*/ strcpy(char *, char *);
void tc1_(char *const c, int c_length) {

  char string[10];
  strcpy(string, "Test C1");
  cnfExprt(string, c, c_length);
}


x86 assembly (clang, -O0):
<tc1_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    -0x16(%rbp),%rdi
lea    0xec6(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x16(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1040 <cnfExprt@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tc1_>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %esi,%ebp
mov    %rdi,%rbx
lea    0xecc(%rip),%rsi
lea    0x6(%rsp),%r14
mov    %r14,%rdi
call   1030 <strcpy@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %ebp,%edx
call   1040 <cnfExprt@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [8 x i8] c"Test C1\00"
define void @tc1_(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca [10 x i8]
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = getelementptr inbounds [10 x i8], [10 x i8]* %5, i64 0, i64 0
%7 = call i32 @strcpy(i8* %6, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%8 = getelementptr inbounds [10 x i8], [10 x i8]* %5, i64 0, i64 0
%9 = load i8*, i8** %3
%10 = load i32, i32* %4
%11 = call i32 @cnfExprt(i8* %8, i8* %9, i32 %10)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"Test C1\00"
define void @tc1_(i8* %0, i32 %1) {
%3 = alloca [10 x i8]
%4 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%5 = call i32 @strcpy(i8* %4, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @cnfExprt(i8* %4, i8* %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ log_warning(char *, char *);
int /*<<< orphan*/ open_cfg_file();
int main() {
  open_cfg_file();
  log_warning("Teste de logagem", "SEN03");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <open_cfg_file@plt>
lea    0xece(%rip),%rdi
lea    0xed8(%rip),%rsi
call   1030 <log_warning@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <open_cfg_file@plt>
lea    0xed1(%rip),%rdi
lea    0xedb(%rip),%rsi
call   1030 <log_warning@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"Teste de logagem\00"
@.str.1 = [6 x i8] c"SEN03\00"
define i32 @main() {
%1 = call i32 (...) @open_cfg_file()
%2 = call i32 @log_warning(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"Teste de logagem\00"
@.str.1 = [6 x i8] c"SEN03\00"
define i32 @main() {
%1 = tail call i32 (...) @open_cfg_file()
%2 = tail call i32 @log_warning(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int A_BOLD;
int COLOR_PAIR(int);
int /*<<< orphan*/ attroff(int);
void attribute_off_c(int option) { attroff(COLOR_PAIR(option) | A_BOLD); }


x86 assembly (clang, -O0):
<attribute_off_c>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <COLOR_PAIR@plt>
mov    %eax,%edi
mov    0x2ea4(%rip),%rax
or     (%rax),%edi
call   1030 <attroff@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<attribute_off_c>:
push   %rax
call   1040 <COLOR_PAIR@plt>
mov    0x2eb3(%rip),%rcx
or     (%rcx),%eax
mov    %eax,%edi
pop    %rax
jmp    1030 <attroff@plt>

LLVM IR (-O0):
@A_BOLD = global i32 0
define void @attribute_off_c(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @COLOR_PAIR(i32 %3)
%5 = load i32, i32* @A_BOLD
%6 = or i32 %4, %5
%7 = call i32 @attroff(i32 %6)
ret void
}

LLVM IR (-O2):
@A_BOLD = global i32 0
define void @attribute_off_c(i32 %0) {
%2 = tail call i32 @COLOR_PAIR(i32 %0)
%3 = load i32, i32* @A_BOLD
%4 = or i32 %3, %2
%5 = tail call i32 @attroff(i32 %4)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int countlist(void **);
int /*<<< orphan*/ free(int /*<<< orphan*/ *);
int /*<<< orphan*/ *pids_of_exe(char const *);
int num_procs_of_exe(const char *exe) {
  pid_t *pids = pids_of_exe(exe);
  int ret;
  ret = countlist((void **)pids);
  if (pids)
    free(pids);
  return ret;
}


x86 assembly (clang, -O0):
<num_procs_of_exe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <pids_of_exe@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <countlist@plt>
mov    %eax,-0x14(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1169 <num_procs_of_exe+0x39>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<num_procs_of_exe>:
push   %rbp
push   %rbx
push   %rax
call   1050 <pids_of_exe@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <countlist@plt>
mov    %eax,%ebp
test   %rbx,%rbx
je     1152 <num_procs_of_exe+0x22>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @num_procs_of_exe(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32* @pids_of_exe(i8* %5)
store i32* %6, i32** %3
%7 = load i32*, i32** %3
%8 = bitcast i32* %7 to i8**
%9 = call i32 @countlist(i8** %8)
store i32 %9, i32* %4
%10 = load i32*, i32** %3
%11 = icmp ne i32* %10, null
br i1 %11, label %12, label %15
12: ; preds = %1
%13 = load i32*, i32** %3
%14 = call i32 @free(i32* %13)
br label %15
15: ; preds = %12, %1
%16 = load i32, i32* %4
ret i32 %16
}

LLVM IR (-O2):
define i32 @num_procs_of_exe(i8* %0) {
%2 = tail call i32* @pids_of_exe(i8* %0)
%3 = bitcast i32* %2 to i8**
%4 = tail call i32 @countlist(i8** %3)
%5 = icmp eq i32* %2, null
br i1 %5, label %8, label %6
6: ; preds = %1
%7 = tail call i32 @free(i32* %2)
br label %8
8: ; preds = %6, %1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void basehelp(void) {
  printf("Functions:\n    SIN   COS   ATAN   LOG    LOG10   EXP   SQRT   INT   "
         "ABS\n    F2C   C2F   IN2MM  MM2IN  PO2KG   KG2PO\n\nOperators:\n    "
         "'=' '+' '-' '*' '/' '%%' '^'\n    '~' or and xor '<<' "
         "'>>'\n\nConstants: (case sensitive)\n    PI      E       GAMMA   DEG "
         "    PHI   \n\nValues:\n    0x...   0y...   0c...   0o...\n\n");
}


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

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

LLVM IR (-O0):
@.str = [307 x i8] c"Functions:\0A SIN COS ATAN LOG LOG10 EXP SQRT INT ABS\0A F2C C2F IN2MM MM2IN PO2KG KG2PO\0A\0AOperators:\0A '=' '+' '-' '*' '/' '%%' '^'\0A '~' or and xor '<<' '>>'\0A\0AConstants: (case sensitive)\0A PI E GAMMA DEG PHI \0A\0AValues:\0A 0x... 0y... 0c... 0o...\0A\0A\00"
define void @basehelp() {
%1 = call i32 @printf(i8* getelementptr inbounds ([307 x i8], [307 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [307 x i8] c"Functions:\0A SIN COS ATAN LOG LOG10 EXP SQRT INT ABS\0A F2C C2F IN2MM MM2IN PO2KG KG2PO\0A\0AOperators:\0A '=' '+' '-' '*' '/' '%%' '^'\0A '~' or and xor '<<' '>>'\0A\0AConstants: (case sensitive)\0A PI E GAMMA DEG PHI \0A\0AValues:\0A 0x... 0y... 0c... 0o...\0A\0A\00"
define void @basehelp() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([307 x i8], [307 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ kprintf(char *, int);
void isrHandle29() { kprintf("ISR %d.\n", 29); }


x86 assembly (clang, -O0):
<isrHandle29>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x1d,%esi
call   1030 <kprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<isrHandle29>:
lea    0xee9(%rip),%rdi
mov    $0x1d,%esi
jmp    1030 <kprintf@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"ISR %d.\0A\00"
define void @isrHandle29() {
%1 = call i32 @kprintf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 29)
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"ISR %d.\0A\00"
define void @isrHandle29() {
%1 = tail call i32 @kprintf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 29)
ret void
}
void EnableRTC1HZ(void) {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @tr_error_dummy_func() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void colorYel() { printf("%s", "\x1B[33m"); }


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

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

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [6 x i8] c"\1B[33m\00"
define void @colorYel() {
%1 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [6 x i8] c"\1B[33m\00"
define void @colorYel() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strlen(char const *);
scalar_t__ strncmp(char const *, char const *, int /*<<< orphan*/);
int has_prefix(const char *name, const char *prefix) {
  return strncmp(name, prefix, strlen(prefix)) == 0;
}


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

x86 assembly (clang, -O2):
<has_prefix>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1040 <strlen@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <strncmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @has_prefix(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i64 @strncmp(i8* %0, i8* %1, i32 %3)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void print_imm_22(void) {
  static int val = 0;
  val = (val + 4) & 0x3fffff;
  printf("0x%x", val);
}


x86 assembly (clang, -O0):
<print_imm_22>:
push   %rbp
mov    %rsp,%rbp
mov    0x2f12(%rip),%eax
add    $0x4,%eax
and    $0x3fffff,%eax
mov    %eax,0x2f04(%rip)
mov    0x2efe(%rip),%esi
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_imm_22>:
mov    0x2f16(%rip),%esi
add    $0x4,%esi
and    $0x3fffff,%esi
mov    %esi,0x2f07(%rip)
lea    0xed4(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@print_imm_22.val = internal global i32 0
@.str = [5 x i8] c"0x%x\00"
define void @print_imm_22() {
%1 = load i32, i32* @print_imm_22.val
%2 = add nsw i32 %1, 4
%3 = and i32 %2, 4194303
store i32 %3, i32* @print_imm_22.val
%4 = load i32, i32* @print_imm_22.val
%5 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %4)
ret void
}

LLVM IR (-O2):
@print_imm_22.val = internal unnamed_addr global i32 0
@.str = [5 x i8] c"0x%x\00"
define void @print_imm_22() {
%1 = load i32, i32* @print_imm_22.val
%2 = add nsw i32 %1, 4
%3 = and i32 %2, 4194303
store i32 %3, i32* @print_imm_22.val
%4 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ put8(int);
void xor_reg64_reg64(unsigned int reg1, unsigned int reg2) {
  put8(0x48);
  put8(0x31);
  put8(0xC0 | (reg2 << 3) | reg1);
}


x86 assembly (clang, -O0):
<xor_reg64_reg64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x48,%edi
call   1030 <put8@plt>
mov    $0x31,%edi
call   1030 <put8@plt>
mov    -0x8(%rbp),%edi
shl    $0x3,%edi
or     $0xc0,%edi
or     -0x4(%rbp),%edi
call   1030 <put8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xor_reg64_reg64>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    $0x48,%edi
call   1030 <put8@plt>
mov    $0x31,%edi
call   1030 <put8@plt>
shl    $0x3,%ebx
or     %ebp,%ebx
or     $0xc0,%ebx
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <put8@plt>

LLVM IR (-O0):
define void @xor_reg64_reg64(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 @put8(i32 72)
%6 = call i32 @put8(i32 49)
%7 = load i32, i32* %4
%8 = shl i32 %7, 3
%9 = or i32 192, %8
%10 = load i32, i32* %3
%11 = or i32 %9, %10
%12 = call i32 @put8(i32 %11)
ret void
}

LLVM IR (-O2):
define void @xor_reg64_reg64(i32 %0, i32 %1) {
%3 = tail call i32 @put8(i32 72)
%4 = tail call i32 @put8(i32 49)
%5 = shl i32 %1, 3
%6 = or i32 %5, %0
%7 = or i32 %6, 192
%8 = tail call i32 @put8(i32 %7)
ret void
}
/* Variables and functions */
double cpu2slot(int);
double cpu2y(int cpu) { return cpu2slot(cpu) * 30.0; }


x86 assembly (clang, -O0):
<cpu2y>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <cpu2slot@plt>
movsd  0xed5(%rip),%xmm1
mulsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpu2y>:
push   %rax
call   1030 <cpu2slot@plt>
mulsd  0xee2(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @cpu2y(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call double @cpu2slot(i32 %3)
%5 = fmul double %4, 3.000000e+01
ret double %5
}

LLVM IR (-O2):
define double @cpu2y(i32 %0) {
%2 = tail call double @cpu2slot(i32 %0)
%3 = fmul double %2, 3.000000e+01
ret double %3
}
/* Type definitions */
struct timeval {
  int tv_sec;
  int tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int timeval_to_milliseconds(const struct timeval *time) {
  int milliseconds;
  assert(time != NULL);
  milliseconds = time->tv_sec * 1000;
  milliseconds += time->tv_usec / 1000;
  return milliseconds;
}


x86 assembly (clang, -O0):
<timeval_to_milliseconds>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%rax
imul   $0x3e8,(%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<timeval_to_milliseconds>:
push   %rbx
mov    %rdi,%rbx
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
call   1030 <assert@plt>
imul   $0x3e8,(%rbx),%ecx
movslq 0x4(%rbx),%rax
imul   $0x10624dd3,%rax,%rax
mov    %rax,%rdx
shr    $0x3f,%rdx
sar    $0x26,%rax
add    %edx,%eax
add    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i32 }
define i32 @timeval_to_milliseconds(%struct.timeval* %0) {
%2 = alloca %struct.timeval*
%3 = alloca i32
store %struct.timeval* %0, %struct.timeval** %2
%4 = load %struct.timeval*, %struct.timeval** %2
%5 = icmp ne %struct.timeval* %4, null
%6 = zext i1 %5 to i32
%7 = call i32 @assert(i32 %6)
%8 = load %struct.timeval*, %struct.timeval** %2
%9 = getelementptr inbounds %struct.timeval, %struct.timeval* %8, i32 0, i32 0
%10 = load i32, i32* %9
%11 = mul nsw i32 %10, 1000
store i32 %11, i32* %3
%12 = load %struct.timeval*, %struct.timeval** %2
%13 = getelementptr inbounds %struct.timeval, %struct.timeval* %12, i32 0, i32 1
%14 = load i32, i32* %13
%15 = sdiv i32 %14, 1000
%16 = load i32, i32* %3
%17 = add nsw i32 %16, %15
store i32 %17, i32* %3
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
%struct.timeval = type { i32, i32 }
define i32 @timeval_to_milliseconds(%struct.timeval* %0) {
%2 = icmp ne %struct.timeval* %0, null
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %0, i64 0, i32 0
%6 = load i32, i32* %5
%7 = mul nsw i32 %6, 1000
%8 = getelementptr inbounds %struct.timeval, %struct.timeval* %0, i64 0, i32 1
%9 = load i32, i32* %8
%10 = sdiv i32 %9, 1000
%11 = add nsw i32 %10, %7
ret i32 %11
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
void ip_set_proto(uint8_t *p_ip, uint8_t proto) { p_ip[9] = proto; }


x86 assembly (clang, -O0):
<ip_set_proto>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x24(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ip_set_proto>:
mov    %esi,0x24(%rdi)
ret

LLVM IR (-O0):
define void @ip_set_proto(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 = getelementptr inbounds i32, i32* %6, i64 9
store i32 %5, i32* %7
ret void
}

LLVM IR (-O2):
define void @ip_set_proto(i32* nocapture writeonly %0, i32 %1) {
%3 = getelementptr inbounds i32, i32* %0, i64 9
store i32 %1, i32* %3
ret void
}
void __attribute__((hot))
stress_set_sockaddr_port(const int domain, const int port,
                         struct sockaddr *sockaddr) {
  switch (domain) {
  default:
    break;
  }
}


x86 assembly (clang, -O0):
<stress_set_sockaddr_port>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
jmp    1113 <stress_set_sockaddr_port+0x13>
pop    %rbp
ret

x86 assembly (clang, -O2):
<stress_set_sockaddr_port>:
ret
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)

LLVM IR (-O0):
%struct.sockaddr = type opaque
define void @stress_set_sockaddr_port(i32 %0, i32 %1, %struct.sockaddr* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca %struct.sockaddr*
store i32 %0, i32* %4
store i32 %1, i32* %5
store %struct.sockaddr* %2, %struct.sockaddr** %6
%7 = load i32, i32* %4
switch i32 %7, label %8 [
]
8: ; preds = %3
br label %9
9: ; preds = %8
ret void
}

LLVM IR (-O2):
%struct.sockaddr = type opaque
define void @stress_set_sockaddr_port(i32 %0, i32 %1, %struct.sockaddr* nocapture %2) {
ret void
}
/* Type definitions */
struct cyclist {
  int dummy;
};

/* Variables and functions */
scalar_t__ cyclist_add_tail(struct cyclist *, struct cyclist **);
struct cyclist *cyclist_add(struct cyclist *newe, struct cyclist **head) {
  return cyclist_add_tail(newe, head) ? *head = newe : 0;
}


x86 assembly (clang, -O0):
<cyclist_add>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <cyclist_add_tail@plt>
cmp    $0x0,%rax
je     114b <cyclist_add+0x3b>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    %rax,(%rcx)
mov    %rax,-0x18(%rbp)
jmp    1156 <cyclist_add+0x46>
xor    %eax,%eax
mov    %rax,-0x18(%rbp)
jmp    1156 <cyclist_add+0x46>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cyclist_add>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <cyclist_add_tail@plt>
test   %rax,%rax
je     1129 <cyclist_add+0x19>
mov    %rbx,(%r14)
jmp    112b <cyclist_add+0x1b>
xor    %ebx,%ebx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.cyclist = type { i32 }
define %struct.cyclist* @cyclist_add(%struct.cyclist* %0, %struct.cyclist** %1) {
%3 = alloca %struct.cyclist*
%4 = alloca %struct.cyclist**
store %struct.cyclist* %0, %struct.cyclist** %3
store %struct.cyclist** %1, %struct.cyclist*** %4
%5 = load %struct.cyclist*, %struct.cyclist** %3
%6 = load %struct.cyclist**, %struct.cyclist*** %4
%7 = call i64 @cyclist_add_tail(%struct.cyclist* %5, %struct.cyclist** %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %2
%10 = load %struct.cyclist*, %struct.cyclist** %3
%11 = load %struct.cyclist**, %struct.cyclist*** %4
store %struct.cyclist* %10, %struct.cyclist** %11
br label %13
12: ; preds = %2
br label %13
13: ; preds = %12, %9
%14 = phi %struct.cyclist* [ %10, %9 ], [ null, %12 ]
ret %struct.cyclist* %14
}

LLVM IR (-O2):
%struct.cyclist = type { i32 }
define %struct.cyclist* @cyclist_add(%struct.cyclist* %0, %struct.cyclist** %1) {
%3 = tail call i64 @cyclist_add_tail(%struct.cyclist* %0, %struct.cyclist** %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %6, label %5
5: ; preds = %2
store %struct.cyclist* %0, %struct.cyclist** %1
br label %6
6: ; preds = %2, %5
%7 = phi %struct.cyclist* [ %0, %5 ], [ null, %2 ]
ret %struct.cyclist* %7
}
/* Variables and functions */
int arith_div(int, int);
int arith_floor(int x, int y) { return arith_div(x, y) + (x % y != 0); }


x86 assembly (clang, -O0):
<arith_floor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <arith_div@plt>
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    -0xc(%rbp),%eax
cmp    $0x0,%edx
setne  %cl
and    $0x1,%cl
movzbl %cl,%ecx
add    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<arith_floor>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
call   1030 <arith_div@plt>
mov    %eax,%ecx
mov    %ebp,%eax
cltd
idiv   %ebx
cmp    $0x1,%edx
sbb    $0xffffffff,%ecx
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @arith_floor(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 @arith_div(i32 %5, i32 %6)
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = srem i32 %8, %9
%11 = icmp ne i32 %10, 0
%12 = zext i1 %11 to i32
%13 = add nsw i32 %7, %12
ret i32 %13
}

LLVM IR (-O2):
define i32 @arith_floor(i32 %0, i32 %1) {
%3 = tail call i32 @arith_div(i32 %0, i32 %1)
%4 = srem i32 %0, %1
%5 = icmp ne i32 %4, 0
%6 = zext i1 %5 to i32
%7 = add nsw i32 %3, %6
ret i32 %7
}
void __attribute__((section(".after_vectors"))) SVC_Handler(void) {
  while (1) {
  }
}


x86 assembly (clang, -O0):
<SVC_Handler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <SVC_Handler+0x9>
jmp    1109 <SVC_Handler+0x9>

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

LLVM IR (-O0):
define void @SVC_Handler() section ".after_vectors" {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @SVC_Handler() section ".after_vectors" {
br label %1
1: ; preds = %0, %1
br label %1
}
void function_empty_priority() {}


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

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

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

LLVM IR (-O2):
define void @function_empty_priority() {
ret void
}
/* Type definitions */
typedef int uint64_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ mintaka_record3_at(int, int /*<<< orphan*/,
                                      int /*<<< orphan*/, int);
void mintaka_record2_at(int event, uint64_t value, uint64_t ts) {
  uint32_t low = (uint32_t)value;
  uint32_t high = (uint32_t)(value >> 32);
  mintaka_record3_at(event, low, high, ts);
}


x86 assembly (clang, -O0):
<mintaka_record2_at>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x20,%ecx
sar    %cl,%eax
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0xc(%rbp),%ecx
call   1030 <mintaka_record3_at@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mintaka_record2_at>:
mov    %edx,%ecx
jmp    1030 <mintaka_record3_at@plt>

LLVM IR (-O0):
define void @mintaka_record2_at(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%9 = load i32, i32* %5
store i32 %9, i32* %7
%10 = load i32, i32* %5
%11 = ashr i32 %10, 32
store i32 %11, i32* %8
%12 = load i32, i32* %4
%13 = load i32, i32* %7
%14 = load i32, i32* %8
%15 = load i32, i32* %6
%16 = call i32 @mintaka_record3_at(i32 %12, i32 %13, i32 %14, i32 %15)
ret void
}

LLVM IR (-O2):
define void @mintaka_record2_at(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @mintaka_record3_at(i32 %0, i32 %1, i32 poison, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void freematrix(double **matrix) { free((void *)matrix[0]); }


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

x86 assembly (clang, -O2):
<freematrix>:
mov    (%rdi),%rdi
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @freematrix(double** %0) {
%2 = alloca double**
store double** %0, double*** %2
%3 = load double**, double*** %2
%4 = getelementptr inbounds double*, double** %3, i64 0
%5 = load double*, double** %4
%6 = bitcast double* %5 to i8*
%7 = call i32 @free(i8* %6)
ret void
}

LLVM IR (-O2):
define void @freematrix(double** nocapture %0) {
%2 = bitcast double** %0 to i8**
%3 = load i8*, i8** %2
%4 = tail call i32 @free(i8* %3)
ret void
}
int dd_eq_d_dd(double a, const double *b) {
  return ((a == b[0]) && (b[1] == 0.0)) ? 1 : 0;
}


x86 assembly (clang, -O0):
<dd_eq_d_dd>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rcx
xor    %eax,%eax
ucomisd (%rcx),%xmm0
mov    %al,-0x11(%rbp)
jne    1146 <dd_eq_d_dd+0x46>
jp     1146 <dd_eq_d_dd+0x46>
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
sete   %al
setnp  %cl
and    %cl,%al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%dl
xor    %eax,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dd_eq_d_dd>:
movsd  (%rdi),%xmm1
ucomisd %xmm0,%xmm1
jne    111f <dd_eq_d_dd+0x1f>
jp     111f <dd_eq_d_dd+0x1f>
xorpd  %xmm0,%xmm0
cmpeqsd 0x8(%rdi),%xmm0
movq   %xmm0,%rax
and    $0x1,%eax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @dd_eq_d_dd(double %0, double* %1) {
%3 = alloca double
%4 = alloca double*
store double %0, double* %3
store double* %1, double** %4
%5 = load double, double* %3
%6 = load double*, double** %4
%7 = getelementptr inbounds double, double* %6, i64 0
%8 = load double, double* %7
%9 = fcmp oeq double %5, %8
br i1 %9, label %10, label %15
10: ; preds = %2
%11 = load double*, double** %4
%12 = getelementptr inbounds double, double* %11, i64 1
%13 = load double, double* %12
%14 = fcmp oeq double %13, 0.000000e+00
br label %15
15: ; preds = %10, %2
%16 = phi i1 [ false, %2 ], [ %14, %10 ]
%17 = zext i1 %16 to i64
%18 = select i1 %16, i32 1, i32 0
ret i32 %18
}

LLVM IR (-O2):
define i32 @dd_eq_d_dd(double %0, double* nocapture %1) {
%3 = load double, double* %1
%4 = fcmp oeq double %3, %0
br i1 %4, label %5, label %10
5: ; preds = %2
%6 = getelementptr inbounds double, double* %1, i64 1
%7 = load double, double* %6
%8 = fcmp oeq double %7, 0.000000e+00
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %5, %2
%11 = phi i32 [ 0, %2 ], [ %9, %5 ]
ret i32 %11
}
void init_add_pixel_span_funcs_c(void) {}


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

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

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

LLVM IR (-O2):
define void @init_add_pixel_span_funcs_c() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ doStuff_pointerToConstInt(int *);
void f_6(void) {
  int ta[5] = {1, 2, 3, 4, 5};
  int *tp = ta;
  doStuff_pointerToConstInt(tp);
}


x86 assembly (clang, -O0):
<f_6>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xede(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xedc(%rip),%eax
mov    %eax,-0x10(%rbp)
lea    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
call   1030 <doStuff_pointerToConstInt@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_6>:
sub    $0x18,%rsp
mov    0xef6(%rip),%eax
mov    %eax,0x10(%rsp)
movaps 0xedb(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
call   1030 <doStuff_pointerToConstInt@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.f_6.ta = [5 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5]
define void @f_6() {
%1 = alloca [5 x i32]
%2 = alloca i32*
%3 = bitcast [5 x i32]* %1 to i8*
%4 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
store i32* %4, i32** %2
%5 = load i32*, i32** %2
%6 = call i32 @doStuff_pointerToConstInt(i32* %5)
ret void
}

LLVM IR (-O2):
@__const.f_6.ta = [5 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5]
define void @f_6() {
%1 = alloca [5 x i32]
%2 = bitcast [5 x i32]* %1 to i8*
%3 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%4 = call i32 @doStuff_pointerToConstInt(i32* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalpha(int);
void t_isalpha_0xbe() {
  Assert_real((isalpha(190) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isalpha.c",
              955, ("isalpha should be 0 for 0xbe"));
}


x86 assembly (clang, -O0):
<t_isalpha_0xbe>:
push   %rbp
mov    %rsp,%rbp
mov    $0xbe,%edi
call   1030 <isalpha@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x3bb,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isalpha_0xbe>:
push   %rax
mov    $0xbe,%edi
call   1030 <isalpha@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x3bb,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalpha.c\00"
@.str.1 = [29 x i8] c"isalpha should be 0 for 0xbe\00"
define void @t_isalpha_0xbe() {
%1 = call i64 @isalpha(i32 190)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 955, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalpha.c\00"
@.str.1 = [29 x i8] c"isalpha should be 0 for 0xbe\00"
define void @t_isalpha_0xbe() {
%1 = tail call i64 @isalpha(i32 190)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 955, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}