xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ printf(char *, char const *);
void show_literal(const char *var, uint32_t sign) {
  assert(sign == 0 || sign == 1);
  if (sign == 1) {
    printf(" ~%s", var);
  } else {
    printf("  %s", var);
  }
}


x86 assembly (clang, -O0):
<show_literal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x1,%al
cmpl   $0x0,-0xc(%rbp)
mov    %al,-0xd(%rbp)
je     1148 <show_literal+0x28>
cmpl   $0x1,-0xc(%rbp)
sete   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
cmpl   $0x1,-0xc(%rbp)
jne    1174 <show_literal+0x54>
mov    -0x8(%rbp),%rsi
lea    0xe96(%rip),%rdi
call   1030 <printf@plt>
jmp    1184 <show_literal+0x64>
mov    -0x8(%rbp),%rsi
lea    0xe86(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_literal>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
xor    %edi,%edi
cmp    $0x2,%esi
setb   %dil
call   1040 <assert@plt>
cmp    $0x1,%ebx
lea    0xebf(%rip),%rax
lea    0xebd(%rip),%rdi
cmove  %rax,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [5 x i8] c" ~%s\00"
@.str.1 = [5 x i8] c" %s\00"
define void @show_literal(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp eq i32 %5, 0
br i1 %6, label %10, label %7
7: ; preds = %2
%8 = load i32, i32* %4
%9 = icmp eq i32 %8, 1
br label %10
10: ; preds = %7, %2
%11 = phi i1 [ true, %2 ], [ %9, %7 ]
%12 = zext i1 %11 to i32
%13 = call i32 @assert(i32 %12)
%14 = load i32, i32* %4
%15 = icmp eq i32 %14, 1
br i1 %15, label %16, label %19
16: ; preds = %10
%17 = load i8*, i8** %3
%18 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %17)
br label %22
19: ; preds = %10
%20 = load i8*, i8** %3
%21 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %20)
br label %22
22: ; preds = %19, %16
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c" ~%s\00"
@.str.1 = [5 x i8] c" %s\00"
define void @show_literal(i8* %0, i32 %1) {
%3 = icmp eq i32 %1, 1
%4 = icmp ult i32 %1, 2
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
%7 = select i1 %3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0)
%8 = tail call i32 @printf(i8* %7, i8* %0)
ret void
}
/* Type definitions */
struct __sk_buff {
  int dummy;
};
typedef int /*<<< orphan*/ fmt;

/* Variables and functions */
int TC_H_MAKE(int, int);
int /*<<< orphan*/ trace_printk(char *, int);
__attribute__((section("bbb"), used)) int cls_bbb(struct __sk_buff *skb) {
  char fmt[] = "bbb\n";
  trace_printk(fmt, sizeof(fmt));
  return TC_H_MAKE(1, 43);
}


x86 assembly (clang, -O0):
<cls_bbb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0xece(%rip),%eax
mov    %eax,-0xd(%rbp)
mov    0xec9(%rip),%al
mov    %al,-0x9(%rbp)
lea    -0xd(%rbp),%rdi
mov    $0x5,%esi
call   1030 <trace_printk@plt>
mov    $0x1,%edi
mov    $0x2b,%esi
call   1040 <TC_H_MAKE@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cls_bbb>:
push   %rax
movb   $0x0,0x4(%rsp)
movl   $0xa626262,(%rsp)
mov    %rsp,%rdi
mov    $0x5,%esi
call   1030 <trace_printk@plt>
mov    $0x1,%edi
mov    $0x2b,%esi
call   1040 <TC_H_MAKE@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.__sk_buff = type { i32 }
@__const.cls_bbb.fmt = [5 x i8] c"bbb\0A\00"
@llvm.compiler.used = appending global [1 x i8*] [i8* bitcast (i32 (%struct.__sk_buff*)* @cls_bbb to i8*)], section "llvm.metadata"
define i32 @cls_bbb(%struct.__sk_buff* %0) section "bbb" {
%2 = alloca %struct.__sk_buff*
%3 = alloca [5 x i8]
store %struct.__sk_buff* %0, %struct.__sk_buff** %2
%4 = bitcast [5 x i8]* %3 to i8*
%5 = getelementptr inbounds [5 x i8], [5 x i8]* %3, i64 0, i64 0
%6 = call i32 @trace_printk(i8* %5, i32 5)
%7 = call i32 @TC_H_MAKE(i32 1, i32 43)
ret i32 %7
}

LLVM IR (-O2):
%struct.__sk_buff = type { i32 }
@__const.cls_bbb.fmt = [5 x i8] c"bbb\0A\00"
@llvm.compiler.used = appending global [1 x i8*] [i8* bitcast (i32 (%struct.__sk_buff*)* @cls_bbb to i8*)], section "llvm.metadata"
define i32 @cls_bbb(%struct.__sk_buff* nocapture readnone %0) section "bbb" {
%2 = alloca [5 x i8]
%3 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
%4 = call i32 @trace_printk(i8* %3, i32 5)
%5 = call i32 @TC_H_MAKE(i32 1, i32 43)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ puts2(char *);
void GenNop(void) { puts2("\tnop"); }


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

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

LLVM IR (-O0):
@.str = [5 x i8] c"\09nop\00"
define void @GenNop() {
%1 = call i32 @puts2(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"\09nop\00"
define void @GenNop() {
%1 = tail call i32 @puts2(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ eliminate();
int *f(int);
void h() {
  int *p = f(2);
  if (p == 0)
    eliminate();
}


x86 assembly (clang, -O0):
<h>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x2,%edi
call   1040 <f@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1148 <h+0x28>
mov    $0x0,%al
call   1030 <eliminate@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<h>:
push   %rax
mov    $0x2,%edi
call   1040 <f@plt>
test   %rax,%rax
je     1132 <h+0x12>
pop    %rax
ret
xor    %eax,%eax
pop    %rcx
jmp    1030 <eliminate@plt>

LLVM IR (-O0):
define void @h() {
%1 = alloca i32*
%2 = call i32* @f(i32 2)
store i32* %2, i32** %1
%3 = load i32*, i32** %1
%4 = icmp eq i32* %3, null
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 (...) @eliminate()
br label %7
7: ; preds = %5, %0
ret void
}

LLVM IR (-O2):
define void @h() {
%1 = tail call i32* @f(i32 2)
%2 = icmp eq i32* %1, null
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (...) @eliminate()
br label %5
5: ; preds = %3, %0
ret void
}
char JsonParser_next_char(const char *p, int pos) {
  char ch;
  while ((ch = *(p + ++pos)) != '\0') {
    if (ch != ' ' && ch != '\r' && ch != '\n' && ch != '\t')
      break;
  }
  return ch;
}


x86 assembly (clang, -O0):
<JsonParser_next_char>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
add    $0x1,%ecx
mov    %ecx,-0xc(%rbp)
movslq %ecx,%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0xd(%rbp)
movsbl %al,%eax
cmp    $0x0,%eax
je     116b <JsonParser_next_char+0x6b>
movsbl -0xd(%rbp),%eax
cmp    $0x20,%eax
je     1166 <JsonParser_next_char+0x66>
movsbl -0xd(%rbp),%eax
cmp    $0xd,%eax
je     1166 <JsonParser_next_char+0x66>
movsbl -0xd(%rbp),%eax
cmp    $0xa,%eax
je     1166 <JsonParser_next_char+0x66>
movsbl -0xd(%rbp),%eax
cmp    $0x9,%eax
je     1166 <JsonParser_next_char+0x66>
jmp    116b <JsonParser_next_char+0x6b>
jmp    110b <JsonParser_next_char+0xb>
movsbl -0xd(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<JsonParser_next_char>:
movslq %esi,%rax
lea    (%rax,%rdi,1),%rcx
add    $0x1,%rcx
movabs $0x100002600,%rdx
cs nopw 0x0(%rax,%rax,1)
nop
movzbl (%rcx),%eax
cmp    $0x20,%rax
ja     1135 <JsonParser_next_char+0x35>
bt     %rax,%rdx
jae    1135 <JsonParser_next_char+0x35>
add    $0x1,%rcx
jmp    1120 <JsonParser_next_char+0x20>
ret

LLVM IR (-O0):
define signext i8 @JsonParser_next_char(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8
store i8* %0, i8** %3
store i32 %1, i32* %4
br label %6
6: ; preds = %32, %2
%7 = load i8*, i8** %3
%8 = load i32, i32* %4
%9 = add nsw i32 %8, 1
store i32 %9, i32* %4
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i8, i8* %7, i64 %10
%12 = load i8, i8* %11
store i8 %12, i8* %5
%13 = sext i8 %12 to i32
%14 = icmp ne i32 %13, 0
br i1 %14, label %15, label %33
15: ; preds = %6
%16 = load i8, i8* %5
%17 = sext i8 %16 to i32
%18 = icmp ne i32 %17, 32
br i1 %18, label %19, label %32
19: ; preds = %15
%20 = load i8, i8* %5
%21 = sext i8 %20 to i32
%22 = icmp ne i32 %21, 13
br i1 %22, label %23, label %32
23: ; preds = %19
%24 = load i8, i8* %5
%25 = sext i8 %24 to i32
%26 = icmp ne i32 %25, 10
br i1 %26, label %27, label %32
27: ; preds = %23
%28 = load i8, i8* %5
%29 = sext i8 %28 to i32
%30 = icmp ne i32 %29, 9
br i1 %30, label %31, label %32
31: ; preds = %27
br label %33
32: ; preds = %27, %23, %19, %15
br label %6
33: ; preds = %31, %6
%34 = load i8, i8* %5
ret i8 %34
}

LLVM IR (-O2):
define signext i8 @JsonParser_next_char(i8* nocapture %0, i32 %1) {
%3 = sext i32 %1 to i64
br label %4
4: ; preds = %9, %2
%5 = phi i64 [ %3, %2 ], [ %6, %9 ]
%6 = add nsw i64 %5, 1
%7 = getelementptr inbounds i8, i8* %0, i64 %6
%8 = load i8, i8* %7
switch i8 %8, label %10 [
i8 9, label %9
i8 32, label %9
i8 13, label %9
i8 10, label %9
]
9: ; preds = %4, %4, %4, %4
br label %4
10: ; preds = %4
ret i8 %8
}
/* Variables and functions */
int /*<<< orphan*/ StartJizdaRovne(int);
int /*<<< orphan*/ StopJizdaRovne();
int /*<<< orphan*/ wait1Msec(int);
void SrovnaSe() {
  StartJizdaRovne(-100);
  wait1Msec(420);
  StopJizdaRovne();
}


x86 assembly (clang, -O0):
<SrovnaSe>:
push   %rbp
mov    %rsp,%rbp
mov    $0xffffff9c,%edi
call   1050 <StartJizdaRovne@plt>
mov    $0x1a4,%edi
call   1040 <wait1Msec@plt>
mov    $0x0,%al
call   1030 <StopJizdaRovne@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<SrovnaSe>:
push   %rax
mov    $0xffffff9c,%edi
call   1050 <StartJizdaRovne@plt>
mov    $0x1a4,%edi
call   1040 <wait1Msec@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <StopJizdaRovne@plt>

LLVM IR (-O0):
define void @SrovnaSe() {
%1 = call i32 @StartJizdaRovne(i32 -100)
%2 = call i32 @wait1Msec(i32 420)
%3 = call i32 (...) @StopJizdaRovne()
ret void
}

LLVM IR (-O2):
define void @SrovnaSe() {
%1 = tail call i32 @StartJizdaRovne(i32 -100)
%2 = tail call i32 @wait1Msec(i32 420)
%3 = tail call i32 (...) @StopJizdaRovne()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int uint16_t;

/* Variables and functions */
int /*<<< orphan*/ put8(int /*<<< orphan*/ **, int);
void put16(uint8_t **ppv, uint16_t w) {
  put8(ppv, (w >> 8) & 0xFF);
  put8(ppv, (w >> 0) & 0xFF);
}


x86 assembly (clang, -O0):
<put16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
sar    $0x8,%esi
and    $0xff,%esi
call   1030 <put8@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
sar    $0x0,%esi
and    $0xff,%esi
call   1030 <put8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<put16>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%eax
mov    %rdi,%rbx
movzbl %ah,%esi
mov    %eax,%ebp
call   1030 <put8@plt>
movzbl %bpl,%esi
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <put8@plt>

LLVM IR (-O0):
define void @put16(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 = ashr i32 %6, 8
%8 = and i32 %7, 255
%9 = call i32 @put8(i32** %5, i32 %8)
%10 = load i32**, i32*** %3
%11 = load i32, i32* %4
%12 = ashr i32 %11, 0
%13 = and i32 %12, 255
%14 = call i32 @put8(i32** %10, i32 %13)
ret void
}

LLVM IR (-O2):
define void @put16(i32** %0, i32 %1) {
%3 = lshr i32 %1, 8
%4 = and i32 %3, 255
%5 = tail call i32 @put8(i32** %0, i32 %4)
%6 = and i32 %1, 255
%7 = tail call i32 @put8(i32** %0, i32 %6)
ret void
}
/* Type definitions */
struct hidp_pkt {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct hidp_pkt *);
void hidp_free_pkt(struct hidp_pkt *pkt) { free(pkt); }


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

x86 assembly (clang, -O2):
<hidp_free_pkt>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct.hidp_pkt = type { i32 }
define void @hidp_free_pkt(%struct.hidp_pkt* nocapture %0) {
%2 = tail call i32 @free(%struct.hidp_pkt* %0)
ret void
}
void dump_fret(fretnum) int fretnum;
{
  if (fretnum == -1)
    printf("  %2s", "X");
  else
    printf("  %2d", fretnum);
}


x86 assembly (clang, -O0):
<dump_fret>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0xffffffff,-0x4(%rbp)
jne    113f <dump_fret+0x2f>
lea    0xed4(%rip),%rdi
lea    0xed3(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1150 <dump_fret+0x40>
mov    -0x4(%rbp),%esi
lea    0xebf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dump_fret>:
cmp    $0xffffffff,%edi
je     1125 <dump_fret+0x15>
mov    %edi,%esi
lea    0xeea(%rip),%rdi
xor    %eax,%eax
jmp    1030 <printf@plt>
lea    0xed4(%rip),%rdi
lea    0xed3(%rip),%rsi
xor    %eax,%eax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [6 x i8] c" %2s\00"
@.str.1 = [2 x i8] c"X\00"
@.str.2 = [6 x i8] c" %2d\00"
define void @dump_fret(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, -1
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %10
7: ; preds = %1
%8 = load i32, i32* %2
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 %8)
br label %10
10: ; preds = %7, %5
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c" %2s\00"
@.str.1 = [2 x i8] c"X\00"
@.str.2 = [6 x i8] c" %2d\00"
define void @dump_fret(i32 %0) {
%2 = icmp eq i32 %0, -1
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %7
5: ; preds = %1
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 %0)
br label %7
7: ; preds = %5, %3
ret void
}
/* Type definitions */
struct tms {
  scalar_t__ tms_utime;
};

/* Variables and functions */
int /*<<< orphan*/ times(struct tms *);
double basic_utime() {
  struct tms buffer;
  (void)times(&buffer);
  return (((double)buffer.tms_utime) / ((double)60));
}


x86 assembly (clang, -O0):
<basic_utime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rdi
call   1030 <times@plt>
cvtsi2sdq -0x8(%rbp),%xmm0
movsd  0xed1(%rip),%xmm1
divsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<basic_utime>:
push   %rax
mov    %rsp,%rdi
call   1030 <times@plt>
cvtsi2sdq (%rsp),%xmm0
divsd  0xed9(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
%struct.tms = type { i64 }
define double @basic_utime() {
%1 = alloca %struct.tms
%2 = call i32 @times(%struct.tms* %1)
%3 = getelementptr inbounds %struct.tms, %struct.tms* %1, i32 0, i32 0
%4 = load i64, i64* %3
%5 = sitofp i64 %4 to double
%6 = fdiv double %5, 6.000000e+01
ret double %6
}

LLVM IR (-O2):
%struct.tms = type { i64 }
define double @basic_utime() {
%1 = alloca %struct.tms
%2 = bitcast %struct.tms* %1 to i8*
%3 = call i32 @times(%struct.tms* %1)
%4 = getelementptr inbounds %struct.tms, %struct.tms* %1, i64 0, i32 0
%5 = load i64, i64* %4
%6 = sitofp i64 %5 to double
%7 = fdiv double %6, 6.000000e+01
ret double %7
}
/* Variables and functions */
int /*<<< orphan*/ gpio_set(int, int);
void go_left() {
  gpio_set((45), 1);
  gpio_set((23), 0);
}


x86 assembly (clang, -O0):
<go_left>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2d,%edi
mov    $0x1,%esi
call   1030 <gpio_set@plt>
mov    $0x17,%edi
xor    %esi,%esi
call   1030 <gpio_set@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<go_left>:
push   %rax
mov    $0x2d,%edi
mov    $0x1,%esi
call   1030 <gpio_set@plt>
mov    $0x17,%edi
xor    %esi,%esi
pop    %rax
jmp    1030 <gpio_set@plt>

LLVM IR (-O0):
define void @go_left() {
%1 = call i32 @gpio_set(i32 45, i32 1)
%2 = call i32 @gpio_set(i32 23, i32 0)
ret void
}

LLVM IR (-O2):
define void @go_left() {
%1 = tail call i32 @gpio_set(i32 45, i32 1)
%2 = tail call i32 @gpio_set(i32 23, i32 0)
ret void
}
double __attribute__((sseregparm, no)) ssed(double d) { return d; }


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

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

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

LLVM IR (-O2):
define double @ssed(double returned %0) {
ret double %0
}
/* Variables and functions */
int /*<<< orphan*/ am2315_read_data(void *, float *, float *);
float am2315_humidity(void *_am) {
  float temperature, humidity;
  am2315_read_data(_am, &temperature, &humidity);
  return humidity;
}


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

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

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

LLVM IR (-O2):
define float @am2315_humidity(i8* %0) {
%2 = alloca float
%3 = alloca float
%4 = bitcast float* %2 to i8*
%5 = bitcast float* %3 to i8*
%6 = call i32 @am2315_read_data(i8* %0, float* %2, float* %3)
%7 = load float, float* %3
ret float %7
}
/* Variables and functions */
int strcmp(char const *, char const *);
int igcomp(const void *l, const void *r) {
  return (strcmp(*(const char **)l, *(const char **)r));
}


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

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

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

LLVM IR (-O2):
define i32 @igcomp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = load i8*, i8** %3
%5 = bitcast i8* %1 to i8**
%6 = load i8*, i8** %5
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %4, i8* dereferenceable(1) %6)
ret i32 %7
}
int test_imm_7Cint64_highword_mem(long long *val) {
  return ((*val >> 32) & (0x7C << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_7Cint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 532575944704
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void iwl3945_led_unregister(struct iwl3945_priv *priv) {}


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

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

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

LLVM IR (-O2):
%struct.iwl3945_priv = type opaque
define void @iwl3945_led_unregister(%struct.iwl3945_priv* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _MM_FLUSH_ZERO_ON;
int /*<<< orphan*/ _MM_SET_FLUSH_ZERO_MODE(int /*<<< orphan*/);
void disable_denormals() { _MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_ON); }


x86 assembly (clang, -O0):
<disable_denormals>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
call   1030 <_MM_SET_FLUSH_ZERO_MODE@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<disable_denormals>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
jmp    1030 <_MM_SET_FLUSH_ZERO_MODE@plt>

LLVM IR (-O0):
@_MM_FLUSH_ZERO_ON = global i32 0
define void @disable_denormals() {
%1 = load i32, i32* @_MM_FLUSH_ZERO_ON
%2 = call i32 @_MM_SET_FLUSH_ZERO_MODE(i32 %1)
ret void
}

LLVM IR (-O2):
@_MM_FLUSH_ZERO_ON = global i32 0
define void @disable_denormals() {
%1 = load i32, i32* @_MM_FLUSH_ZERO_ON
%2 = tail call i32 @_MM_SET_FLUSH_ZERO_MODE(i32 %1)
ret void
}
void data_bss_init(void) {}


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

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

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

LLVM IR (-O2):
define void @data_bss_init() {
ret void
}
int div_int(void) {
  int a = 4, b = 2;
  (void)_Generic((a / b), int : 0);
}


x86 assembly (clang, -O0):
<div_int>:
push   %rbp
mov    %rsp,%rbp
movl   $0x4,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @div_int() {
ret i32 undef
}
void genabs_d() {}


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

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

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

LLVM IR (-O2):
define void @genabs_d() {
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int bell_percent;
};
typedef TYPE_1__ XKeyboardState;

/* Variables and functions */
void set_XKeyboardState_bell_percent(void *_p, int _v) {
  ((XKeyboardState *)_p)->bell_percent = (int)_v;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32 }
define void @set_XKeyboardState_bell_percent(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = 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 i32 %5, i32* %8
ret void
}

LLVM IR (-O2):
define void @set_XKeyboardState_bell_percent(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
int SH2InterpreterReset() { return 0; }


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

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

LLVM IR (-O0):
define i32 @SH2InterpreterReset() {
ret i32 0
}

LLVM IR (-O2):
define i32 @SH2InterpreterReset() {
ret i32 0
}
unsigned char _is_accessor_char(char c) { return (c == '.'); }


x86 assembly (clang, -O0):
<_is_accessor_char>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x2e,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_is_accessor_char>:
cmp    $0x2e,%dil
sete   %al
ret

LLVM IR (-O0):
define zeroext i8 @_is_accessor_char(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 46
%6 = zext i1 %5 to i32
%7 = trunc i32 %6 to i8
ret i8 %7
}

LLVM IR (-O2):
define zeroext i8 @_is_accessor_char(i8 signext %0) {
%2 = icmp eq i8 %0, 46
%3 = zext i1 %2 to i8
ret i8 %3
}
/* Variables and functions */
int yywrap();
int cmdwrap(void) { return yywrap(); }


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

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

LLVM IR (-O0):
define i32 @cmdwrap() {
%1 = call i32 (...) @yywrap()
ret i32 %1
}

LLVM IR (-O2):
define i32 @cmdwrap() {
%1 = tail call i32 (...) @yywrap()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ uart16550_putc(int /*<<< orphan*/);
void puts(const char *s) {
  while (*s)
    uart16550_putc(*s++);
}


x86 assembly (clang, -O0):
<puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1145 <puts+0x35>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
call   1030 <uart16550_putc@plt>
jmp    111c <puts+0xc>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @puts(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %10, %4 ], [ %2, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = sext i8 %5 to i32
%9 = tail call i32 @uart16550_putc(i32 %8)
%10 = load i8, i8* %7
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ writechar(char, int, int, int);
void print(char *string) {
  for (int i = 0; *(string + i) != 0; i = i + 1) {
    writechar(*(string + i), -1, -1, 0x0f);
  }
}


x86 assembly (clang, -O0):
<print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1163 <print+0x53>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rsi
mov    $0xffffffff,%edx
mov    $0xf,%ecx
movsbl (%rax,%rsi,1),%edi
mov    %edx,%esi
call   1030 <writechar@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <print+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1142 <print+0x32>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
mov    $0xffffffff,%esi
mov    $0xffffffff,%edx
mov    $0xf,%ecx
call   1030 <writechar@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <print+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @print(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %5, %1
ret void
5: ; preds = %1, %5
%6 = phi i64 [ %9, %5 ], [ 0, %1 ]
%7 = phi i8 [ %11, %5 ], [ %2, %1 ]
%8 = tail call i32 @writechar(i8 signext %7, i32 -1, i32 -1, i32 15)
%9 = add nuw i64 %6, 1
%10 = getelementptr inbounds i8, i8* %0, i64 %9
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %4, label %5
}
void av_murmur3_init_seeded() {}


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

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

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

LLVM IR (-O2):
define void @av_murmur3_init_seeded() {
ret void
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_rdev;
  int /*<<< orphan*/ st_mode;
};
typedef int /*<<< orphan*/ dev_t;

/* Variables and functions */
int /*<<< orphan*/ S_ISBLK(int /*<<< orphan*/);
scalar_t__ stat(char const *, struct stat *);
dev_t bstat(const char *name) {
  struct stat st;
  if (stat(name, &st) || !S_ISBLK(st.st_mode))
    return 0;
  return st.st_rdev;
}


x86 assembly (clang, -O0):
<bstat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <stat@plt>
cmp    $0x0,%rax
jne    1154 <bstat+0x34>
mov    -0x14(%rbp),%edi
call   1040 <S_ISBLK@plt>
cmp    $0x0,%eax
jne    1160 <bstat+0x40>
movl   $0x0,-0x4(%rbp)
jmp    1166 <bstat+0x46>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bstat>:
push   %rbx
sub    $0x10,%rsp
lea    0x8(%rsp),%rsi
call   1030 <stat@plt>
xor    %ebx,%ebx
test   %rax,%rax
jne    1147 <bstat+0x27>
mov    0xc(%rsp),%edi
call   1040 <S_ISBLK@plt>
test   %eax,%eax
je     1147 <bstat+0x27>
mov    0x8(%rsp),%ebx
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
%struct.stat = type { i32, i32 }
define i32 @bstat(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %14
6: ; preds = %1
%7 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 1
%8 = load i32, i32* %7
%9 = call i32 @S_ISBLK(i32 %8)
%10 = icmp eq i32 %9, 0
br i1 %10, label %14, label %11
11: ; preds = %6
%12 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%13 = load i32, i32* %12
br label %14
14: ; preds = %1, %6, %11
%15 = phi i32 [ %13, %11 ], [ 0, %6 ], [ 0, %1 ]
ret i32 %15
}
char *Tratamento() {
  char *ret;
  ret = "\t(Linha lida)\n";
  return ret;
}


x86 assembly (clang, -O0):
<Tratamento>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [15 x i8] c"\09(Linha lida)\0A\00"
define i8* @Tratamento() {
%1 = alloca i8*
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8** %1
%2 = load i8*, i8** %1
ret i8* %2
}

LLVM IR (-O2):
@.str = [15 x i8] c"\09(Linha lida)\0A\00"
define i8* @Tratamento() {
ret i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
struct timeval {
  int dummy;
};

/* Variables and functions */
int utimes(char const *, struct timeval const *);
__attribute__((__weak__, __always___)) int
softboundcets_utimes(const char *filename, const struct timeval times[2]) {
  return utimes(filename, times);
}


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

x86 assembly (clang, -O2):
<softboundcets_utimes>:
jmp    1030 <utimes@plt>

LLVM IR (-O0):
%struct.timeval = type { i32 }
define weak i32 @softboundcets_utimes(i8* %0, %struct.timeval* %1) {
%3 = alloca i8*
%4 = alloca %struct.timeval*
store i8* %0, i8** %3
store %struct.timeval* %1, %struct.timeval** %4
%5 = load i8*, i8** %3
%6 = load %struct.timeval*, %struct.timeval** %4
%7 = call i32 @utimes(i8* %5, %struct.timeval* %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.timeval = type { i32 }
define weak i32 @softboundcets_utimes(i8* %0, %struct.timeval* %1) {
%3 = tail call i32 @utimes(i8* %0, %struct.timeval* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ atomic_add(unsigned long volatile *, long);
void atomic_add_long(volatile unsigned long *target, long delta) {
  atomic_add(target, delta);
}


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

x86 assembly (clang, -O2):
<atomic_add_long>:
jmp    1030 <atomic_add@plt>

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

LLVM IR (-O2):
define void @atomic_add_long(i64* %0, i64 %1) {
%3 = tail call i32 @atomic_add(i64* %0, i64 %1)
ret void
}
void pcp_def_huge_metrics() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @type_structs_placeholder() {
ret void
}
/* Variables and functions */
const char *nonull_string(const char *s) { return s == NULL ? "" : s; }


x86 assembly (clang, -O0):
<nonull_string>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1123 <nonull_string+0x23>
lea    0xee6(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    112b <nonull_string+0x2b>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nonull_string>:
test   %rdi,%rdi
lea    0xef6(%rip),%rax
cmovne %rdi,%rax
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i8* @nonull_string(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %6
5: ; preds = %1
br label %8
6: ; preds = %1
%7 = load i8*, i8** %2
br label %8
8: ; preds = %6, %5
%9 = phi i8* [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), %5 ], [ %7, %6 ]
ret i8* %9
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i8* @nonull_string(i8* readnone %0) {
%2 = icmp eq i8* %0, null
%3 = select i1 %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* %0
ret i8* %3
}
int estSuccesseur(char a[4], char b[4]) {
  int i, diff;
  diff = 0;
  for (i = 0; i < 4; i++)
    if (a[i] - b[i] != 0)
      diff++;
  if (diff == 1)
    return 1 == 1;
  return 0 == 1;
}


x86 assembly (clang, -O0):
<estSuccesseur>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movl   $0x0,-0x20(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x4,-0x1c(%rbp)
jge    1163 <estSuccesseur+0x63>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
mov    -0x18(%rbp),%rcx
movslq -0x1c(%rbp),%rdx
movsbl (%rcx,%rdx,1),%ecx
sub    %ecx,%eax
cmp    $0x0,%eax
je     1150 <estSuccesseur+0x50>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1155 <estSuccesseur+0x55>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    111a <estSuccesseur+0x1a>
cmpl   $0x1,-0x20(%rbp)
jne    1179 <estSuccesseur+0x79>
movl   $0x1,-0x4(%rbp)
jmp    1180 <estSuccesseur+0x80>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<estSuccesseur>:
movd   (%rdi),%xmm0
movd   (%rsi),%xmm1
pcmpeqb %xmm0,%xmm1
pcmpeqd %xmm0,%xmm0
pxor   %xmm1,%xmm0
punpcklbw %xmm0,%xmm0
punpcklwd %xmm0,%xmm0
movmskps %xmm0,%eax
lea    0xf(%rax),%ecx
test   %cl,%al
sete   %cl
test   %eax,%eax
setne  %al
and    %cl,%al
movzbl %al,%eax
ret

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

LLVM IR (-O2):
define i32 @estSuccesseur(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to <4 x i8>*
%4 = load <4 x i8>, <4 x i8>* %3
%5 = bitcast i8* %1 to <4 x i8>*
%6 = load <4 x i8>, <4 x i8>* %5
%7 = icmp ne <4 x i8> %4, %6
%8 = bitcast <4 x i1> %7 to i4
%9 = call i4 @llvm.ctpop.i4(i4 %8)
%10 = icmp eq i4 %9, 1
%11 = zext i1 %10 to i32
ret i32 %11
}
void gdk_window_set_keep_below() {}


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

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

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

LLVM IR (-O2):
define void @gdk_window_set_keep_below() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gen_call(char *);
int /*<<< orphan*/ gen_pop();
gen_not_equal() {
  gen_pop();
  gen_call("ccne");
}


x86 assembly (clang, -O0):
<gen_not_equal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <gen_pop@plt>
lea    0xeca(%rip),%rdi
call   1040 <gen_call@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gen_not_equal>:
push   %rax
xor    %eax,%eax
call   1030 <gen_pop@plt>
lea    0xed1(%rip),%rdi
pop    %rax
jmp    1040 <gen_call@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"ccne\00"
define i32 @gen_not_equal() {
%1 = alloca i32
%2 = call i32 (...) @gen_pop()
%3 = call i32 @gen_call(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
@.str = [5 x i8] c"ccne\00"
define i32 @gen_not_equal() {
%1 = tail call i32 (...) @gen_pop()
%2 = tail call i32 @gen_call(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
int ft_max(int left, int right) {
  if (left > right)
    return (left);
  else
    return (right);
}


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

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

LLVM IR (-O0):
define i32 @ft_max(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* %4
store i32 %10, i32* %3
br label %13
11: ; preds = %2
%12 = load i32, i32* %5
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 @ft_max(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ pc_bcd(int /*<<< orphan*/);
void pmc_bcd(const char *s) {
  while (*s)
    pc_bcd(*s++);
}


x86 assembly (clang, -O0):
<pmc_bcd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1145 <pmc_bcd+0x35>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
call   1030 <pc_bcd@plt>
jmp    111c <pmc_bcd+0xc>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @pmc_bcd(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %10, %4 ], [ %2, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = sext i8 %5 to i32
%9 = tail call i32 @pc_bcd(i32 %8)
%10 = load i8, i8* %7
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
ret void
}
/* Variables and functions */
int rand();
int random_int() { return rand(); }


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

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

LLVM IR (-O0):
define i32 @random_int() {
%1 = call i32 (...) @rand()
ret i32 %1
}

LLVM IR (-O2):
define i32 @random_int() {
%1 = tail call i32 (...) @rand()
ret i32 %1
}
int jac_chain_nm4_n_out(void) { return 2; }


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

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

LLVM IR (-O0):
define i32 @jac_chain_nm4_n_out() {
ret i32 2
}

LLVM IR (-O2):
define i32 @jac_chain_nm4_n_out() {
ret i32 2
}
float approx_sqrt(int z) {
  if (z == 0)
    return 1;
  return (approx_sqrt(z - 1) + (float)z / approx_sqrt(z - 1)) / 2;
}


x86 assembly (clang, -O0):
<approx_sqrt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1137 <approx_sqrt+0x27>
movss  0xed7(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1182 <approx_sqrt+0x72>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <approx_sqrt@plt>
movss  %xmm0,-0xc(%rbp)
cvtsi2ssl -0x8(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <approx_sqrt@plt>
movss  -0x10(%rbp),%xmm1
movaps %xmm0,%xmm2
movss  -0xc(%rbp),%xmm0
divss  %xmm2,%xmm1
addss  %xmm1,%xmm0
movss  0xe87(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<approx_sqrt>:
push   %rbx
test   %edi,%edi
je     113b <approx_sqrt+0x2b>
mov    %edi,%ebx
lea    -0x1(%rbx),%edi
call   1030 <approx_sqrt@plt>
movaps %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsi2ss %ebx,%xmm0
divss  %xmm1,%xmm0
addss  %xmm1,%xmm0
mulss  0xecb(%rip),%xmm0
pop    %rbx
ret
movss  0xebd(%rip),%xmm0
pop    %rbx
ret

LLVM IR (-O0):
define float @approx_sqrt(i32 %0) {
%2 = alloca float
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store float 1.000000e+00, float* %2
br label %19
7: ; preds = %1
%8 = load i32, i32* %3
%9 = sub nsw i32 %8, 1
%10 = call float @approx_sqrt(i32 %9)
%11 = load i32, i32* %3
%12 = sitofp i32 %11 to float
%13 = load i32, i32* %3
%14 = sub nsw i32 %13, 1
%15 = call float @approx_sqrt(i32 %14)
%16 = fdiv float %12, %15
%17 = fadd float %10, %16
%18 = fdiv float %17, 2.000000e+00
store float %18, float* %2
br label %19
19: ; preds = %7, %6
%20 = load float, float* %2
ret float %20
}

LLVM IR (-O2):
define float @approx_sqrt(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %3, label %5
3: ; preds = %1, %5
%4 = phi float [ %11, %5 ], [ 1.000000e+00, %1 ]
ret float %4
5: ; preds = %1
%6 = add nsw i32 %0, -1
%7 = tail call float @approx_sqrt(i32 %6)
%8 = sitofp i32 %0 to float
%9 = fdiv float %8, %7
%10 = fadd float %7, %9
%11 = fmul float %10, 5.000000e-01
br label %3
}
double obd_convert_04(int a, int b) { return (double)(100 * a) / 255.0f; }


x86 assembly (clang, -O0):
<obd_convert_04>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
imul   $0x64,-0x4(%rbp),%eax
cvtsi2sd %eax,%xmm0
movsd  0xee6(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<obd_convert_04>:
imul   $0x64,%edi,%eax
cvtsi2sd %eax,%xmm0
divsd  0xef1(%rip),%xmm0
ret

LLVM IR (-O0):
define double @obd_convert_04(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = mul nsw i32 100, %5
%7 = sitofp i32 %6 to double
%8 = fdiv double %7, 2.550000e+02
ret double %8
}

LLVM IR (-O2):
define double @obd_convert_04(i32 %0, i32 %1) {
%3 = mul nsw i32 %0, 100
%4 = sitofp i32 %3 to double
%5 = fdiv double %4, 2.550000e+02
ret double %5
}