xunge/DecIR huggingface dataset:
/* Variables and functions */
char *lex_decode(char *str) {
  char *p;
  if (!str)
    return (NULL);
  for (p = str; *p; p++) {
    *p &= 0x7F;
  }
  return (str);
}


x86 assembly (clang, -O0):
<lex_decode>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1120 <lex_decode+0x20>
movq   $0x0,-0x8(%rbp)
jmp    115a <lex_decode+0x5a>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
je     1152 <lex_decode+0x52>
mov    -0x18(%rbp),%rax
movsbl (%rax),%ecx
and    $0x7f,%ecx
mov    %cl,(%rax)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1128 <lex_decode+0x28>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lex_decode>:
mov    %rdi,%rax
test   %rdi,%rdi
je     1131 <lex_decode+0x31>
mov    (%rax),%cl
test   %cl,%cl
je     1131 <lex_decode+0x31>
lea    0x1(%rax),%rdx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
and    $0x7f,%cl
mov    %cl,-0x1(%rdx)
movzbl (%rdx),%ecx
add    $0x1,%rdx
test   %cl,%cl
jne    1120 <lex_decode+0x20>
ret

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

LLVM IR (-O2):
define i8* @lex_decode(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %13, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %13, label %6
6: ; preds = %3, %6
%7 = phi i8 [ %11, %6 ], [ %4, %3 ]
%8 = phi i8* [ %10, %6 ], [ %0, %3 ]
%9 = and i8 %7, 127
store i8 %9, i8* %8
%10 = getelementptr inbounds i8, i8* %8, i64 1
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %6
13: ; preds = %6, %3, %1
ret i8* %0
}
extern int isMember(unsigned int set, int element) {
  return (set & (1 << element));
}


x86 assembly (clang, -O0):
<isMember>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isMember>:
mov    %esi,%ecx
mov    $0x1,%eax
shl    %cl,%eax
and    %edi,%eax
ret

LLVM IR (-O0):
define i32 @isMember(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = shl i32 1, %6
%8 = and i32 %5, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @isMember(i32 %0, i32 %1) {
%3 = shl nuw i32 1, %1
%4 = and i32 %3, %0
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ glutIdleFunc(int /*<<< orphan*/ *);
void delayed_stop(int value) { glutIdleFunc(NULL); }


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

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

LLVM IR (-O0):
define void @delayed_stop(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @glutIdleFunc(i32* null)
ret void
}

LLVM IR (-O2):
define void @delayed_stop(i32 %0) {
%2 = tail call i32 @glutIdleFunc(i32* null)
ret void
}
/* Variables and functions */
int ulz77_encode_data(unsigned char **, size_t *, unsigned char *, size_t,
                      int /*<<< orphan*/);
int ulz77_compress_data(unsigned char **dst_out, size_t *dst_out_len,
                        unsigned char *src, size_t src_len) {
  return ulz77_encode_data(dst_out, dst_out_len, src, src_len, 0);
}


x86 assembly (clang, -O0):
<ulz77_compress_data>:
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),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
xor    %r8d,%r8d
call   1030 <ulz77_encode_data@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ulz77_compress_data>:
xor    %r8d,%r8d
jmp    1030 <ulz77_encode_data@plt>

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

LLVM IR (-O2):
define i32 @ulz77_compress_data(i8** %0, i64* %1, i8* %2, i64 %3) {
%5 = tail call i32 @ulz77_encode_data(i8** %0, i64* %1, i8* %2, i64 %3, i32 0)
ret i32 %5
}
void removeElementFromBuffer(void *buffer, int *nbE) {
  *nbE > 0 ? (*nbE--) : (*nbE = 0);
}


x86 assembly (clang, -O0):
<removeElementFromBuffer>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpl   $0x0,(%rax)
jle    112f <removeElementFromBuffer+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0xfffffffffffffffc,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%eax
jmp    1139 <removeElementFromBuffer+0x39>
mov    -0x10(%rbp),%rax
movl   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<removeElementFromBuffer>:
cmpl   $0x0,(%rsi)
jle    1106 <removeElementFromBuffer+0x6>
ret
movl   $0x0,(%rsi)
ret

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

LLVM IR (-O2):
define void @removeElementFromBuffer(i8* nocapture readnone %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = icmp sgt i32 %3, 0
br i1 %4, label %6, label %5
5: ; preds = %2
store i32 0, i32* %1
br label %6
6: ; preds = %2, %5
ret void
}
int fn_2(int flag, int x, int y) {
  if (flag)
    x++;
  y++;
  return x * y;
}


x86 assembly (clang, -O0):
<fn_2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1120 <fn_2+0x20>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
imul   -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn_2>:
cmp    $0x1,%edi
sbb    $0xffffffff,%esi
lea    0x1(%rdx),%eax
imul   %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @fn_2(i32 %0, i32 %1, i32 %2) {
%4 = icmp ne i32 %0, 0
%5 = zext i1 %4 to i32
%6 = add nsw i32 %5, %1
%7 = add nsw i32 %2, 1
%8 = mul nsw i32 %6, %7
ret i32 %8
}
void wpa_debug_open_syslog(void) {}


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

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

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

LLVM IR (-O2):
define void @wpa_debug_open_syslog() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isascii(int);
void t_isascii_0x17() {
  Assert_real((isascii(23)),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isascii.c",
              120, ("isascii should be 1 for 0x17"));
}


x86 assembly (clang, -O0):
<t_isascii_0x17>:
push   %rbp
mov    %rsp,%rbp
mov    $0x17,%edi
call   1030 <isascii@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x78,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isascii_0x17>:
lea    0xee9(%rip),%rsi
lea    0xf8a(%rip),%rcx
mov    $0x1,%edi
mov    $0x78,%edx
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 1 for 0x17\00"
define void @t_isascii_0x17() {
%1 = call i32 @isascii(i32 23)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 120, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 1 for 0x17\00"
define void @t_isascii_0x17() {
%1 = tail call i32 @Assert_real(i32 1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 120, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
struct timespec {
  int tv_sec;
  int tv_nsec;
};

/* Variables and functions */
int /*<<< orphan*/ CLOCK_REALTIME;
scalar_t__ clock_gettime(int /*<<< orphan*/, struct timespec *);
unsigned int get_new_serial(void) {
  struct timespec ts;
  if (clock_gettime(CLOCK_REALTIME, &ts)) {
    ts.tv_sec = 0;
    ts.tv_nsec = 0;
  }
  return (unsigned int)(ts.tv_nsec << 12 | ts.tv_sec);
}


x86 assembly (clang, -O0):
<get_new_serial>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ec1(%rip),%rax
mov    (%rax),%edi
lea    -0x8(%rbp),%rsi
call   1030 <clock_gettime@plt>
cmp    $0x0,%rax
je     1142 <get_new_serial+0x32>
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0xc,%eax
or     -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_new_serial>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
mov    %rsp,%rsi
call   1030 <clock_gettime@plt>
mov    0x4(%rsp),%edx
shl    $0xc,%edx
or     (%rsp),%edx
xor    %ecx,%ecx
test   %rax,%rax
cmove  %edx,%ecx
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.timespec = type { i32, i32 }
@CLOCK_REALTIME = global i32 0
define i32 @get_new_serial() {
%1 = alloca %struct.timespec
%2 = load i32, i32* @CLOCK_REALTIME
%3 = call i64 @clock_gettime(i32 %2, %struct.timespec* %1)
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %0
%6 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 0
store i32 0, i32* %6
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 1
store i32 0, i32* %7
br label %8
8: ; preds = %5, %0
%9 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 1
%10 = load i32, i32* %9
%11 = shl i32 %10, 12
%12 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 0
%13 = load i32, i32* %12
%14 = or i32 %11, %13
ret i32 %14
}

LLVM IR (-O2):
%struct.timespec = type { i32, i32 }
@CLOCK_REALTIME = global i32 0
define i32 @get_new_serial() {
%1 = alloca %struct.timespec
%2 = bitcast %struct.timespec* %1 to i8*
%3 = load i32, i32* @CLOCK_REALTIME
%4 = call i64 @clock_gettime(i32 %3, %struct.timespec* %1)
%5 = icmp eq i64 %4, 0
%6 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 1
%7 = load i32, i32* %6
%8 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
%9 = load i32, i32* %8
%10 = shl i32 %7, 12
%11 = or i32 %10, %9
%12 = select i1 %5, i32 %11, i32 0
ret i32 %12
}
void *test_anti_range_87(unsigned char n) {
  extern void *alloc_anti_range_87(unsigned char)
      __attribute__((alloc_size(1)));
  if ((0x7f * 2 + 1) - 2 <= n && n <= (0x7f * 2 + 1) - 1)
    n = (0x7f * 2 + 1) - 2 - 1;
  return alloc_anti_range_87(n);
}


x86 assembly (clang, -O0):
<test_anti_range_87>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%ecx
mov    $0xfd,%eax
cmp    %ecx,%eax
jg     1142 <test_anti_range_87+0x32>
movzbl -0x1(%rbp),%eax
cmp    $0xfe,%eax
jg     1142 <test_anti_range_87+0x32>
movb   $0xfc,-0x1(%rbp)
movzbl -0x1(%rbp),%edi
call   1030 <alloc_anti_range_87@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_anti_range_87>:
lea    0x3(%rdi),%eax
cmp    $0x2,%al
mov    $0xfc,%eax
cmovb  %eax,%edi
jmp    1030 <alloc_anti_range_87@plt>

LLVM IR (-O0):
define i8* @test_anti_range_87(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = icmp sle i32 253, %4
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load i8, i8* %2
%8 = zext i8 %7 to i32
%9 = icmp sle i32 %8, 254
br i1 %9, label %10, label %11
10: ; preds = %6
store i8 -4, i8* %2
br label %11
11: ; preds = %10, %6, %1
%12 = load i8, i8* %2
%13 = call i8* @alloc_anti_range_87(i8 zeroext %12)
ret i8* %13
}

LLVM IR (-O2):
define i8* @test_anti_range_87(i8 zeroext %0) {
%2 = add i8 %0, 3
%3 = icmp ult i8 %2, 2
%4 = select i1 %3, i8 -4, i8 %0
%5 = tail call i8* @alloc_anti_range_87(i8 zeroext %4)
ret i8* %5
}
/* Variables and functions */
int floatToRawIntBits(float);
float const intBitsToFloat(int);
__attribute__((always_)) const float upperf(float d) {
  return intBitsToFloat(floatToRawIntBits(d) & 0xfffff000);
}


x86 assembly (clang, -O0):
<upperf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1040 <floatToRawIntBits@plt>
mov    %eax,%edi
and    $0xfffff000,%edi
call   1030 <intBitsToFloat@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<upperf>:
push   %rax
call   1040 <floatToRawIntBits@plt>
and    $0xfffff000,%eax
mov    %eax,%edi
pop    %rax
jmp    1030 <intBitsToFloat@plt>

LLVM IR (-O0):
define float @upperf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call i32 @floatToRawIntBits(float %3)
%5 = and i32 %4, -4096
%6 = call float @intBitsToFloat(i32 %5)
ret float %6
}

LLVM IR (-O2):
define float @upperf(float %0) {
%2 = tail call i32 @floatToRawIntBits(float %0)
%3 = and i32 %2, -4096
%4 = tail call float @intBitsToFloat(i32 %3)
ret float %4
}
/* Type definitions */
struct bloom {
  int dummy;
};

/* Variables and functions */
int bloom_init(struct bloom *, int, double);
int bloom_init_size(struct bloom *bloom, int entries, double error,
                    unsigned int cache_size) {
  return bloom_init(bloom, entries, error);
}


x86 assembly (clang, -O0):
<bloom_init_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movsd  %xmm0,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
movsd  -0x18(%rbp),%xmm0
call   1030 <bloom_init@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bloom_init_size>:
jmp    1030 <bloom_init@plt>

LLVM IR (-O0):
%struct.bloom = type { i32 }
define i32 @bloom_init_size(%struct.bloom* %0, i32 %1, double %2, i32 %3) {
%5 = alloca %struct.bloom*
%6 = alloca i32
%7 = alloca double
%8 = alloca i32
store %struct.bloom* %0, %struct.bloom** %5
store i32 %1, i32* %6
store double %2, double* %7
store i32 %3, i32* %8
%9 = load %struct.bloom*, %struct.bloom** %5
%10 = load i32, i32* %6
%11 = load double, double* %7
%12 = call i32 @bloom_init(%struct.bloom* %9, i32 %10, double %11)
ret i32 %12
}

LLVM IR (-O2):
%struct.bloom = type { i32 }
define i32 @bloom_init_size(%struct.bloom* %0, i32 %1, double %2, i32 %3) {
%5 = tail call i32 @bloom_init(%struct.bloom* %0, i32 %1, double %2)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
int /*<<< orphan*/ scanf(char *, double *);
int main(int argc, char *argv[]) {
  double a;
  scanf("%lf", &a);
  printf("%.2f", a);
  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)
lea    0xec3(%rip),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <scanf@plt>
movsd  -0x18(%rbp),%xmm0
lea    0xeb2(%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
mov    %rsp,%rsi
call   1040 <scanf@plt>
movsd  (%rsp),%xmm0
lea    0xec8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%lf\00"
@.str.1 = [5 x i8] c"%.2f\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca double
%4 = bitcast double* %3 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %3)
%6 = load double, double* %3
%7 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double %6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ test_parser_sourcefile(char *, char *);
int /*<<< orphan*/ test_parser_verify_parse(int /*<<< orphan*/, char *, char *,
                                            char *, int /*<<< orphan*/);
void test_actionscript_comments() {
  test_parser_verify_parse(test_parser_sourcefile("actionscript", " //comment"),
                           "actionscript", "", "//comment", 0);
}


x86 assembly (clang, -O0):
<test_actionscript_comments>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xedb(%rip),%rsi
call   1030 <test_parser_sourcefile@plt>
mov    %eax,%edi
lea    0xec0(%rip),%rsi
lea    0xed0(%rip),%rdx
lea    0xec0(%rip),%rcx
xor    %r8d,%r8d
call   1040 <test_parser_verify_parse@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_actionscript_comments>:
push   %rbx
lea    0xed8(%rip),%rbx
lea    0xede(%rip),%rsi
mov    %rbx,%rdi
call   1030 <test_parser_sourcefile@plt>
lea    0xed9(%rip),%rdx
lea    0xec9(%rip),%rcx
mov    %eax,%edi
mov    %rbx,%rsi
xor    %r8d,%r8d
pop    %rbx
jmp    1040 <test_parser_verify_parse@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"actionscript\00"
@.str.1 = [11 x i8] c" //comment\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [10 x i8] c"//comment\00"
define void @test_actionscript_comments() {
%1 = call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 @test_parser_verify_parse(i32 %1, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i32 0)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"actionscript\00"
@.str.1 = [11 x i8] c" //comment\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [10 x i8] c"//comment\00"
define void @test_actionscript_comments() {
%1 = tail call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @test_parser_verify_parse(i32 %1, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i32 0)
ret void
}
/* Variables and functions */
int EOF;
int return_eof(void) { return (EOF); }


x86 assembly (clang, -O0):
<return_eof>:
push   %rbp
mov    %rsp,%rbp
mov    0x2edd(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<return_eof>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
@EOF = global i32 0
define i32 @return_eof() {
%1 = load i32, i32* @EOF
ret i32 %1
}

LLVM IR (-O2):
@EOF = global i32 0
define i32 @return_eof() {
%1 = load i32, i32* @EOF
ret i32 %1
}
void OTG_HS_WKUP_IRQHandler() {}


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

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

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

LLVM IR (-O2):
define void @OTG_HS_WKUP_IRQHandler() {
ret void
}
/* Variables and functions */
scalar_t__ isalpha(char const);
int skip_alpha(const char *date) {
  int i = 0;
  do {
    i++;
  } while (isalpha(date[i]));
  return i;
}


x86 assembly (clang, -O0):
<skip_alpha>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <isalpha@plt>
cmp    $0x0,%rax
jne    1123 <skip_alpha+0x13>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_alpha>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %ebx,%ebx
nopl   0x0(%rax)
movsbl 0x1(%r14,%rbx,1),%edi
add    $0x1,%rbx
call   1030 <isalpha@plt>
test   %rax,%rax
jne    1120 <skip_alpha+0x10>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @skip_alpha(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %4, %2 ], [ 0, %1 ]
%4 = add nuw nsw i64 %3, 1
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = tail call i64 @isalpha(i8 signext %6)
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %2
9: ; preds = %2
%10 = trunc i64 %4 to i32
ret i32 %10
}
void mplsh(unsigned char u[], int n) {
  int j;
  for (j = 1; j <= n; j++)
    u[j] = u[j + 1];
}


x86 assembly (clang, -O0):
<mplsh>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     1147 <mplsh+0x47>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1112 <mplsh+0x12>
pop    %rbp
ret

x86 assembly (clang, -O2):
<mplsh>:
test   %esi,%esi
jle    112e <mplsh+0x1e>
push   %rax
mov    %rdi,%rax
add    $0x1,%rdi
add    $0x2,%rax
mov    %esi,%edx
mov    %rax,%rsi
call   1030 <memmove@plt>
add    $0x8,%rsp
ret

LLVM IR (-O0):
define void @mplsh(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 1, i32* %5
br label %6
6: ; preds = %21, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp sle i32 %7, %8
br i1 %9, label %10, label %24
10: ; preds = %6
%11 = load i8*, i8** %3
%12 = load i32, i32* %5
%13 = add nsw i32 %12, 1
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8, i8* %11, i64 %14
%16 = load i8, i8* %15
%17 = load i8*, i8** %3
%18 = load i32, i32* %5
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i8, i8* %17, i64 %19
store i8 %16, i8* %20
br label %21
21: ; preds = %10
%22 = load i32, i32* %5
%23 = add nsw i32 %22, 1
store i32 %23, i32* %5
br label %6
24: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @mplsh(i8* nocapture %0, i32 %1) {
%3 = icmp slt i32 %1, 1
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = getelementptr i8, i8* %0, i64 1
%6 = getelementptr i8, i8* %0, i64 2
%7 = zext i32 %1 to i64
br label %8
8: ; preds = %4, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int empty(int *pfront) {
  if (*pfront == -1) {
    printf("Queue is empty\n");
    return 1;
  } else
    return 0;
}


x86 assembly (clang, -O0):
<empty>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpl   $0xffffffff,(%rax)
jne    1141 <empty+0x31>
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1148 <empty+0x38>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<empty>:
push   %rax
xor    %eax,%eax
cmpl   $0xffffffff,(%rdi)
je     111a <empty+0xa>
pop    %rcx
ret
lea    0xedf(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@str = [15 x i8] c"Queue is empty\00"
define i32 @empty(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = icmp eq i32 %2, -1
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ 1, %4 ], [ 0, %1 ]
ret i32 %7
}
long long int foo(long long x, int in1, int in2) {
  short a = (in1 & 0xffff0000) >> 16;
  short b = (in2 & 0xffff0000) >> 16;
  return x + b * a;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
and    $0xffff0000,%eax
shr    $0x10,%eax
mov    %ax,-0x12(%rbp)
mov    -0x10(%rbp),%eax
and    $0xffff0000,%eax
shr    $0x10,%eax
mov    %ax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movswl -0x14(%rbp),%ecx
movswl -0x12(%rbp),%edx
imul   %edx,%ecx
movslq %ecx,%rcx
add    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
sar    $0x10,%edx
sar    $0x10,%esi
imul   %edx,%esi
movslq %esi,%rax
add    %rdi,%rax
ret

LLVM IR (-O0):
define i64 @foo(i64 %0, i32 %1, i32 %2) {
%4 = alloca i64
%5 = alloca i32
%6 = alloca i32
%7 = alloca i16
%8 = alloca i16
store i64 %0, i64* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%9 = load i32, i32* %5
%10 = and i32 %9, -65536
%11 = lshr i32 %10, 16
%12 = trunc i32 %11 to i16
store i16 %12, i16* %7
%13 = load i32, i32* %6
%14 = and i32 %13, -65536
%15 = lshr i32 %14, 16
%16 = trunc i32 %15 to i16
store i16 %16, i16* %8
%17 = load i64, i64* %4
%18 = load i16, i16* %8
%19 = sext i16 %18 to i32
%20 = load i16, i16* %7
%21 = sext i16 %20 to i32
%22 = mul nsw i32 %19, %21
%23 = sext i32 %22 to i64
%24 = add nsw i64 %17, %23
ret i64 %24
}

LLVM IR (-O2):
define i64 @foo(i64 %0, i32 %1, i32 %2) {
%4 = ashr i32 %2, 16
%5 = ashr i32 %1, 16
%6 = mul nsw i32 %4, %5
%7 = sext i32 %6 to i64
%8 = add nsw i64 %7, %0
ret i64 %8
}
/* Variables and functions */
int /*<<< orphan*/ tan(int /*<<< orphan*/);
int /*<<< orphan*/ wStackPopNumber();
int /*<<< orphan*/ wStackPushNumber(int /*<<< orphan*/);
void wBuiltinTan() { wStackPushNumber(tan(wStackPopNumber())); }


x86 assembly (clang, -O0):
<wBuiltinTan>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <wStackPopNumber@plt>
mov    %eax,%edi
call   1050 <tan@plt>
mov    %eax,%edi
call   1040 <wStackPushNumber@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<wBuiltinTan>:
push   %rax
xor    %eax,%eax
call   1030 <wStackPopNumber@plt>
mov    %eax,%edi
call   1050 <tan@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <wStackPushNumber@plt>

LLVM IR (-O0):
define void @wBuiltinTan() {
%1 = call i32 (...) @wStackPopNumber()
%2 = call i32 @tan(i32 %1)
%3 = call i32 @wStackPushNumber(i32 %2)
ret void
}

LLVM IR (-O2):
define void @wBuiltinTan() {
%1 = tail call i32 (...) @wStackPopNumber()
%2 = tail call i32 @tan(i32 %1)
%3 = tail call i32 @wStackPushNumber(i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ rstofill();
untext() {
  rstofill();
  printf(".nf\n");
  printf(".ll \\n(%du\n", 34);
}


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

x86 assembly (clang, -O2):
<untext>:
push   %rax
xor    %eax,%eax
call   1030 <rstofill@plt>
lea    0xecd(%rip),%rdi
call   1040 <puts@plt>
lea    0xeb5(%rip),%rdi
mov    $0x22,%esi
xor    %eax,%eax
pop    %rcx
jmp    1050 <printf@plt>

LLVM IR (-O0):
@.str = [5 x i8] c".nf\0A\00"
@.str.1 = [12 x i8] c".ll \\n(%du\0A\00"
define i32 @untext() {
%1 = alloca i32
%2 = call i32 (...) @rstofill()
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 34)
%5 = load i32, i32* %1
ret i32 %5
}

LLVM IR (-O2):
@.str.1 = [12 x i8] c".ll \\n(%du\0A\00"
@str = [4 x i8] c".nf\00"
define i32 @untext() {
%1 = tail call i32 (...) @rstofill()
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 34)
ret i32 undef
}
void autogroup_task_group(struct task_struct *p, struct task_group **tg) {}


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

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

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

LLVM IR (-O2):
%struct.task_struct = type opaque
%struct.task_group = type opaque
define void @autogroup_task_group(%struct.task_struct* nocapture %0, %struct.task_group** nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void log_error(const char *msg) {
  printf("\x1B[31m"
         "[ALL]"
         "\x1B[0m"
         "\x1B[37m"
         " %s"
         "\x1B[0m"
         "\n",
         msg);
}


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

x86 assembly (clang, -O2):
<log_error>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"\1B[31m[ALL]\1B[0m\1B[37m %s\1B[0m\0A\00"
define void @log_error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [28 x i8] c"\1B[31m[ALL]\1B[0m\1B[37m %s\1B[0m\0A\00"
define void @log_error(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int open(char const *, int const);
int stress_open_timeout(const char *name, const char *path, const int flags,
                        const unsigned long timeout_ns) {
  (void)name;
  (void)timeout_ns;
  return open(path, flags);
}


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

x86 assembly (clang, -O2):
<stress_open_timeout>:
mov    %rsi,%rdi
mov    %edx,%esi
jmp    1030 <open@plt>

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

LLVM IR (-O2):
define i32 @stress_open_timeout(i8* nocapture readnone %0, i8* nocapture %1, i32 %2, i64 %3) {
%5 = tail call i32 @open(i8* %1, i32 %2)
ret i32 %5
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_mode;
};

/* Variables and functions */
scalar_t__ S_ISDIR(int /*<<< orphan*/);
scalar_t__ stat(char const *, struct stat *);
bool isdir(const char *path) {
  struct stat st_buf;
  if (stat(path, &st_buf) < 0)
    return false;
  return S_ISDIR(st_buf.st_mode) != 0;
}


x86 assembly (clang, -O0):
<isdir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <stat@plt>
cmp    $0x0,%rax
jge    114f <isdir+0x2f>
movl   $0x0,-0x4(%rbp)
jmp    1166 <isdir+0x46>
mov    -0x18(%rbp),%edi
call   1030 <S_ISDIR@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isdir>:
push   %rax
mov    %rsp,%rsi
call   1040 <stat@plt>
test   %rax,%rax
js     1143 <isdir+0x23>
mov    (%rsp),%edi
call   1030 <S_ISDIR@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @isdir(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp slt i64 %4, 0
br i1 %5, label %12, label %6
6: ; preds = %1
%7 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%8 = load i32, i32* %7
%9 = call i64 @S_ISDIR(i32 %8)
%10 = icmp ne i64 %9, 0
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %1, %6
%13 = phi i32 [ %11, %6 ], [ 0, %1 ]
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ pthread_exit(int /*<<< orphan*/ *);
int /*<<< orphan*/ queen(int *, int);
void *goqueens(void *pos) {
  int position[20];
  position[0] = (long)pos;
  queen(position, 1);
  pthread_exit(NULL);
}


x86 assembly (clang, -O0):
<goqueens>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,-0x60(%rbp)
lea    -0x60(%rbp),%rdi
mov    $0x1,%esi
call   1030 <queen@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1040 <pthread_exit@plt>
mov    -0x8(%rbp),%rax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<goqueens>:
sub    $0x58,%rsp
mov    %edi,(%rsp)
mov    %rsp,%rdi
mov    $0x1,%esi
call   1030 <queen@plt>
xor    %edi,%edi
call   1040 <pthread_exit@plt>
add    $0x58,%rsp
ret

LLVM IR (-O0):
define i8* @goqueens(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca [20 x i32]
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = ptrtoint i8* %5 to i64
%7 = trunc i64 %6 to i32
%8 = getelementptr inbounds [20 x i32], [20 x i32]* %4, i64 0, i64 0
store i32 %7, i32* %8
%9 = getelementptr inbounds [20 x i32], [20 x i32]* %4, i64 0, i64 0
%10 = call i32 @queen(i32* %9, i32 1)
%11 = call i32 @pthread_exit(i32* null)
%12 = load i8*, i8** %2
ret i8* %12
}

LLVM IR (-O2):
define noalias i8* @goqueens(i8* %0) {
%2 = alloca [20 x i32]
%3 = bitcast [20 x i32]* %2 to i8*
%4 = ptrtoint i8* %0 to i64
%5 = trunc i64 %4 to i32
%6 = getelementptr inbounds [20 x i32], [20 x i32]* %2, i64 0, i64 0
store i32 %5, i32* %6
%7 = call i32 @queen(i32* %6, i32 1)
%8 = call i32 @pthread_exit(i32* null)
ret i8* undef
}
/* Variables and functions */
int U_WMRCORENONE_get(char *);
int U_WMR3B_get(void) { return U_WMRCORENONE_get("U_WMR3B"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMR3B\00"
define i32 @U_WMR3B_get() {
%1 = call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMR3B\00"
define i32 @U_WMR3B_get() {
%1 = tail call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
/* Variables and functions */
char *strchr(char *, int /*<<< orphan*/);
char bad_strchr(char *str) {
  char *pos = strchr(str, 0);
  if (pos)
    return pos[1];
}


x86 assembly (clang, -O0):
<bad_strchr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
xor    %esi,%esi
call   1030 <strchr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1140 <bad_strchr+0x30>
mov    -0x18(%rbp),%rax
mov    0x1(%rax),%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bad_strchr>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
add    %rbx,%rax
je     1123 <bad_strchr+0x13>
mov    0x1(%rax),%al
pop    %rbx
ret
pop    %rbx
ret

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

LLVM IR (-O2):
define signext i8 @bad_strchr(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = getelementptr i8, i8* %0, i64 %2
%4 = icmp eq i8* %3, null
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = getelementptr inbounds i8, i8* %3, i64 1
%7 = load i8, i8* %6
br label %8
8: ; preds = %1, %5
%9 = phi i8 [ %7, %5 ], [ undef, %1 ]
ret i8 %9
}
float obdConvert_2D(unsigned int A, unsigned int B, unsigned int C,
                    unsigned int D) {
  return (float)A * 0.78125f - 100.0f;
}


x86 assembly (clang, -O0):
<obdConvert_2D>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
cvtsi2ss %rax,%xmm0
movss  0xee0(%rip),%xmm1
mulss  %xmm1,%xmm0
movss  0xed8(%rip),%xmm1
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<obdConvert_2D>:
mov    %edi,%eax
cvtsi2ss %rax,%xmm0
mulss  0xef1(%rip),%xmm0
addss  0xeed(%rip),%xmm0
ret

LLVM IR (-O0):
define float @obdConvert_2D(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = uitofp i32 %9 to float
%11 = call float @llvm.fmuladd.f32(float %10, float 7.812500e-01, float -1.000000e+02)
ret float %11
}

LLVM IR (-O2):
define float @obdConvert_2D(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = uitofp i32 %0 to float
%6 = tail call float @llvm.fmuladd.f32(float %5, float 7.812500e-01, float -1.000000e+02)
ret float %6
}
float f_cos_xx_10(float xx) {
  return 1 + xx * (-0.3084251375340424 +
                   xx * (0.01585434422879243 +
                         xx * (-0.0003259917751184507 +
                               xx * (3.590575024064454e-06 +
                                     xx * (-2.430825694459951e-08)))));
}


x86 assembly (clang, -O0):
<f_cos_xx_10>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x4(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movss  -0x4(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
movss  -0x4(%rbp),%xmm3
cvtss2sd %xmm3,%xmm3
movss  -0x4(%rbp),%xmm4
cvtss2sd %xmm4,%xmm4
movsd  0xee2(%rip),%xmm5
mulsd  %xmm5,%xmm4
movsd  0xede(%rip),%xmm5
addsd  %xmm5,%xmm4
mulsd  %xmm4,%xmm3
movsd  0xebe(%rip),%xmm4
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm2
movsd  0xea6(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
movsd  0xe8e(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe76(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_cos_xx_10>:
cvtss2sd %xmm0,%xmm0
movsd  0xef4(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xef0(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xeec(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xee8(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xee4(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xee0(%rip),%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @f_cos_xx_10(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = load float, float* %2
%6 = fpext float %5 to double
%7 = load float, float* %2
%8 = fpext float %7 to double
%9 = load float, float* %2
%10 = fpext float %9 to double
%11 = load float, float* %2
%12 = fpext float %11 to double
%13 = call double @llvm.fmuladd.f64(double %12, double 0xBE5A19CD83ABC001, double 0x3ECE1EB37EA36140)
%14 = call double @llvm.fmuladd.f64(double %10, double %13, double 0xBF355D3C034D54D1)
%15 = call double @llvm.fmuladd.f64(double %8, double %14, double 0x3F903C1F07D9484A)
%16 = call double @llvm.fmuladd.f64(double %6, double %15, double 0xBFD3BD3CC9BE45DD)
%17 = call double @llvm.fmuladd.f64(double %4, double %16, double 1.000000e+00)
%18 = fptrunc double %17 to float
ret float %18
}

LLVM IR (-O2):
define float @f_cos_xx_10(float %0) {
%2 = fpext float %0 to double
%3 = tail call double @llvm.fmuladd.f64(double %2, double 0xBE5A19CD83ABC001, double 0x3ECE1EB37EA36140)
%4 = tail call double @llvm.fmuladd.f64(double %2, double %3, double 0xBF355D3C034D54D1)
%5 = tail call double @llvm.fmuladd.f64(double %2, double %4, double 0x3F903C1F07D9484A)
%6 = tail call double @llvm.fmuladd.f64(double %2, double %5, double 0xBFD3BD3CC9BE45DD)
%7 = tail call double @llvm.fmuladd.f64(double %2, double %6, double 1.000000e+00)
%8 = fptrunc double %7 to float
ret float %8
}
/* Variables and functions */
int /*<<< orphan*/ fatal_error(int);
scalar_t__ trasmetti_opzione(int, float);
void *r_compact_tabella(void *id_c) {
  int id_connessione = *((int *)id_c);
  if (trasmetti_opzione(id_connessione, 'f'))
    fatal_error(id_connessione);
  return NULL;
}


x86 assembly (clang, -O0):
<r_compact_tabella>:
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
movss  0xec0(%rip),%xmm0
call   1030 <trasmetti_opzione@plt>
cmp    $0x0,%rax
je     1157 <r_compact_tabella+0x37>
mov    -0xc(%rbp),%edi
call   1040 <fatal_error@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<r_compact_tabella>:
push   %rbx
mov    (%rdi),%ebx
movss  0xed5(%rip),%xmm0
mov    %ebx,%edi
call   1030 <trasmetti_opzione@plt>
test   %rax,%rax
je     113e <r_compact_tabella+0x1e>
mov    %ebx,%edi
call   1040 <fatal_error@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @r_compact_tabella(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 i64 @trasmetti_opzione(i32 %7, float 1.020000e+02)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %1
%11 = load i32, i32* %3
%12 = call i32 @fatal_error(i32 %11)
br label %13
13: ; preds = %10, %1
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @r_compact_tabella(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = tail call i64 @trasmetti_opzione(i32 %3, float 1.020000e+02)
%5 = icmp eq i64 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %1
%7 = tail call i32 @fatal_error(i32 %3)
br label %8
8: ; preds = %6, %1
ret i8* null
}
int mystrnlen(char *s) {
  char *p = s;
  while (*s != '\0') {
    s = s + 1;
  }
  return s - p;
}


x86 assembly (clang, -O0):
<mystrnlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1131 <mystrnlen+0x31>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1110 <mystrnlen+0x10>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mystrnlen>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <mystrnlen+0x10>
ret

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

LLVM IR (-O2):
define i32 @mystrnlen(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %6, %2 ]
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 0
%6 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %5, label %7, label %2
7: ; preds = %2
%8 = ptrtoint i8* %3 to i64
%9 = ptrtoint i8* %0 to i64
%10 = sub i64 %8, %9
%11 = trunc i64 %10 to i32
ret i32 %11
}
void ath79_init_nfc_pdata(void) {}


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

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

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

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