xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ d;

/* Variables and functions */
int /*<<< orphan*/ oled_SendCommand(unsigned char *, int);
void SetInverse(char x) {
  unsigned char d[] = {0xA6 | (x & 0x01)};
  oled_SendCommand(d, sizeof(d));
}


x86 assembly (clang, -O0):
<SetInverse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
and    $0x1,%eax
or     $0xa6,%eax
mov    %al,-0x2(%rbp)
lea    -0x2(%rbp),%rdi
mov    $0x1,%esi
call   1030 <oled_SendCommand@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SetInverse>:
push   %rax
and    $0x1,%dil
or     $0xa6,%dil
mov    %dil,0x7(%rsp)
lea    0x7(%rsp),%rdi
mov    $0x1,%esi
call   1030 <oled_SendCommand@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @SetInverse(i8 signext %0) {
%2 = alloca i8
%3 = alloca [1 x i8]
store i8 %0, i8* %2
%4 = getelementptr inbounds [1 x i8], [1 x i8]* %3, i64 0, i64 0
%5 = load i8, i8* %2
%6 = sext i8 %5 to i32
%7 = and i32 %6, 1
%8 = or i32 166, %7
%9 = trunc i32 %8 to i8
store i8 %9, i8* %4
%10 = getelementptr inbounds [1 x i8], [1 x i8]* %3, i64 0, i64 0
%11 = call i32 @oled_SendCommand(i8* %10, i32 1)
ret void
}

LLVM IR (-O2):
define void @SetInverse(i8 signext %0) {
%2 = alloca [1 x i8]
%3 = getelementptr inbounds [1 x i8], [1 x i8]* %2, i64 0, i64 0
%4 = and i8 %0, 1
%5 = or i8 %4, -90
store i8 %5, i8* %3
%6 = call i32 @oled_SendCommand(i8* %3, i32 1)
ret void
}
unsigned int Chebyshev_dis(int sx, int sy, int ex, int ey) {
  double nn;
  return nn;
}


x86 assembly (clang, -O0):
<Chebyshev_dis>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
cvttsd2si -0x18(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @Chebyshev_dis(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca double
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%10 = load double, double* %9
%11 = fptoui double %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @Chebyshev_dis(i32 %0, i32 %1, i32 %2, i32 %3) {
ret i32 undef
}
/* Variables and functions */
int wGetArrayBound(int, int /*<<< orphan*/);
int wPopNumber();
int /*<<< orphan*/ wPushNumber(int);
void wBasLBound() {
  int index, range;
  index = wPopNumber();
  range = wGetArrayBound(index, 0);
  wPopNumber();
  wPushNumber(range);
}


x86 assembly (clang, -O0):
<wBasLBound>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <wPopNumber@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
xor    %esi,%esi
call   1050 <wGetArrayBound@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1040 <wPopNumber@plt>
mov    -0x8(%rbp),%edi
call   1030 <wPushNumber@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wBasLBound>:
push   %rbx
xor    %eax,%eax
call   1040 <wPopNumber@plt>
mov    %eax,%edi
xor    %esi,%esi
call   1050 <wGetArrayBound@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <wPopNumber@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <wPushNumber@plt>

LLVM IR (-O0):
define void @wBasLBound() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (...) @wPopNumber()
store i32 %3, i32* %1
%4 = load i32, i32* %1
%5 = call i32 @wGetArrayBound(i32 %4, i32 0)
store i32 %5, i32* %2
%6 = call i32 (...) @wPopNumber()
%7 = load i32, i32* %2
%8 = call i32 @wPushNumber(i32 %7)
ret void
}

LLVM IR (-O2):
define void @wBasLBound() {
%1 = tail call i32 (...) @wPopNumber()
%2 = tail call i32 @wGetArrayBound(i32 %1, i32 0)
%3 = tail call i32 (...) @wPopNumber()
%4 = tail call i32 @wPushNumber(i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write(int, char const *, int);
void ft_putstr_fd(char const *s, int fd) {
  int i;
  i = 0;
  if (!s)
    return;
  while (s[i])
    i++;
  write(fd, s, i);
}


x86 assembly (clang, -O0):
<ft_putstr_fd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1136 <ft_putstr_fd+0x26>
jmp    116a <ft_putstr_fd+0x5a>
jmp    113b <ft_putstr_fd+0x2b>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     115b <ft_putstr_fd+0x4b>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    113b <ft_putstr_fd+0x2b>
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%edx
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_putstr_fd>:
test   %rdi,%rdi
je     1137 <ft_putstr_fd+0x27>
mov    %rdi,%rax
xor    %edx,%edx
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,(%rax,%rdx,1)
lea    0x1(%rdx),%rdx
jne    1120 <ft_putstr_fd+0x10>
add    $0xffffffff,%edx
mov    %esi,%edi
mov    %rax,%rsi
jmp    1030 <write@plt>
ret

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

LLVM IR (-O2):
define void @ft_putstr_fd(i8* %0, i32 %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %13, label %4
4: ; preds = %2, %4
%5 = phi i64 [ %9, %4 ], [ 0, %2 ]
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 0
%9 = add nuw i64 %5, 1
br i1 %8, label %10, label %4
10: ; preds = %4
%11 = trunc i64 %5 to i32
%12 = tail call i32 @write(i32 %1, i8* %0, i32 %11)
br label %13
13: ; preds = %2, %10
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf("./random n a b\n");
  printf("Generate n random numbers between a and b.\n");
  printf("Please input a less than b.\n");
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xeeb(%rip),%rdi
call   1030 <puts@plt>
lea    0xf0a(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"./random n a b\0A\00"
@.str.1 = [44 x i8] c"Generate n random numbers between a and b.\0A\00"
@.str.2 = [29 x i8] c"Please input a less than b.\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [15 x i8] c"./random n a b\00"
@str.3 = [43 x i8] c"Generate n random numbers between a and b.\00"
@str.4 = [28 x i8] c"Please input a less than b.\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.4, i64 0, i64 0))
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned long base_pixel;
};
typedef TYPE_1__ XStandardColormap;

/* Variables and functions */
void set_XStandardColormap_base_pixel(void *_p, unsigned long _v) {
  ((XStandardColormap *)_p)->base_pixel = (unsigned long)_v;
}


x86 assembly (clang, -O0):
<set_XStandardColormap_base_pixel>:
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_XStandardColormap_base_pixel>:
mov    %rsi,(%rdi)
ret

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

LLVM IR (-O2):
define void @set_XStandardColormap_base_pixel(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
/* Variables and functions */
void *malloc(size_t);
void *ALechoState_New(size_t size) { return malloc(size); }


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

x86 assembly (clang, -O2):
<ALechoState_New>:
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define i8* @ALechoState_New(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i8* @malloc(i64 %3)
ret i8* %4
}

LLVM IR (-O2):
define noalias i8* @ALechoState_New(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
extern void shmem_double_prod_to_all(double *target, double *source,
                                     int nreduce, int PE_start,
                                     int logPE_stride, int PE_size,
                                     double *pWrk, long *pSync) {
  printf("\nOpenSHMEM Analyzer\n");
}


x86 assembly (clang, -O0):
<shmem_double_prod_to_all>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9d,-0x20(%rbp)
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [21 x i8] c"\0AOpenSHMEM Analyzer\0A\00"
define void @shmem_double_prod_to_all(double* %0, double* %1, i32 %2, i32 %3, i32 %4, i32 %5, double* %6, i64* %7) {
%9 = alloca double*
%10 = alloca double*
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca double*
%16 = alloca i64*
store double* %0, double** %9
store double* %1, double** %10
store i32 %2, i32* %11
store i32 %3, i32* %12
store i32 %4, i32* %13
store i32 %5, i32* %14
store double* %6, double** %15
store i64* %7, i64** %16
%17 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [20 x i8] c"\0AOpenSHMEM Analyzer\00"
define void @shmem_double_prod_to_all(double* nocapture readnone %0, double* nocapture readnone %1, i32 %2, i32 %3, i32 %4, i32 %5, double* nocapture readnone %6, i64* nocapture readnone %7) {
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ setToZero(short **);
int main() {
  short a[3] = {1245, 1924, 234};
  short b[2] = {24, 256};
  short *t[2] = {a, b};
  setToZero(t);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xedb(%rip),%eax
mov    %eax,-0xa(%rbp)
mov    0xed5(%rip),%ax
mov    %ax,-0x6(%rbp)
mov    0xecd(%rip),%eax
mov    %eax,-0xe(%rbp)
lea    -0xa(%rbp),%rax
mov    %rax,-0x20(%rbp)
lea    -0xe(%rbp),%rax
mov    %rax,-0x18(%rbp)
lea    -0x20(%rbp),%rdi
call   1030 <setToZero@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
movzwl 0xee9(%rip),%eax
mov    %ax,0xc(%rsp)
mov    0xeda(%rip),%eax
mov    %eax,0x8(%rsp)
movl   $0x1000018,0x4(%rsp)
01
lea    0x8(%rsp),%rax
mov    %rax,0x10(%rsp)
lea    0x4(%rsp),%rax
mov    %rax,0x18(%rsp)
lea    0x10(%rsp),%rdi
call   1030 <setToZero@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.a = [3 x i16] [i16 1245, i16 1924, i16 234]
@__const.main.b = [2 x i16] [i16 24, i16 256]
define i32 @main() {
%1 = alloca i32
%2 = alloca [3 x i16]
%3 = alloca [2 x i16]
%4 = alloca [2 x i16*]
store i32 0, i32* %1
%5 = bitcast [3 x i16]* %2 to i8*
%6 = bitcast [2 x i16]* %3 to i8*
%7 = getelementptr inbounds [2 x i16*], [2 x i16*]* %4, i64 0, i64 0
%8 = getelementptr inbounds [3 x i16], [3 x i16]* %2, i64 0, i64 0
store i16* %8, i16** %7
%9 = getelementptr inbounds i16*, i16** %7, i64 1
%10 = getelementptr inbounds [2 x i16], [2 x i16]* %3, i64 0, i64 0
store i16* %10, i16** %9
%11 = getelementptr inbounds [2 x i16*], [2 x i16*]* %4, i64 0, i64 0
%12 = call i32 @setToZero(i16** %11)
ret i32 0
}

LLVM IR (-O2):
@__const.main.a = [3 x i16] [i16 1245, i16 1924, i16 234]
define i32 @main() {
%1 = alloca [3 x i16]
%2 = alloca i32
%3 = alloca [2 x i16*]
%4 = bitcast [3 x i16]* %1 to i8*
%5 = bitcast i32* %2 to i8*
store i32 16777240, i32* %2
%6 = bitcast [2 x i16*]* %3 to i8*
%7 = getelementptr inbounds [2 x i16*], [2 x i16*]* %3, i64 0, i64 0
%8 = getelementptr inbounds [3 x i16], [3 x i16]* %1, i64 0, i64 0
store i16* %8, i16** %7
%9 = getelementptr inbounds [2 x i16*], [2 x i16*]* %3, i64 0, i64 1
%10 = bitcast i16** %9 to i32**
store i32* %2, i32** %10
%11 = call i32 @setToZero(i16** %7)
ret i32 0
}
void foo268(int p) {}


x86 assembly (clang, -O0):
<foo268>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @foo268(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret void
}

LLVM IR (-O2):
define void @foo268(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ useSockets();
void test6(void) { useSockets(); }


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

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

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

LLVM IR (-O2):
define void @test6() {
%1 = tail call i32 (...) @useSockets()
ret void
}
/* Variables and functions */
scalar_t__ strcspn(char const *, char *);
scalar_t__ strlen(char const *);
int is_valid_powercap_control_type(const char *control_type) {
  return control_type && strlen(control_type) &&
         strcspn(control_type, "./") == strlen(control_type);
}


x86 assembly (clang, -O0):
<is_valid_powercap_control_type>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     1184 <is_valid_powercap_control_type+0x64>
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x9(%rbp)
je     1184 <is_valid_powercap_control_type+0x64>
mov    -0x8(%rbp),%rdi
lea    0xe9e(%rip),%rsi
call   1040 <strcspn@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
cmp    %rcx,%rax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_valid_powercap_control_type>:
push   %rbp
push   %r14
push   %rbx
xor    %ebp,%ebp
test   %rdi,%rdi
je     1153 <is_valid_powercap_control_type+0x33>
mov    %rdi,%rbx
call   1030 <strlen@plt>
test   %rax,%rax
je     1153 <is_valid_powercap_control_type+0x33>
mov    %rax,%r14
lea    0xebe(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcspn@plt>
xor    %ebp,%ebp
cmp    %r14,%rax
sete   %bpl
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"./\00"
define i32 @is_valid_powercap_control_type(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %15
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i64 @strlen(i8* %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %15
9: ; preds = %5
%10 = load i8*, i8** %2
%11 = call i64 @strcspn(i8* %10, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%12 = load i8*, i8** %2
%13 = call i64 @strlen(i8* %12)
%14 = icmp eq i64 %11, %13
br label %15
15: ; preds = %9, %5, %1
%16 = phi i1 [ false, %5 ], [ false, %1 ], [ %14, %9 ]
%17 = zext i1 %16 to i32
ret i32 %17
}

LLVM IR (-O2):
@.str = [3 x i8] c"./\00"
define i32 @is_valid_powercap_control_type(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %10, label %3
3: ; preds = %1
%4 = tail call i64 @strlen(i8* %0)
%5 = icmp eq i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %3
%7 = tail call i64 @strcspn(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%8 = icmp eq i64 %7, %4
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %6, %3, %1
%11 = phi i32 [ 0, %3 ], [ 0, %1 ], [ %9, %6 ]
ret i32 %11
}
/* Variables and functions */
float powf(float, int);
float cubic_in(float step, float max_steps, float max_val) {
  float ratio = step / max_steps;
  return max_val * powf(ratio, 3);
}


x86 assembly (clang, -O0):
<cubic_in>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
divss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x10(%rbp),%xmm0
mov    $0x3,%edi
call   1030 <powf@plt>
movaps %xmm0,%xmm1
movss  -0x14(%rbp),%xmm0
mulss  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cubic_in>:
push   %rax
movss  %xmm2,0x4(%rsp)
divss  %xmm1,%xmm0
mov    $0x3,%edi
call   1030 <powf@plt>
mulss  0x4(%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @cubic_in(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%8 = load float, float* %4
%9 = load float, float* %5
%10 = fdiv float %8, %9
store float %10, float* %7
%11 = load float, float* %6
%12 = load float, float* %7
%13 = call float @powf(float %12, i32 3)
%14 = fmul float %11, %13
ret float %14
}

LLVM IR (-O2):
define float @cubic_in(float %0, float %1, float %2) {
%4 = fdiv float %0, %1
%5 = tail call float @powf(float %4, i32 3)
%6 = fmul float %5, %2
ret float %6
}
/* Variables and functions */
int /*<<< orphan*/
UpnpResponse_ConnectionManager_GetProtocolInfo(void *, char *, char *);
int /*<<< orphan*/ printf(char *);
void UpnpConnectionManager_GetProtocolInfo(void *upnptoken) {
  printf("Invoke: UpnpConnectionManager_GetProtocolInfo();\r\n");
  UpnpResponse_ConnectionManager_GetProtocolInfo(upnptoken, "Sample String",
                                                 "Sample String");
}


x86 assembly (clang, -O0):
<UpnpConnectionManager_GetProtocolInfo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
lea    0xef0(%rip),%rdx
mov    %rdx,%rsi
call   1040 <UpnpResponse_ConnectionManager_GetProtocolInfo@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UpnpConnectionManager_GetProtocolInfo>:
push   %rbx
mov    %rdi,%rbx
lea    0xee3(%rip),%rdi
call   1030 <puts@plt>
lea    0xec9(%rip),%rdx
mov    %rbx,%rdi
mov    %rdx,%rsi
pop    %rbx
jmp    1040 <UpnpResponse_ConnectionManager_GetProtocolInfo@plt>

LLVM IR (-O0):
@.str = [51 x i8] c"Invoke: UpnpConnectionManager_GetProtocolInfo();\0D\0A\00"
@.str.1 = [14 x i8] c"Sample String\00"
define void @UpnpConnectionManager_GetProtocolInfo(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 @UpnpResponse_ConnectionManager_GetProtocolInfo(i8* %4, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [14 x i8] c"Sample String\00"
@str = [50 x i8] c"Invoke: UpnpConnectionManager_GetProtocolInfo();\0D\00"
define void @UpnpConnectionManager_GetProtocolInfo(i8* %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @UpnpResponse_ConnectionManager_GetProtocolInfo(i8* %0, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int lengthOfLongestSubstring(char *);
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  char *s = "abcdabcbb";
  int length = lengthOfLongestSubstring(s);
  printf("%d\n", length);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [10 x i8] c"abcdabcbb\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @lengthOfLongestSubstring(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void grpcsharp_request_call_context_method() {
  fprintf(stderr, "Should never reach here");
  abort();
}


x86 assembly (clang, -O0):
<grpcsharp_request_call_context_method>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<grpcsharp_request_call_context_method>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [24 x i8] c"Should never reach here\00"
define void @grpcsharp_request_call_context_method() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [24 x i8] c"Should never reach here\00"
define void @grpcsharp_request_call_context_method() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @abort()
unreachable
}
int *K(k) { return L(E(k[(int *)V(17)]), 0); }


x86 assembly (clang, -O0):
<K>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0x11,%edi
mov    $0x0,%al
call   1030 <V@plt>
mov    -0x8(%rbp),%ecx
cltq
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%edi
mov    $0x0,%al
call   1050 <E@plt>
mov    %eax,%edi
xor    %esi,%esi
mov    $0x0,%al
call   1040 <L@plt>
cltq
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<K>:
push   %rbx
mov    %edi,%ebx
mov    $0x11,%edi
xor    %eax,%eax
call   1030 <V@plt>
cltq
movslq %ebx,%rcx
mov    (%rax,%rcx,4),%edi
xor    %eax,%eax
call   1050 <E@plt>
mov    %eax,%edi
xor    %esi,%esi
xor    %eax,%eax
call   1040 <L@plt>
cltq
pop    %rbx
ret

LLVM IR (-O0):
define i32* @K(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 (i32, ...) bitcast (i32 (...)* @V to i32 (i32, ...)*)(i32 17)
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i32*
%7 = sext i32 %3 to i64
%8 = getelementptr inbounds i32, i32* %6, i64 %7
%9 = load i32, i32* %8
%10 = call i32 (i32, ...) bitcast (i32 (...)* @E to i32 (i32, ...)*)(i32 %9)
%11 = call i32 (i32, i32, ...) bitcast (i32 (...)* @L to i32 (i32, i32, ...)*)(i32 %10, i32 0)
%12 = sext i32 %11 to i64
%13 = inttoptr i64 %12 to i32*
ret i32* %13
}

LLVM IR (-O2):
define i32* @K(i32 %0) {
%2 = tail call i32 (i32, ...) bitcast (i32 (...)* @V to i32 (i32, ...)*)(i32 17)
%3 = sext i32 %2 to i64
%4 = inttoptr i64 %3 to i32*
%5 = sext i32 %0 to i64
%6 = getelementptr inbounds i32, i32* %4, i64 %5
%7 = load i32, i32* %6
%8 = tail call i32 (i32, ...) bitcast (i32 (...)* @E to i32 (i32, ...)*)(i32 %7)
%9 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @L to i32 (i32, i32, ...)*)(i32 %8, i32 0)
%10 = sext i32 %9 to i64
%11 = inttoptr i64 %10 to i32*
ret i32* %11
}
void mdp4_dsi_blt_dmap_busy_wait(struct msm_fb_data_type *mfd) {}


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

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

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

LLVM IR (-O2):
%struct.msm_fb_data_type = type opaque
define void @mdp4_dsi_blt_dmap_busy_wait(%struct.msm_fb_data_type* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ TtlOpenDevice();
void TtlInit(void) { TtlOpenDevice(); }


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

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

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

LLVM IR (-O2):
define void @TtlInit() {
%1 = tail call i32 (...) @TtlOpenDevice()
ret void
}
int isOperator(char c) {
  int result = 0;
  switch (c) {
  case '^':
  case '*':
  case '/':
  case '%':
  case '+':
  case '-':
    result = 1;
    break;
  default:
    break;
  }
  return result;
}


x86 assembly (clang, -O0):
<isOperator>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movl   $0x0,-0x8(%rbp)
movsbl -0x1(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x25,%eax
je     116d <isOperator+0x6d>
jmp    1126 <isOperator+0x26>
mov    -0xc(%rbp),%eax
add    $0xffffffd6,%eax
sub    $0x2,%eax
jb     116d <isOperator+0x6d>
jmp    113a <isOperator+0x3a>
mov    -0xc(%rbp),%eax
sub    $0x2d,%eax
je     116d <isOperator+0x6d>
jmp    114b <isOperator+0x4b>
mov    -0xc(%rbp),%eax
sub    $0x2f,%eax
je     116d <isOperator+0x6d>
jmp    115c <isOperator+0x5c>
mov    -0xc(%rbp),%eax
sub    $0x5e,%eax
jne    1179 <isOperator+0x79>
jmp    116d <isOperator+0x6d>
movl   $0x1,-0x8(%rbp)
jmp    117e <isOperator+0x7e>
jmp    117e <isOperator+0x7e>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isOperator>:
xor    %eax,%eax
add    $0xffffffdb,%edi
cmp    $0x39,%edi
ja     111f <isOperator+0x1f>
movabs $0x200000000000561,%rcx
bt     %rdi,%rcx
jae    111f <isOperator+0x1f>
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @isOperator(i8 signext %0) {
%2 = alloca i8
%3 = alloca i32
store i8 %0, i8* %2
store i32 0, i32* %3
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
switch i32 %5, label %7 [
i32 94, label %6
i32 42, label %6
i32 47, label %6
i32 37, label %6
i32 43, label %6
i32 45, label %6
]
6: ; preds = %1, %1, %1, %1, %1, %1
store i32 1, i32* %3
br label %8
7: ; preds = %1
br label %8
8: ; preds = %7, %6
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @isOperator(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %4 [
i32 94, label %3
i32 42, label %3
i32 47, label %3
i32 37, label %3
i32 43, label %3
i32 45, label %3
]
3: ; preds = %1, %1, %1, %1, %1, %1
br label %4
4: ; preds = %1, %3
%5 = phi i32 [ 0, %1 ], [ 1, %3 ]
ret i32 %5
}
void delay_ms(unsigned int ms) {
  int i;
  while (ms > 0) {
    for (i = 0; i < 54; i++)
      ;
    ms--;
  }
}


x86 assembly (clang, -O0):
<delay_ms>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jbe    1143 <delay_ms+0x43>
movl   $0x0,-0x8(%rbp)
cmpl   $0x36,-0x8(%rbp)
jge    1135 <delay_ms+0x35>
jmp    1127 <delay_ms+0x27>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1118 <delay_ms+0x18>
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
jmp    1107 <delay_ms+0x7>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @delay_ms(i32 %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ ReadUint32Be(void const *, int /*<<< orphan*/ *);
int32_t ReadInt32Be(const void *in, int32_t *value) {
  return ReadUint32Be(in, (uint32_t *)value);
}


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

x86 assembly (clang, -O2):
<ReadInt32Be>:
jmp    1030 <ReadUint32Be@plt>

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

LLVM IR (-O2):
define i32 @ReadInt32Be(i8* %0, i32* %1) {
%3 = tail call i32 @ReadUint32Be(i8* %0, i32* %1)
ret i32 %3
}
/* Variables and functions */
char *copy_stack_string(uintptr_t *, char *);
void copy_stack_strings(uintptr_t *stack_alloc, char **strings,
                        char **strings_end) {
  char **p;
  for (p = strings_end; p > strings;) {
    --p;
    *p = copy_stack_string(stack_alloc, *p);
  }
}


x86 assembly (clang, -O0):
<copy_stack_strings>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x10(%rbp),%rax
jbe    1165 <copy_stack_strings+0x55>
mov    -0x20(%rbp),%rax
add    $0xfffffffffffffff8,%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rax
mov    (%rax),%rsi
call   1030 <copy_stack_string@plt>
mov    %rax,%rcx
mov    -0x20(%rbp),%rax
mov    %rcx,(%rax)
jmp    112c <copy_stack_strings+0x1c>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_stack_strings>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
cmp    %rsi,%rdx
jbe    114c <copy_stack_strings+0x3c>
mov    %rdx,%rbx
mov    %rsi,%r15
mov    %rdi,%r14
cs nopw 0x0(%rax,%rax,1)
lea    -0x8(%rbx),%r12
mov    -0x8(%rbx),%rsi
mov    %r14,%rdi
call   1030 <copy_stack_string@plt>
mov    %rax,-0x8(%rbx)
mov    %r12,%rbx
cmp    %r15,%r12
ja     1130 <copy_stack_strings+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @copy_stack_strings(i64* %0, i8** readnone %1, i8** %2) {
%4 = icmp ugt i8** %2, %1
br i1 %4, label %5, label %11
5: ; preds = %3, %5
%6 = phi i8** [ %7, %5 ], [ %2, %3 ]
%7 = getelementptr inbounds i8*, i8** %6, i64 -1
%8 = load i8*, i8** %7
%9 = tail call i8* @copy_stack_string(i64* %0, i8* %8)
store i8* %9, i8** %7
%10 = icmp ugt i8** %7, %1
br i1 %10, label %5, label %11
11: ; preds = %5, %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ EVP_CIPHER;

/* Variables and functions */
int /*<<< orphan*/ const *EVP_aes_128_cfb128();
const EVP_CIPHER *EVP_aes_128_cfb(void) { return EVP_aes_128_cfb128(); }


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

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

LLVM IR (-O0):
define i32* @EVP_aes_128_cfb() {
%1 = call i32* (...) @EVP_aes_128_cfb128()
ret i32* %1
}

LLVM IR (-O2):
define i32* @EVP_aes_128_cfb() {
%1 = tail call i32* (...) @EVP_aes_128_cfb128()
ret i32* %1
}
/* Variables and functions */
long double __infer_nondet_long_double();
long double cosl(long double x) { return __infer_nondet_long_double(); }


x86 assembly (clang, -O0):
<cosl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
xor    %eax,%eax
call   1030 <__infer_nondet_long_double@plt>
fld    %st(0)
fstp   %st(0)
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define x86_fp80 @cosl(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = call x86_fp80 (...) @__infer_nondet_long_double()
ret x86_fp80 %3
}

LLVM IR (-O2):
define x86_fp80 @cosl(x86_fp80 %0) {
%2 = tail call x86_fp80 (...) @__infer_nondet_long_double()
ret x86_fp80 %2
}
unsigned char menu_font_heigth(unsigned char font) {
  if (font < 2)
    return 7;
  return 8;
}


x86 assembly (clang, -O0):
<menu_font_heigth>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movzbl -0x2(%rbp),%eax
cmp    $0x2,%eax
jge    1120 <menu_font_heigth+0x20>
movb   $0x7,-0x1(%rbp)
jmp    1124 <menu_font_heigth+0x24>
movb   $0x8,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<menu_font_heigth>:
cmp    $0x2,%dil
mov    $0x8,%al
sbb    $0x0,%al
ret

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

LLVM IR (-O2):
define zeroext i8 @menu_font_heigth(i8 zeroext %0) {
%2 = icmp ult i8 %0, 2
%3 = select i1 %2, i8 7, i8 8
ret i8 %3
}
/* Variables and functions */
char *mstring_createNew(int);
char *mstring_space(void) {
  char *m = mstring_createNew(2);
  *m = ' ';
  *(m + 1) = '\0';
  return m;
}


x86 assembly (clang, -O0):
<mstring_space>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x2,%edi
call   1030 <mstring_createNew@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movb   $0x20,(%rax)
mov    -0x8(%rbp),%rax
movb   $0x0,0x1(%rax)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mstring_space>:
push   %rax
mov    $0x2,%edi
call   1030 <mstring_createNew@plt>
movw   $0x20,(%rax)
pop    %rcx
ret

LLVM IR (-O0):
define i8* @mstring_space() {
%1 = alloca i8*
%2 = call i8* @mstring_createNew(i32 2)
store i8* %2, i8** %1
%3 = load i8*, i8** %1
store i8 32, i8* %3
%4 = load i8*, i8** %1
%5 = getelementptr inbounds i8, i8* %4, i64 1
store i8 0, i8* %5
%6 = load i8*, i8** %1
ret i8* %6
}

LLVM IR (-O2):
define i8* @mstring_space() {
%1 = tail call i8* @mstring_createNew(i32 2)
store i8 32, i8* %1
%2 = getelementptr inbounds i8, i8* %1, i64 1
store i8 0, i8* %2
ret i8* %1
}
/* Variables and functions */
int /*<<< orphan*/ sleep(unsigned int);
void fild_Sleep(unsigned int seconds) {
  sleep(seconds);
  return;
}


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

x86 assembly (clang, -O2):
<fild_Sleep>:
jmp    1030 <sleep@plt>

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

LLVM IR (-O2):
define void @fild_Sleep(i32 %0) {
%2 = tail call i32 @sleep(i32 %0)
ret void
}
int _strcmp(char *s, char *t) {
  for (; *s == *t; s++, t++)
    if (*s == '\0')
      return 0;
  return *s - *t;
}


x86 assembly (clang, -O0):
<_strcmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
mov    -0x18(%rbp),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
jne    1160 <_strcmp+0x60>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    113e <_strcmp+0x3e>
movl   $0x0,-0x4(%rbp)
jmp    1173 <_strcmp+0x73>
jmp    1143 <_strcmp+0x43>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    110c <_strcmp+0xc>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
mov    -0x18(%rbp),%rcx
movsbl (%rcx),%ecx
sub    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_strcmp>:
mov    (%rdi),%al
mov    (%rsi),%cl
cmp    %cl,%al
jne    1124 <_strcmp+0x24>
mov    $0x1,%edx
nopl   (%rax)
test   %al,%al
je     112d <_strcmp+0x2d>
movzbl (%rdi,%rdx,1),%eax
movzbl (%rsi,%rdx,1),%ecx
add    $0x1,%rdx
cmp    %cl,%al
je     1110 <_strcmp+0x10>
movsbl %al,%eax
movsbl %cl,%ecx
sub    %ecx,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @_strcmp(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = load i8, i8* %1
%5 = icmp eq i8 %3, %4
br i1 %5, label %6, label %17
6: ; preds = %2, %11
%7 = phi i8 [ %14, %11 ], [ %3, %2 ]
%8 = phi i8* [ %13, %11 ], [ %1, %2 ]
%9 = phi i8* [ %12, %11 ], [ %0, %2 ]
%10 = icmp eq i8 %7, 0
br i1 %10, label %23, label %11
11: ; preds = %6
%12 = getelementptr inbounds i8, i8* %9, i64 1
%13 = getelementptr inbounds i8, i8* %8, i64 1
%14 = load i8, i8* %12
%15 = load i8, i8* %13
%16 = icmp eq i8 %14, %15
br i1 %16, label %6, label %17
17: ; preds = %11, %2
%18 = phi i8 [ %3, %2 ], [ %14, %11 ]
%19 = phi i8 [ %4, %2 ], [ %15, %11 ]
%20 = sext i8 %18 to i32
%21 = sext i8 %19 to i32
%22 = sub nsw i32 %20, %21
br label %23
23: ; preds = %6, %17
%24 = phi i32 [ %22, %17 ], [ 0, %6 ]
ret i32 %24
}
/* Variables and functions */
int __parse_common(void *, int *, int *, char *);
int trace_parse_common_type(void *data) {
  static int type_offset;
  static int type_size;
  return __parse_common(data, &type_size, &type_offset, "common_type");
}


x86 assembly (clang, -O0):
<trace_parse_common_type>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0x2f09(%rip),%rsi
lea    0x2efe(%rip),%rdx
lea    0xecb(%rip),%rcx
call   1030 <__parse_common@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<trace_parse_common_type>:
lea    0x2f19(%rip),%rsi
lea    0x2f0e(%rip),%rdx
lea    0xedb(%rip),%rcx
jmp    1030 <__parse_common@plt>

LLVM IR (-O0):
@trace_parse_common_type.type_offset = internal global i32 0
@trace_parse_common_type.type_size = internal global i32 0
@.str = [12 x i8] c"common_type\00"
define i32 @trace_parse_common_type(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @__parse_common(i8* %3, i32* @trace_parse_common_type.type_size, i32* @trace_parse_common_type.type_offset, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret i32 %4
}

LLVM IR (-O2):
@trace_parse_common_type.type_offset = internal global i32 0
@trace_parse_common_type.type_size = internal global i32 0
@.str = [12 x i8] c"common_type\00"
define i32 @trace_parse_common_type(i8* %0) {
%2 = tail call i32 @__parse_common(i8* %0, i32* @trace_parse_common_type.type_size, i32* @trace_parse_common_type.type_offset, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ __emit_expression_range(int /*<<< orphan*/,
                                           int /*<<< orphan*/);
void test_comma_operator(int a, int b) {
  __emit_expression_range(0, (a++, a + b));
}


x86 assembly (clang, -O0):
<test_comma_operator>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
add    -0x8(%rbp),%esi
xor    %edi,%edi
call   1030 <__emit_expression_range@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_comma_operator>:
add    %edi,%esi
add    $0x1,%esi
xor    %edi,%edi
jmp    1030 <__emit_expression_range@plt>

LLVM IR (-O0):
define void @test_comma_operator(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 = add nsw i32 %5, 1
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = add nsw i32 %7, %8
%10 = call i32 @__emit_expression_range(i32 0, i32 %9)
ret void
}

LLVM IR (-O2):
define void @test_comma_operator(i32 %0, i32 %1) {
%3 = add nsw i32 %0, 1
%4 = add nsw i32 %3, %1
%5 = tail call i32 @__emit_expression_range(i32 0, i32 %4)
ret void
}
void um_mutex_fini(void) {}


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

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

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

LLVM IR (-O2):
define void @um_mutex_fini() {
ret void
}
int x(int n) { return (n); }


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

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

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

LLVM IR (-O2):
define i32 @x(i32 returned %0) {
ret i32 %0
}
int mod(int a, int b) {
  int z = a - b;
  if (z > 0)
    return z;
  else
    return -z;
}


x86 assembly (clang, -O0):
<mod>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jle    1128 <mod+0x28>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1130 <mod+0x30>
xor    %eax,%eax
sub    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mod>:
sub    %esi,%edi
mov    %edi,%eax
neg    %eax
cmovs  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @mod(i32 %0, i32 %1) {
%3 = sub nsw i32 %0, %1
%4 = tail call i32 @llvm.abs.i32(i32 %3, i1 true)
ret i32 %4
}
/* Variables and functions */
int warning(char *, char, char);
int main(void) { return warning("This # not #", 'A', 'C'); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x41,%esi
mov    $0x43,%edx
call   1030 <warning@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
lea    0xee9(%rip),%rdi
mov    $0x41,%esi
mov    $0x43,%edx
jmp    1030 <warning@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"This # not #\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @warning(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8 signext 65, i8 signext 67)
ret i32 %2
}

LLVM IR (-O2):
@.str = [13 x i8] c"This # not #\00"
define i32 @main() {
%1 = tail call i32 @warning(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8 signext 65, i8 signext 67)
ret i32 %1
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ display;
};
typedef TYPE_1__ XDestroyWindowEvent;

/* Variables and functions */
void *get_XDestroyWindowEvent_display(void *_p) {
  return (void *)((XDestroyWindowEvent *)_p)->display;
}


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

x86 assembly (clang, -O2):
<get_XDestroyWindowEvent_display>:
mov    (%rdi),%rax
ret

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

LLVM IR (-O2):
define i8* @get_XDestroyWindowEvent_display(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}