xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ f(int);
int main() {
  int a, b, c, d, e, f1;
  int i;
  for (i = 0; i < 10000; i++) {
    f(10);
    f(9);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x20(%rbp)
cmpl   $0x2710,-0x20(%rbp)
jge    1155 <main+0x45>
mov    $0xa,%edi
call   1030 <f@plt>
mov    $0x9,%edi
call   1030 <f@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x2710,%ebx
cs nopw 0x0(%rax,%rax,1)
mov    $0xa,%edi
call   1030 <f@plt>
mov    $0x9,%edi
call   1030 <f@plt>
add    $0xffffffff,%ebx
jne    1120 <main+0x10>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %5, %1 ]
%3 = tail call i32 @f(i32 10)
%4 = tail call i32 @f(i32 9)
%5 = add nuw nsw i32 %2, 1
%6 = icmp eq i32 %5, 10000
br i1 %6, label %7, label %1
7: ; preds = %1
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ESP8266_UART_Putch(int /*<<< orphan*/);
unsigned char ESP8266_UART_String(char *s, unsigned int Length) {
  while (Length) {
    ESP8266_UART_Putch(*s++);
    Length--;
  }
  return 1;
}


x86 assembly (clang, -O0):
<ESP8266_UART_String>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     114e <ESP8266_UART_String+0x3e>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
call   1030 <ESP8266_UART_Putch@plt>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    111f <ESP8266_UART_String+0xf>
mov    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ESP8266_UART_String>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
je     1143 <ESP8266_UART_String+0x33>
mov    %rdi,%r14
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsbl (%r14,%rbx,1),%edi
call   1030 <ESP8266_UART_Putch@plt>
add    $0x1,%rbx
cmp    %ebx,%r15d
jne    1130 <ESP8266_UART_String+0x20>
mov    $0x1,%al
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define zeroext i8 @ESP8266_UART_String(i8* nocapture %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %13, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %11, %4 ], [ %1, %2 ]
%6 = phi i8* [ %7, %4 ], [ %0, %2 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = load i8, i8* %6
%9 = sext i8 %8 to i32
%10 = tail call i32 @ESP8266_UART_Putch(i32 %9)
%11 = add i32 %5, -1
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %4, %2
ret i8 1
}
/* Variables and functions */
float get_debian_version();
int /*<<< orphan*/ sprintf(char *, char *, char *);
void get_debhelper_version(char *debhelper_version) {
  float debian_version = get_debian_version();
  if ((int)debian_version == 6) {
    sprintf(debhelper_version, "%s", "8.0.0");
  }
  sprintf(debhelper_version, "%s", "9.0.0");
}


x86 assembly (clang, -O0):
<get_debhelper_version>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <get_debian_version@plt>
movss  %xmm0,-0xc(%rbp)
cvttss2si -0xc(%rbp),%eax
cmp    $0x6,%eax
jne    115d <get_debhelper_version+0x3d>
mov    -0x8(%rbp),%rdi
lea    0xeaf(%rip),%rsi
lea    0xeab(%rip),%rdx
call   1040 <sprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xe98(%rip),%rsi
lea    0xe9a(%rip),%rdx
call   1040 <sprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_debhelper_version>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <get_debian_version@plt>
cvttss2si %xmm0,%eax
cmp    $0x6,%eax
jne    1130 <get_debhelper_version+0x20>
movw   $0x30,0x4(%rbx)
movl   $0x2e302e38,(%rbx)
movw   $0x30,0x4(%rbx)
movl   $0x2e302e39,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [6 x i8] c"8.0.0\00"
@.str.2 = [6 x i8] c"9.0.0\00"
define void @get_debhelper_version(i8* %0) {
%2 = alloca i8*
%3 = alloca float
store i8* %0, i8** %2
%4 = call float (...) @get_debian_version()
store float %4, float* %3
%5 = load float, float* %3
%6 = fptosi float %5 to i32
%7 = icmp eq i32 %6, 6
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i8*, i8** %2
%10 = call i32 @sprintf(i8* %9, 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))
br label %11
11: ; preds = %8, %1
%12 = load i8*, i8** %2
%13 = call i32 @sprintf(i8* %12, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [6 x i8] c"8.0.0\00"
@.str.2 = [6 x i8] c"9.0.0\00"
define void @get_debhelper_version(i8* nocapture writeonly %0) {
%2 = tail call float (...) @get_debian_version()
%3 = fptosi float %2 to i32
%4 = icmp eq i32 %3, 6
br i1 %4, label %5, label %6
5: ; preds = %1
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 dereferenceable(6) %0, i8* align 1 dereferenceable(6) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i64 6, i1 false)
br label %6
6: ; preds = %5, %1
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 dereferenceable(6) %0, i8* align 1 dereferenceable(6) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i64 6, i1 false)
ret void
}
int test_imm_05uint64_lowword_reg(unsigned long long val) {
  return ((val) & (0x05 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_05uint64_lowword_reg>:
test   $0x5,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_05uint64_lowword_reg(i64 %0) {
%2 = and i64 %0, 5
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ anykey();
int /*<<< orphan*/ prt(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ put_str(char *, int, int);
void pause_line(int row) {
  prt("", row, 0);
  put_str("[Press any key to continue]", row, 23);
  (void)anykey();
  prt("", row, 0);
}


x86 assembly (clang, -O0):
<pause_line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xed6(%rip),%rdi
xor    %edx,%edx
call   1030 <prt@plt>
mov    -0x4(%rbp),%esi
lea    0xeaa(%rip),%rdi
mov    $0x17,%edx
call   1050 <put_str@plt>
mov    $0x0,%al
call   1040 <anykey@plt>
mov    -0x4(%rbp),%esi
lea    0xeaa(%rip),%rdi
xor    %edx,%edx
call   1030 <prt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pause_line>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
lea    0xede(%rip),%r14
mov    %r14,%rdi
mov    %ebx,%esi
xor    %edx,%edx
call   1030 <prt@plt>
lea    0xeb0(%rip),%rdi
mov    %ebx,%esi
mov    $0x17,%edx
call   1050 <put_str@plt>
xor    %eax,%eax
call   1040 <anykey@plt>
mov    %r14,%rdi
mov    %ebx,%esi
xor    %edx,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <prt@plt>

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
@.str.1 = [28 x i8] c"[Press any key to continue]\00"
define void @pause_line(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @prt(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 %3, i32 0)
%5 = load i32, i32* %2
%6 = call i32 @put_str(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i32 %5, i32 23)
%7 = call i32 (...) @anykey()
%8 = load i32, i32* %2
%9 = call i32 @prt(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 %8, i32 0)
ret void
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
@.str.1 = [28 x i8] c"[Press any key to continue]\00"
define void @pause_line(i32 %0) {
%2 = tail call i32 @prt(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 %0, i32 0)
%3 = tail call i32 @put_str(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i32 %0, i32 23)
%4 = tail call i32 (...) @anykey()
%5 = tail call i32 @prt(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 %0, i32 0)
ret void
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int /*<<< orphan*/ *display;
};
struct TYPE_4__ {
  TYPE_1__ xresizerequest;
};
typedef TYPE_2__ XEvent;
typedef int /*<<< orphan*/ Display;

/* Variables and functions */
void set_XEvent_xresizerequest_display(void *_p, void *_v) {
  ((XEvent *)_p)->xresizerequest.display = (Display *)_v;
}


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

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

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

LLVM IR (-O2):
define void @set_XEvent_xresizerequest_display(i8* nocapture writeonly %0, i8* %1) {
%3 = bitcast i8* %0 to i8**
store i8* %1, i8** %3
ret void
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
void TimerRTCDisable(uint32_t ui32Base) {
  ;
  (*((volatile unsigned long *)(ui32Base + 0x0000000C))) &= ~(0x00000010);
}


x86 assembly (clang, -O0):
<TimerRTCDisable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%rcx
and    $0xffffffffffffffef,%rcx
mov    %rcx,0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<TimerRTCDisable>:
andq   $0xffffffffffffffef,0xc(%rdi)
ret

LLVM IR (-O0):
define void @TimerRTCDisable(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add nsw i64 %3, 12
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
%7 = and i64 %6, -17
store volatile i64 %7, i64* %5
ret void
}

LLVM IR (-O2):
define void @TimerRTCDisable(i64 %0) {
%2 = add nsw i64 %0, 12
%3 = inttoptr i64 %2 to i64*
%4 = load volatile i64, i64* %3
%5 = and i64 %4, -17
store volatile i64 %5, i64* %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ XSelectionClearEvent;

/* Variables and functions */
int /*<<< orphan*/ abort();
scalar_t__ malloc(int);
void *alloc_XSelectionClearEvent(void) {
  XSelectionClearEvent *_p =
      (XSelectionClearEvent *)malloc(sizeof(XSelectionClearEvent));
  if (_p == NULL)
    abort();
  return (void *)_p;
}


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

x86 assembly (clang, -O2):
<alloc_XSelectionClearEvent>:
push   %rax
mov    $0x4,%edi
call   1040 <malloc@plt>
test   %rax,%rax
je     1132 <alloc_XSelectionClearEvent+0x12>
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i8* @alloc_XSelectionClearEvent() {
%1 = alloca i32*
%2 = call i64 @malloc(i32 4)
%3 = inttoptr i64 %2 to i32*
store i32* %3, i32** %1
%4 = load i32*, i32** %1
%5 = icmp eq i32* %4, null
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 (...) @abort()
unreachable
8: ; preds = %0
%9 = load i32*, i32** %1
%10 = bitcast i32* %9 to i8*
ret i8* %10
}

LLVM IR (-O2):
define i8* @alloc_XSelectionClearEvent() {
%1 = tail call i64 @malloc(i32 4)
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = inttoptr i64 %1 to i8*
ret i8* %6
}
/* Variables and functions */
int core6_swap(char *, int);
int U_EMRPOLYLINETO16_swap(char *record, int torev) {
  return (core6_swap(record, torev));
}


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

x86 assembly (clang, -O2):
<U_EMRPOLYLINETO16_swap>:
jmp    1030 <core6_swap@plt>

LLVM IR (-O0):
define i32 @U_EMRPOLYLINETO16_swap(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 = load i32, i32* %4
%7 = call i32 @core6_swap(i8* %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @U_EMRPOLYLINETO16_swap(i8* %0, i32 %1) {
%3 = tail call i32 @core6_swap(i8* %0, i32 %1)
ret i32 %3
}
int isdelimiter(char ch) {
  return ch == ' ' || ch == '\n' || ch == '\t' || ch == '\0';
}


x86 assembly (clang, -O0):
<isdelimiter>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x2(%rbp)
je     114d <isdelimiter+0x4d>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0xa,%ecx
mov    %al,-0x2(%rbp)
je     114d <isdelimiter+0x4d>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x9,%ecx
mov    %al,-0x2(%rbp)
je     114d <isdelimiter+0x4d>
movsbl -0x1(%rbp),%eax
cmp    $0x0,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isdelimiter>:
cmp    $0x20,%dil
ja     1120 <isdelimiter+0x20>
mov    $0x1,%eax
movzbl %dil,%ecx
movabs $0x100000600,%rdx
bt     %rcx,%rdx
jae    1120 <isdelimiter+0x20>
ret
xor    %eax,%eax
test   %dil,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @isdelimiter(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, 32
br i1 %5, label %18, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 10
br i1 %9, label %18, label %10
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 9
br i1 %13, label %18, label %14
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %16, 0
br label %18
18: ; preds = %14, %10, %6, %1
%19 = phi i1 [ true, %10 ], [ true, %6 ], [ true, %1 ], [ %17, %14 ]
%20 = zext i1 %19 to i32
ret i32 %20
}

LLVM IR (-O2):
define i32 @isdelimiter(i8 signext %0) {
switch i8 %0, label %2 [
i8 32, label %5
i8 10, label %5
i8 9, label %5
]
2: ; preds = %1
%3 = icmp eq i8 %0, 0
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ syscall(int, char const *, char const *, void *, size_t);
ssize_t lgetxattr(const char *path, const char *name, void *value,
                  size_t size) {
  return syscall(192, path, name, value, size);
}


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

x86 assembly (clang, -O2):
<lgetxattr>:
mov    %rcx,%r8
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    $0xc0,%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
define i32 @lgetxattr(i8* %0, i8* %1, i8* %2, i64 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i64
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i64 %3, i64* %8
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = load i8*, i8** %7
%12 = load i64, i64* %8
%13 = call i32 @syscall(i32 192, i8* %9, i8* %10, i8* %11, i64 %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @lgetxattr(i8* %0, i8* %1, i8* %2, i64 %3) {
%5 = tail call i32 @syscall(i32 192, i8* %0, i8* %1, i8* %2, i64 %3)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ libc_printf(char *, int, char *, unsigned int);
void assert(unsigned int condition, unsigned int line) {
  if (!condition) {
    libc_printf((char *)"%s:%d: assert failed\\n", 22,
                "../git-pge/m2/interpen.mod", line);
  }
}


x86 assembly (clang, -O0):
<assert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1143 <assert+0x33>
mov    -0x8(%rbp),%ecx
lea    0xece(%rip),%rdi
mov    $0x16,%esi
lea    0xed9(%rip),%rdx
call   1030 <libc_printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<assert>:
test   %edi,%edi
je     1115 <assert+0x5>
ret
mov    %esi,%ecx
lea    0xee2(%rip),%rdi
lea    0xef2(%rip),%rdx
mov    $0x16,%esi
jmp    1030 <libc_printf@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"%s:%d: assert failed\\n\00"
@.str.1 = [27 x i8] c"../git-pge/m2/interpen.mod\00"
define void @assert(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 = icmp ne i32 %5, 0
br i1 %6, label %10, label %7
7: ; preds = %2
%8 = load i32, i32* %4
%9 = call i32 @libc_printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 22, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i32 %8)
br label %10
10: ; preds = %7, %2
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"%s:%d: assert failed\\n\00"
@.str.1 = [27 x i8] c"../git-pge/m2/interpen.mod\00"
define void @assert(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @libc_printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 22, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i32 %1)
br label %6
6: ; preds = %4, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ process_request(int);
void *accept_request(void *arg) {
  int clifd = *((int *)arg);
  process_request(clifd);
  return (void *)NULL;
}


x86 assembly (clang, -O0):
<accept_request>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <process_request@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<accept_request>:
push   %rax
mov    (%rdi),%edi
call   1030 <process_request@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i8* @accept_request(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i32*
%6 = load i32, i32* %5
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = call i32 @process_request(i32 %7)
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @accept_request(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = tail call i32 @process_request(i32 %3)
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
int strv_push(char ***, char *);
int strv_consume(char ***l, char *value) {
  int r;
  r = strv_push(l, value);
  if (r < 0)
    free(value);
  return r;
}


x86 assembly (clang, -O0):
<strv_consume>:
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   1040 <strv_push@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    1153 <strv_consume+0x33>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strv_consume>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
call   1040 <strv_push@plt>
mov    %eax,%ebp
test   %eax,%eax
jns    1139 <strv_consume+0x19>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @strv_consume(i8*** %0, i8* %1) {
%3 = tail call i32 @strv_push(i8*** %0, i8* %1)
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @free(i8* %1)
br label %7
7: ; preds = %5, %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ sleep(int);
char *test_foo();
int main(int argc, char *argv[]) {
  char *foo = test_foo();
  sleep(5);
  printf(foo);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <test_foo@plt>
mov    %rax,-0x18(%rbp)
mov    $0x5,%edi
call   1050 <sleep@plt>
mov    -0x18(%rbp),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <test_foo@plt>
mov    %rax,%rbx
mov    $0x5,%edi
call   1050 <sleep@plt>
mov    %rbx,%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i8* (...) @test_foo()
store i8* %7, i8** %6
%8 = call i32 @sleep(i32 5)
%9 = load i8*, i8** %6
%10 = call i32 @printf(i8* %9)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i8* (...) @test_foo()
%4 = tail call i32 @sleep(i32 5)
%5 = tail call i32 @printf(i8* dereferenceable(1) %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fun(int, double, char);
int main() {
  fun(23, 3.14, 'a');
  fun(20024, 2.78, 'b');
  fun(420000000000000, 1.414, 'c');
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x17,%edi
movsd  0xeef(%rip),%xmm0
mov    $0x61,%esi
call   1030 <fun@plt>
mov    $0x4e38,%edi
movsd  0xed0(%rip),%xmm0
mov    $0x62,%esi
call   1030 <fun@plt>
mov    $0xdece4000,%edi
movsd  0xeb1(%rip),%xmm0
mov    $0x63,%esi
call   1030 <fun@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movsd  0xee7(%rip),%xmm0
mov    $0x17,%edi
mov    $0x61,%esi
call   1030 <fun@plt>
movsd  0xed8(%rip),%xmm0
mov    $0x4e38,%edi
mov    $0x62,%esi
call   1030 <fun@plt>
movsd  0xec9(%rip),%xmm0
mov    $0xdece4000,%edi
mov    $0x63,%esi
call   1030 <fun@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @fun(i32 23, double 3.140000e+00, i8 signext 97)
%2 = call i32 @fun(i32 20024, double 2.780000e+00, i8 signext 98)
%3 = call i32 @fun(i32 -556908544, double 1.414000e+00, i8 signext 99)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @fun(i32 23, double 3.140000e+00, i8 signext 97)
%2 = tail call i32 @fun(i32 20024, double 2.780000e+00, i8 signext 98)
%3 = tail call i32 @fun(i32 -556908544, double 1.414000e+00, i8 signext 99)
ret i32 0
}
/* Variables and functions */
double swe_julday(int, int, int, double, int);
double julday(int month, int day, int year, double hour, int gregflag) {
  double jd;
  jd = swe_julday(year, month, day, hour, gregflag);
  return jd;
}


x86 assembly (clang, -O0):
<julday>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movsd  %xmm0,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
movsd  -0x18(%rbp),%xmm0
mov    -0x1c(%rbp),%ecx
call   1030 <swe_julday@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<julday>:
mov    %edx,%eax
mov    %esi,%edx
mov    %edi,%esi
mov    %eax,%edi
jmp    1030 <swe_julday@plt>

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

LLVM IR (-O2):
define double @julday(i32 %0, i32 %1, i32 %2, double %3, i32 %4) {
%6 = tail call double @swe_julday(i32 %2, i32 %0, i32 %1, double %3, i32 %4)
ret double %6
}
void gtk_style_detach() {}


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

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

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

LLVM IR (-O2):
define void @gtk_style_detach() {
ret void
}
void dbg_dump_budg(struct ubifs_info *c, const struct ubifs_budg_info *bi) {
  return;
}


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

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

LLVM IR (-O0):
%struct.ubifs_info = type opaque
%struct.ubifs_budg_info = type opaque
define void @dbg_dump_budg(%struct.ubifs_info* %0, %struct.ubifs_budg_info* %1) {
%3 = alloca %struct.ubifs_info*
%4 = alloca %struct.ubifs_budg_info*
store %struct.ubifs_info* %0, %struct.ubifs_info** %3
store %struct.ubifs_budg_info* %1, %struct.ubifs_budg_info** %4
ret void
}

LLVM IR (-O2):
%struct.ubifs_info = type opaque
%struct.ubifs_budg_info = type opaque
define void @dbg_dump_budg(%struct.ubifs_info* nocapture %0, %struct.ubifs_budg_info* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ GpioPinMuxSetup(int, int);
void ehrpwm_2_pinmux_setup(void) {
  GpioPinMuxSetup((0x0820), (4));
  GpioPinMuxSetup((0x0824), (4));
}


x86 assembly (clang, -O0):
<ehrpwm_2_pinmux_setup>:
push   %rbp
mov    %rsp,%rbp
mov    $0x820,%edi
mov    $0x4,%esi
call   1030 <GpioPinMuxSetup@plt>
mov    $0x824,%edi
mov    $0x4,%esi
call   1030 <GpioPinMuxSetup@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ehrpwm_2_pinmux_setup>:
push   %rax
mov    $0x820,%edi
mov    $0x4,%esi
call   1030 <GpioPinMuxSetup@plt>
mov    $0x824,%edi
mov    $0x4,%esi
pop    %rax
jmp    1030 <GpioPinMuxSetup@plt>

LLVM IR (-O0):
define void @ehrpwm_2_pinmux_setup() {
%1 = call i32 @GpioPinMuxSetup(i32 2080, i32 4)
%2 = call i32 @GpioPinMuxSetup(i32 2084, i32 4)
ret void
}

LLVM IR (-O2):
define void @ehrpwm_2_pinmux_setup() {
%1 = tail call i32 @GpioPinMuxSetup(i32 2080, i32 4)
%2 = tail call i32 @GpioPinMuxSetup(i32 2084, i32 4)
ret void
}
double toDegrees(double radians) {
  return radians * 180 / 3.14159265358979323846;
}


x86 assembly (clang, -O0):
<toDegrees>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xef7(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  0xee2(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<toDegrees>:
mulsd  0xef8(%rip),%xmm0
divsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @toDegrees(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double %3, 1.800000e+02
%5 = fdiv double %4, 0x400921FB54442D18
ret double %5
}

LLVM IR (-O2):
define double @toDegrees(double %0) {
%2 = fmul double %0, 1.800000e+02
%3 = fdiv double %2, 0x400921FB54442D18
ret double %3
}
double KtoR(double K) {
  double r = (1.8 * (K - 273.15) + 32) + 459.69;
  return r;
}


x86 assembly (clang, -O0):
<KtoR>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xf02(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xee6(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xee2(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  0xec6(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<KtoR>:
addsd  0xef8(%rip),%xmm0
mulsd  0xef8(%rip),%xmm0
addsd  0xef8(%rip),%xmm0
addsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @KtoR(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = fsub double %4, 2.731500e+02
%6 = call double @llvm.fmuladd.f64(double 1.800000e+00, double %5, double 3.200000e+01)
%7 = fadd double %6, 4.596900e+02
store double %7, double* %3
%8 = load double, double* %3
ret double %8
}

LLVM IR (-O2):
define double @KtoR(double %0) {
%2 = fadd double %0, -2.731500e+02
%3 = tail call double @llvm.fmuladd.f64(double %2, double 1.800000e+00, double 3.200000e+01)
%4 = fadd double %3, 4.596900e+02
ret double %4
}
unsigned int cast_ushort_uint_fast(unsigned short int x) {
  return (unsigned int)x;
}


x86 assembly (clang, -O0):
<cast_ushort_uint_fast>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @cast_ushort_uint_fast(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
ret i32 %4
}

LLVM IR (-O2):
define i32 @cast_ushort_uint_fast(i16 zeroext %0) {
%2 = zext i16 %0 to i32
ret i32 %2
}
int set__compare(const void *a, const void *b) {
  return *((const int *)a) - *((const int *)b);
}


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

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

LLVM IR (-O0):
define i32 @set__compare(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 i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = sub nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @set__compare(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
int validOperator(char *o) {
  if (*o == '+' || *o == '-' || *o == '/' || *o == '*' || *o == '%') {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<validOperator>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2b,%eax
je     1158 <validOperator+0x58>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
je     1158 <validOperator+0x58>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2f,%eax
je     1158 <validOperator+0x58>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2a,%eax
je     1158 <validOperator+0x58>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x25,%eax
jne    1164 <validOperator+0x64>
movl   $0x1,-0x4(%rbp)
jmp    116b <validOperator+0x6b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<validOperator>:
mov    (%rdi),%cl
add    $0xdb,%cl
xor    %eax,%eax
cmp    $0xa,%cl
ja     111a <validOperator+0x1a>
movsbq %cl,%rax
lea    0xee9(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @validOperator(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 43
br i1 %7, label %28, label %8
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %11, 45
br i1 %12, label %28, label %13
13: ; preds = %8
%14 = load i8*, i8** %3
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %16, 47
br i1 %17, label %28, label %18
18: ; preds = %13
%19 = load i8*, i8** %3
%20 = load i8, i8* %19
%21 = sext i8 %20 to i32
%22 = icmp eq i32 %21, 42
br i1 %22, label %28, label %23
23: ; preds = %18
%24 = load i8*, i8** %3
%25 = load i8, i8* %24
%26 = sext i8 %25 to i32
%27 = icmp eq i32 %26, 37
br i1 %27, label %28, label %29
28: ; preds = %23, %18, %13, %8, %1
store i32 1, i32* %2
br label %30
29: ; preds = %23
store i32 0, i32* %2
br label %30
30: ; preds = %29, %28
%31 = load i32, i32* %2
ret i32 %31
}

LLVM IR (-O2):
@switch.table.validOperator = [11 x i32] [i32 1, i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1, i32 0, i32 1]
define i32 @validOperator(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = add i8 %2, -37
%4 = icmp ult i8 %3, 11
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = sext i8 %3 to i64
%7 = getelementptr inbounds [11 x i32], [11 x i32]* @switch.table.validOperator, i64 0, i64 %6
%8 = load i32, i32* %7
br label %9
9: ; preds = %1, %5
%10 = phi i32 [ %8, %5 ], [ 0, %1 ]
ret i32 %10
}
/* Variables and functions */
int number_occurrences_char(char, char *);
int character_count(char char_to_count, char *source) {
  return number_occurrences_char(char_to_count, source);
}


x86 assembly (clang, -O0):
<character_count>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x1(%rbp),%al
mov    -0x10(%rbp),%rsi
movsbl %al,%edi
call   1030 <number_occurrences_char@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<character_count>:
jmp    1030 <number_occurrences_char@plt>

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

LLVM IR (-O2):
define i32 @character_count(i8 signext %0, i8* %1) {
%3 = tail call i32 @number_occurrences_char(i8 signext %0, i8* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int checkKey(int k) {
  if (k > 0 && k < 26)
    return 1;
  else {
    printf("\n\nInvalid Key!!\n");
    printf("Your key must be from 1 - %d", 26);
    return 0;
  }
}


x86 assembly (clang, -O0):
<checkKey>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    113b <checkKey+0x2b>
cmpl   $0x1a,-0x8(%rbp)
jge    113b <checkKey+0x2b>
movl   $0x1,-0x4(%rbp)
jmp    1163 <checkKey+0x53>
lea    0xebe(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec1(%rip),%rdi
mov    $0x1a,%esi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkKey>:
push   %rbx
add    $0xffffffff,%edi
mov    $0x1,%ebx
cmp    $0x19,%edi
jb     114f <checkKey+0x2f>
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xebf(%rip),%rdi
xor    %ebx,%ebx
mov    $0x1a,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"\0A\0AInvalid Key!!\0A\00"
@.str.1 = [29 x i8] c"Your key must be from 1 - %d\00"
define i32 @checkKey(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sgt i32 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp slt i32 %7, 26
br i1 %8, label %9, label %10
9: ; preds = %6
store i32 1, i32* %2
br label %13
10: ; preds = %6, %1
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i32 26)
store i32 0, i32* %2
br label %13
13: ; preds = %10, %9
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
@.str.1 = [29 x i8] c"Your key must be from 1 - %d\00"
@str = [16 x i8] c"\0A\0AInvalid Key!!\00"
define i32 @checkKey(i32 %0) {
%2 = add i32 %0, -1
%3 = icmp ult i32 %2, 25
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i32 26)
br label %7
7: ; preds = %1, %4
%8 = phi i32 [ 0, %4 ], [ 1, %1 ]
ret i32 %8
}
char in_bounds(int x, int y) { return x < 0 || x > 9 || y < 0 || y > 7; }


x86 assembly (clang, -O0):
<in_bounds>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x1,%al
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x9(%rbp)
jl     1141 <in_bounds+0x41>
mov    $0x1,%al
cmpl   $0x9,-0x4(%rbp)
mov    %al,-0x9(%rbp)
jg     1141 <in_bounds+0x41>
mov    $0x1,%al
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
jl     1141 <in_bounds+0x41>
cmpl   $0x7,-0x8(%rbp)
setg   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<in_bounds>:
cmp    $0xa,%edi
setae  %cl
cmp    $0x8,%esi
setae  %al
or     %cl,%al
ret

LLVM IR (-O0):
define signext i8 @in_bounds(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 = icmp slt i32 %5, 0
br i1 %6, label %16, label %7
7: ; preds = %2
%8 = load i32, i32* %3
%9 = icmp sgt i32 %8, 9
br i1 %9, label %16, label %10
10: ; preds = %7
%11 = load i32, i32* %4
%12 = icmp slt i32 %11, 0
br i1 %12, label %16, label %13
13: ; preds = %10
%14 = load i32, i32* %4
%15 = icmp sgt i32 %14, 7
br label %16
16: ; preds = %13, %10, %7, %2
%17 = phi i1 [ true, %10 ], [ true, %7 ], [ true, %2 ], [ %15, %13 ]
%18 = zext i1 %17 to i32
%19 = trunc i32 %18 to i8
ret i8 %19
}

LLVM IR (-O2):
define signext i8 @in_bounds(i32 %0, i32 %1) {
%3 = icmp ugt i32 %0, 9
%4 = icmp ugt i32 %1, 7
%5 = or i1 %3, %4
%6 = zext i1 %5 to i8
ret i8 %6
}
void BTIC1H_InitQuant() {
  static int init = 0;
  int i, j, k;
  if (init)
    return;
  init = 1;
}


x86 assembly (clang, -O0):
<BTIC1H_InitQuant>:
push   %rbp
mov    %rsp,%rbp
cmpl   $0x0,0x2f19(%rip)
je     1116 <BTIC1H_InitQuant+0x16>
jmp    1120 <BTIC1H_InitQuant+0x20>
movl   $0x1,0x2f04(%rip)
pop    %rbp
ret

x86 assembly (clang, -O2):
<BTIC1H_InitQuant>:
cmpb   $0x0,0x2f1d(%rip)
jne    1110 <BTIC1H_InitQuant+0x10>
movb   $0x1,0x2f14(%rip)
ret

LLVM IR (-O0):
@BTIC1H_InitQuant.init = internal global i32 0
define void @BTIC1H_InitQuant() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = load i32, i32* @BTIC1H_InitQuant.init
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %0
br label %8
7: ; preds = %0
store i32 1, i32* @BTIC1H_InitQuant.init
br label %8
8: ; preds = %7, %6
ret void
}

LLVM IR (-O2):
@BTIC1H_InitQuant.init = internal unnamed_addr global i1 false
define void @BTIC1H_InitQuant() {
%1 = load i1, i1* @BTIC1H_InitQuant.init
br i1 %1, label %3, label %2
2: ; preds = %0
store i1 true, i1* @BTIC1H_InitQuant.init
br label %3
3: ; preds = %0, %2
ret void
}
/* Variables and functions */
double sum_dvec(int, double *);
double avg_dvec(int n, double *x) { return sum_dvec(n, x) / (double)n; }


x86 assembly (clang, -O0):
<avg_dvec>:
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 <sum_dvec@plt>
cvtsi2sdl -0x4(%rbp),%xmm1
divsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<avg_dvec>:
push   %rbx
mov    %edi,%ebx
call   1030 <sum_dvec@plt>
cvtsi2sd %ebx,%xmm1
divsd  %xmm1,%xmm0
pop    %rbx
ret

LLVM IR (-O0):
define double @avg_dvec(i32 %0, double* %1) {
%3 = alloca i32
%4 = alloca double*
store i32 %0, i32* %3
store double* %1, double** %4
%5 = load i32, i32* %3
%6 = load double*, double** %4
%7 = call double @sum_dvec(i32 %5, double* %6)
%8 = load i32, i32* %3
%9 = sitofp i32 %8 to double
%10 = fdiv double %7, %9
ret double %10
}

LLVM IR (-O2):
define double @avg_dvec(i32 %0, double* %1) {
%3 = tail call double @sum_dvec(i32 %0, double* %1)
%4 = sitofp i32 %0 to double
%5 = fdiv double %3, %4
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ inet_addr(char *);
int netmask2cidr(int /*<<< orphan*/);
int /*<<< orphan*/ ntohl(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *, int);
void test(char *snetmask, int expected) {
  if (netmask2cidr(ntohl(inet_addr(snetmask))) != expected) {
    printf("netmask2cidr(\"%s\") != %d\n", snetmask, expected);
  }
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <inet_addr@plt>
mov    %eax,%edi
call   1060 <ntohl@plt>
mov    %eax,%edi
call   1040 <netmask2cidr@plt>
cmp    -0xc(%rbp),%eax
je     1182 <test+0x42>
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
lea    0xe83(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1050 <inet_addr@plt>
mov    %eax,%edi
call   1060 <ntohl@plt>
mov    %eax,%edi
call   1040 <netmask2cidr@plt>
cmp    %ebp,%eax
jne    1166 <test+0x26>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
lea    0xe93(%rip),%rdi
mov    %rbx,%rsi
mov    %ebp,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"netmask2cidr(\22%s\22) != %d\0A\00"
define void @test(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 @inet_addr(i8* %5)
%7 = call i32 @ntohl(i32 %6)
%8 = call i32 @netmask2cidr(i32 %7)
%9 = load i32, i32* %4
%10 = icmp ne i32 %8, %9
br i1 %10, label %11, label %15
11: ; preds = %2
%12 = load i8*, i8** %3
%13 = load i32, i32* %4
%14 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %12, i32 %13)
br label %15
15: ; preds = %11, %2
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"netmask2cidr(\22%s\22) != %d\0A\00"
define void @test(i8* %0, i32 %1) {
%3 = tail call i32 @inet_addr(i8* %0)
%4 = tail call i32 @ntohl(i32 %3)
%5 = tail call i32 @netmask2cidr(i32 %4)
%6 = icmp eq i32 %5, %1
br i1 %6, label %9, label %7
7: ; preds = %2
%8 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1)
br label %9
9: ; preds = %7, %2
ret void
}
int fun295() { return 295; }


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

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

LLVM IR (-O0):
define i32 @fun295() {
ret i32 295
}

LLVM IR (-O2):
define i32 @fun295() {
ret i32 295
}
int f(int x) {
  if (x >= 0 && x <= 3) {
    x = x ^ 3;
    x = x & 3;
  }
  return x;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jl     112d <f+0x2d>
cmpl   $0x3,-0x4(%rbp)
jg     112d <f+0x2d>
mov    -0x4(%rbp),%eax
xor    $0x3,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x3,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
mov    %edi,%eax
not    %eax
and    $0x3,%eax
cmp    $0x4,%edi
cmovae %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @f(i32 %0) {
%2 = icmp ult i32 %0, 4
%3 = and i32 %0, 3
%4 = xor i32 %3, 3
%5 = select i1 %2, i32 %4, i32 %0
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ init_int_ref(int *);
void interprocedural_init_in_callee_good() {
  int x;
  init_int_ref(&x);
  int y = x;
}


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

x86 assembly (clang, -O2):
<interprocedural_init_in_callee_good>:
push   %rax
lea    0x4(%rsp),%rdi
call   1030 <init_int_ref@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @interprocedural_init_in_callee_good() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @init_int_ref(i32* %1)
ret void
}
/* Variables and functions */
int sha512_file(char const *, unsigned char *, int);
int sha4_file(const char *path, unsigned char output[64], int is384) {
  return sha512_file(path, output, is384);
}


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

x86 assembly (clang, -O2):
<sha4_file>:
jmp    1030 <sha512_file@plt>

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

LLVM IR (-O2):
define i32 @sha4_file(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @sha512_file(i8* %0, i8* %1, i32 %2)
ret i32 %4
}
/* Type definitions */
typedef char wchar_t;

/* Variables and functions */
char *f(char *);
int main() {
  wchar_t *a = L"foo";
  a = f(L"bar");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [4 x i32] [i32 102, i32 111, i32 111, i32 0]
@.str.1 = [4 x i32] [i32 98, i32 97, i32 114, i32 0]
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
store i8* bitcast ([4 x i32]* @.str to i8*), i8** %2
%3 = call i8* @f(i8* bitcast ([4 x i32]* @.str.1 to i8*))
store i8* %3, i8** %2
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [4 x i32] [i32 98, i32 97, i32 114, i32 0]
define i32 @main() {
%1 = tail call i8* @f(i8* bitcast ([4 x i32]* @.str.1 to i8*))
ret i32 0
}