xunge/DecIR huggingface dataset:
void GPIODMATriggerEnable(unsigned long ulPort, unsigned char ucPins) {
  ;
  (*((volatile unsigned long *)(ulPort + 0x00000534))) |= ucPins;
}


x86 assembly (clang, -O0):
<GPIODMATriggerEnable>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
movzbl -0x9(%rbp),%eax
mov    %eax,%edx
mov    -0x8(%rbp),%rax
mov    0x534(%rax),%rcx
or     %rdx,%rcx
mov    %rcx,0x534(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<GPIODMATriggerEnable>:
mov    %esi,%eax
or     %rax,0x534(%rdi)
ret

LLVM IR (-O0):
define void @GPIODMATriggerEnable(i64 %0, i8 zeroext %1) {
%3 = alloca i64
%4 = alloca i8
store i64 %0, i64* %3
store i8 %1, i8* %4
%5 = load i8, i8* %4
%6 = zext i8 %5 to i64
%7 = load i64, i64* %3
%8 = add i64 %7, 1332
%9 = inttoptr i64 %8 to i64*
%10 = load volatile i64, i64* %9
%11 = or i64 %10, %6
store volatile i64 %11, i64* %9
ret void
}

LLVM IR (-O2):
define void @GPIODMATriggerEnable(i64 %0, i8 zeroext %1) {
%3 = zext i8 %1 to i64
%4 = add i64 %0, 1332
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
%7 = or i64 %6, %3
store volatile i64 %7, i64* %5
ret void
}
long double clamp_f(long double in) {
  if (in <= 0.0L) {
    return 0.0L;
  }
  if (in >= 1.0L) {
    return 1.0L;
  }
  return in;
}


x86 assembly (clang, -O0):
<clamp_f>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
fstpt  -0x20(%rbp)
fldt   -0x20(%rbp)
fldz
fucomip %st(1),%st
fstp   %st(0)
jb     1128 <clamp_f+0x28>
jmp    111e <clamp_f+0x1e>
fldz
fstpt  -0x10(%rbp)
jmp    114e <clamp_f+0x4e>
fldt   -0x20(%rbp)
fld1
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jb     1148 <clamp_f+0x48>
jmp    113e <clamp_f+0x3e>
fld1
fstpt  -0x10(%rbp)
jmp    114e <clamp_f+0x4e>
fldt   -0x20(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<clamp_f>:
fldt   0x8(%rsp)
fld1
fxch   %st(1)
fucomi %st(1),%st
fld    %st(0)
fcmovnb %st(2),%st
fstp   %st(2)
fldz
fucomi %st(1),%st
fstp   %st(1)
fcmovb %st(1),%st
fstp   %st(1)
ret

LLVM IR (-O0):
define x86_fp80 @clamp_f(x86_fp80 %0) {
%2 = alloca x86_fp80
%3 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %3
%4 = load x86_fp80, x86_fp80* %3
%5 = fcmp ole x86_fp80 %4, 0xK00000000000000000000
br i1 %5, label %6, label %7
6: ; preds = %1
store x86_fp80 0xK00000000000000000000, x86_fp80* %2
br label %13
7: ; preds = %1
%8 = load x86_fp80, x86_fp80* %3
%9 = fcmp oge x86_fp80 %8, 0xK3FFF8000000000000000
br i1 %9, label %10, label %11
10: ; preds = %7
store x86_fp80 0xK3FFF8000000000000000, x86_fp80* %2
br label %13
11: ; preds = %7
%12 = load x86_fp80, x86_fp80* %3
store x86_fp80 %12, x86_fp80* %2
br label %13
13: ; preds = %11, %10, %6
%14 = load x86_fp80, x86_fp80* %2
ret x86_fp80 %14
}

LLVM IR (-O2):
define x86_fp80 @clamp_f(x86_fp80 %0) {
%2 = fcmp ugt x86_fp80 %0, 0xK00000000000000000000
%3 = fcmp oge x86_fp80 %0, 0xK3FFF8000000000000000
%4 = select i1 %3, x86_fp80 0xK3FFF8000000000000000, x86_fp80 %0
%5 = select i1 %2, x86_fp80 %4, x86_fp80 0xK00000000000000000000
ret x86_fp80 %5
}
void FreeMatrixi(int **matptr) {
  free(matptr[0]);
  free(matptr);
}


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

x86 assembly (clang, -O2):
<FreeMatrixi>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @FreeMatrixi(i32** nocapture %0) {
%2 = bitcast i32** %0 to i8**
%3 = load i8*, i8** %2
tail call void @free(i8* %3)
%4 = bitcast i32** %0 to i8*
tail call void @free(i8* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isdigit(int);
void t_isdigit_0xbf() {
  Assert_real((isdigit(191) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isdigit.c",
              960, ("isdigit should be 0 for 0xbf"));
}


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

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

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isdigit.c\00"
@.str.1 = [29 x i8] c"isdigit should be 0 for 0xbf\00"
define void @t_isdigit_0xbf() {
%1 = call i64 @isdigit(i32 191)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 960, 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_isdigit.c\00"
@.str.1 = [29 x i8] c"isdigit should be 0 for 0xbf\00"
define void @t_isdigit_0xbf() {
%1 = tail call i64 @isdigit(i32 191)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 960, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ av_isdigit(int);
int av_tolower(int);
__attribute__((const)) int av_isxdigit(int c) {
  c = av_tolower(c);
  return av_isdigit(c) || (c >= 'a' && c <= 'f');
}


x86 assembly (clang, -O0):
<av_isxdigit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <av_tolower@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <av_isdigit@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
jne    116f <av_isxdigit+0x4f>
xor    %eax,%eax
cmpl   $0x61,-0x4(%rbp)
mov    %al,-0x6(%rbp)
jl     1169 <av_isxdigit+0x49>
cmpl   $0x66,-0x4(%rbp)
setle  %al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<av_isxdigit>:
push   %rbx
call   1040 <av_tolower@plt>
mov    %eax,%ebx
mov    %eax,%edi
call   1030 <av_isdigit@plt>
test   %rax,%rax
setne  %al
add    $0xffffff9f,%ebx
cmp    $0x6,%ebx
setb   %cl
or     %al,%cl
movzbl %cl,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @av_isxdigit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @av_tolower(i32 %3)
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = call i64 @av_isdigit(i32 %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %16, label %8
8: ; preds = %1
%9 = load i32, i32* %2
%10 = icmp sge i32 %9, 97
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = load i32, i32* %2
%13 = icmp sle i32 %12, 102
br label %14
14: ; preds = %11, %8
%15 = phi i1 [ false, %8 ], [ %13, %11 ]
br label %16
16: ; preds = %14, %1
%17 = phi i1 [ true, %1 ], [ %15, %14 ]
%18 = zext i1 %17 to i32
ret i32 %18
}

LLVM IR (-O2):
define i32 @av_isxdigit(i32 %0) {
%2 = tail call i32 @av_tolower(i32 %0)
%3 = tail call i64 @av_isdigit(i32 %2)
%4 = icmp ne i64 %3, 0
%5 = add i32 %2, -97
%6 = icmp ult i32 %5, 6
%7 = or i1 %4, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
char *parse_filename(char *path) { return &path[1]; }


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

x86 assembly (clang, -O2):
<parse_filename>:
lea    0x1(%rdi),%rax
ret

LLVM IR (-O0):
define i8* @parse_filename(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 1
ret i8* %4
}

LLVM IR (-O2):
define i8* @parse_filename(i8* readnone %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 1
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ temp();
int main() {
  temp();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @temp()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @temp()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
__attribute__((weak)) ssize_t read_stdin(unsigned char *ptr,
                                         unsigned int count) {
  do {
    (void)(ptr);
  } while (0);
  do {
    (void)(count);
  } while (0);
  return 0;
}


x86 assembly (clang, -O0):
<read_stdin>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
jmp    1110 <read_stdin+0x10>
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define weak i32 @read_stdin(i8* %0, i32 %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ daemonize(char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ sleep(int);
main(int argc, char const *argv[]) {
  daemonize("daemonize");
  printf("now go to sleep\n");
  sleep(10);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeb3(%rip),%rdi
call   1030 <daemonize@plt>
lea    0xeb1(%rip),%rdi
call   1040 <printf@plt>
mov    $0xa,%edi
call   1050 <sleep@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <daemonize@plt>
lea    0xec6(%rip),%rdi
call   1030 <puts@plt>
mov    $0xa,%edi
call   1050 <sleep@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"daemonize\00"
@.str.1 = [17 x i8] c"now go to sleep\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @daemonize(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 @sleep(i32 10)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"daemonize\00"
@str = [16 x i8] c"now go to sleep\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @daemonize(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 @sleep(i32 10)
ret i32 0
}
/* Variables and functions */
int api3(int, int, int, int);
int write(int fd, const void *buf, int cnt) {
  return api3(4, fd, (int)buf, cnt);
}


x86 assembly (clang, -O0):
<write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rax
mov    %eax,%edx
mov    -0x14(%rbp),%ecx
mov    $0x4,%edi
call   1030 <api3@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write>:
mov    %edx,%ecx
mov    %rsi,%rdx
mov    %edi,%esi
mov    $0x4,%edi
jmp    1030 <api3@plt>

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

LLVM IR (-O2):
define i32 @write(i32 %0, i8* %1, i32 %2) {
%4 = ptrtoint i8* %1 to i64
%5 = trunc i64 %4 to i32
%6 = tail call i32 @api3(i32 4, i32 %0, i32 %5, i32 %2)
ret i32 %6
}
unsigned int SWAP32(unsigned int s) {
  return (s >> 24) | (s << 24) | ((s & 0xff00) << 8) | ((s & 0xff0000) >> 8);
}


x86 assembly (clang, -O0):
<SWAP32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x18,%eax
mov    -0x4(%rbp),%ecx
shl    $0x18,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
and    $0xff00,%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
and    $0xff0000,%ecx
shr    $0x8,%ecx
or     %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @SWAP32(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = lshr i32 %3, 24
%5 = load i32, i32* %2
%6 = shl i32 %5, 24
%7 = or i32 %4, %6
%8 = load i32, i32* %2
%9 = and i32 %8, 65280
%10 = shl i32 %9, 8
%11 = or i32 %7, %10
%12 = load i32, i32* %2
%13 = and i32 %12, 16711680
%14 = lshr i32 %13, 8
%15 = or i32 %11, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @SWAP32(i32 %0) {
%2 = tail call i32 @llvm.bswap.i32(i32 %0)
ret i32 %2
}
void g_once_impl() {}


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

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

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

LLVM IR (-O2):
define void @g_once_impl() {
ret void
}
void port_off(int port) {
  volatile long *p = (void *)port;
  *p = 0x44;
}


x86 assembly (clang, -O0):
<port_off>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movq   $0x44,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<port_off>:
movslq %edi,%rax
movq   $0x44,(%rax)
ret

LLVM IR (-O0):
define void @port_off(i32 %0) {
%2 = alloca i32
%3 = alloca i64*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i8*
%7 = bitcast i8* %6 to i64*
store i64* %7, i64** %3
%8 = load i64*, i64** %3
store volatile i64 68, i64* %8
ret void
}

LLVM IR (-O2):
define void @port_off(i32 %0) {
%2 = sext i32 %0 to i64
%3 = inttoptr i64 %2 to i64*
store volatile i64 68, i64* %3
ret void
}
extern int f1(void) { return 1; }


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

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

LLVM IR (-O0):
define i32 @f1() {
ret i32 1
}

LLVM IR (-O2):
define i32 @f1() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int ch, rez;
  scanf("%d", &ch);
  rez = ch * ch;
  printf("%d", rez);
  rez = rez * ch;
  printf("\n %d", rez);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xecc(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xe94(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
lea    0xed8(%rip),%rbx
lea    0x4(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    0x4(%rsp),%ebp
imul   %ebp,%ebp
mov    %rbx,%rdi
mov    %ebp,%esi
call   1030 <printf@plt>
imul   0x4(%rsp),%ebp
lea    0xeac(%rip),%rdi
mov    %ebp,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [5 x i8] c"\0A %d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = mul nsw i32 %4, %4
%6 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = load i32, i32* %1
%8 = mul nsw i32 %7, %5
%9 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %8)
ret i32 0
}
/* Variables and functions */
scalar_t__ asuint64(double);
int isok_d(double ygot, int exgot, double ywant, int exwant, int exmay) {
  return asuint64(ygot) == asuint64(ywant) && ((exgot ^ exwant) & ~exmay) == 0;
}


x86 assembly (clang, -O0):
<isok_d>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
movsd  %xmm1,-0x18(%rbp)
mov    %esi,-0x1c(%rbp)
mov    %edx,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <asuint64@plt>
mov    %rax,-0x30(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1030 <asuint64@plt>
mov    -0x30(%rbp),%rcx
mov    %rax,%rdx
xor    %eax,%eax
cmp    %rdx,%rcx
mov    %al,-0x21(%rbp)
jne    116f <isok_d+0x5f>
mov    -0xc(%rbp),%eax
xor    -0x1c(%rbp),%eax
mov    -0x20(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
sete   %al
mov    %al,-0x21(%rbp)
mov    -0x21(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isok_d>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edx,%r15d
mov    %esi,%ebp
movsd  %xmm1,(%rsp)
mov    %edi,%r14d
call   1030 <asuint64@plt>
mov    %rax,%rbx
movsd  (%rsp),%xmm0
call   1030 <asuint64@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rbx
jne    114e <isok_d+0x3e>
xor    %r14d,%ebp
not    %r15d
xor    %eax,%eax
test   %r15d,%ebp
sete   %al
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @isok_d(double %0, i32 %1, double %2, i32 %3, i32 %4) {
%6 = alloca double
%7 = alloca i32
%8 = alloca double
%9 = alloca i32
%10 = alloca i32
store double %0, double* %6
store i32 %1, i32* %7
store double %2, double* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load double, double* %6
%12 = call i64 @asuint64(double %11)
%13 = load double, double* %8
%14 = call i64 @asuint64(double %13)
%15 = icmp eq i64 %12, %14
br i1 %15, label %16, label %24
16: ; preds = %5
%17 = load i32, i32* %7
%18 = load i32, i32* %9
%19 = xor i32 %17, %18
%20 = load i32, i32* %10
%21 = xor i32 %20, -1
%22 = and i32 %19, %21
%23 = icmp eq i32 %22, 0
br label %24
24: ; preds = %16, %5
%25 = phi i1 [ false, %5 ], [ %23, %16 ]
%26 = zext i1 %25 to i32
ret i32 %26
}

LLVM IR (-O2):
define i32 @isok_d(double %0, i32 %1, double %2, i32 %3, i32 %4) {
%6 = tail call i64 @asuint64(double %0)
%7 = tail call i64 @asuint64(double %2)
%8 = icmp eq i64 %6, %7
br i1 %8, label %9, label %15
9: ; preds = %5
%10 = xor i32 %3, %1
%11 = xor i32 %4, -1
%12 = and i32 %10, %11
%13 = icmp eq i32 %12, 0
%14 = zext i1 %13 to i32
br label %15
15: ; preds = %9, %5
%16 = phi i32 [ 0, %5 ], [ %14, %9 ]
ret i32 %16
}
int fun1020() { return 1020; }


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

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

LLVM IR (-O0):
define i32 @fun1020() {
ret i32 1020
}

LLVM IR (-O2):
define i32 @fun1020() {
ret i32 1020
}
/* Variables and functions */
int CRYPTO_mem_debug_push(const char *info, const char *file, int line) {
  return 0;
}


x86 assembly (clang, -O0):
<CRYPTO_mem_debug_push>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @CRYPTO_mem_debug_push(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
ret i32 0
}

LLVM IR (-O2):
define i32 @CRYPTO_mem_debug_push(i8* nocapture readnone %0, i8* nocapture readnone %1, i32 %2) {
ret i32 0
}
void debug_print_test() {}


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

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

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

LLVM IR (-O2):
define void @debug_print_test() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ ASN1_VALUE;
typedef int /*<<< orphan*/ ASN1_TIME;

/* Variables and functions */
int /*<<< orphan*/ ASN1_TIME_it;
int /*<<< orphan*/ ASN1_item_free(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
void ASN1_TIME_free(ASN1_TIME *a) {
  ASN1_item_free((ASN1_VALUE *)a, &ASN1_TIME_it);
}


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

x86 assembly (clang, -O2):
<ASN1_TIME_free>:
mov    0x2ec9(%rip),%rsi
jmp    1030 <ASN1_item_free@plt>

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

LLVM IR (-O2):
@ASN1_TIME_it = global i32 0
define void @ASN1_TIME_free(i32* %0) {
%2 = tail call i32 @ASN1_item_free(i32* %0, i32* @ASN1_TIME_it)
ret void
}
/* Variables and functions */
int rand();
int Random_Num() {
  int random = 0;
  random = rand() % 10 + 1;
  return random;
}


x86 assembly (clang, -O0):
<Random_Num>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
mov    $0xa,%ecx
cltd
idiv   %ecx
add    $0x1,%edx
mov    %edx,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Random_Num>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rcx
add    %edx,%ecx
add    %ecx,%ecx
lea    (%rcx,%rcx,4),%ecx
neg    %ecx
add    %ecx,%eax
add    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @Random_Num() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @rand()
%3 = srem i32 %2, 10
%4 = add nsw i32 %3, 1
store i32 %4, i32* %1
%5 = load i32, i32* %1
ret i32 %5
}

LLVM IR (-O2):
define i32 @Random_Num() {
%1 = tail call i32 (...) @rand()
%2 = srem i32 %1, 10
%3 = add nsw i32 %2, 1
ret i32 %3
}
int get_server_status(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @get_server_status() {
ret i32 0
}
/* Variables and functions */
scalar_t__ memchr(char *, char, int);
int isvocal(char c) { return memchr("AEIOU", c, 5) ? 1 : 0; }


x86 assembly (clang, -O0):
<isvocal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
movsbl %al,%esi
lea    0xed5(%rip),%rdi
mov    $0x5,%edx
call   1030 <memchr@plt>
mov    %rax,%rdx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isvocal>:
push   %rax
mov    %edi,%esi
lea    0xee6(%rip),%rdi
mov    $0x5,%edx
call   1030 <memchr@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"AEIOU\00"
define i32 @isvocal(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i64 @memchr(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8 signext %3, i32 5)
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i64
%7 = select i1 %5, i32 1, i32 0
ret i32 %7
}

LLVM IR (-O2):
@.str = [6 x i8] c"AEIOU\00"
define i32 @isvocal(i8 signext %0) {
%2 = tail call i64 @memchr(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8 signext %0, i32 5)
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
long double longdouble_ignoring_longdouble(long double x, long double y) {
  return x;
}


x86 assembly (clang, -O0):
<longdouble_ignoring_longdouble>:
push   %rbp
mov    %rsp,%rbp
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fstpt  -0x20(%rbp)
fldt   -0x10(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<longdouble_ignoring_longdouble>:
fldt   0x8(%rsp)
ret

LLVM IR (-O0):
define x86_fp80 @longdouble_ignoring_longdouble(x86_fp80 %0, x86_fp80 %1) {
%3 = alloca x86_fp80
%4 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %3
store x86_fp80 %1, x86_fp80* %4
%5 = load x86_fp80, x86_fp80* %3
ret x86_fp80 %5
}

LLVM IR (-O2):
define x86_fp80 @longdouble_ignoring_longdouble(x86_fp80 returned %0, x86_fp80 %1) {
ret x86_fp80 %0
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
scalar_t__ special_format(char *);
main() {
  if (special_format("ee"))
    abort();
  if (!special_format("*e"))
    abort();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1040 <special_format@plt>
cmp    $0x0,%rax
je     115c <main+0x2c>
mov    $0x0,%al
call   1030 <abort@plt>
lea    0xea0(%rip),%rdi
call   1040 <special_format@plt>
cmp    $0x0,%rax
jne    1179 <main+0x49>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <special_format@plt>
test   %rax,%rax
jne    1153 <main+0x23>
lea    0xeba(%rip),%rdi
call   1040 <special_format@plt>
test   %rax,%rax
jne    115a <main+0x2a>
xor    %eax,%eax
call   1030 <abort@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"ee\00"
@.str.1 = [3 x i8] c"*e\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 @special_format(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @abort()
unreachable
6: ; preds = %0
%7 = call i64 @special_format(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%8 = icmp ne i64 %7, 0
br i1 %8, label %11, label %9
9: ; preds = %6
%10 = call i32 (...) @abort()
unreachable
11: ; preds = %6
%12 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [3 x i8] c"ee\00"
@.str.1 = [3 x i8] c"*e\00"
define i32 @main() {
%1 = tail call i64 @special_format(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = tail call i64 @special_format(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = tail call i32 (...) @abort()
unreachable
10: ; preds = %5
%11 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int shmdt(void *);
int shmem_close(void *shmem_addr) { return shmdt(shmem_addr); }


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

x86 assembly (clang, -O2):
<shmem_close>:
jmp    1030 <shmdt@plt>

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

LLVM IR (-O2):
define i32 @shmem_close(i8* %0) {
%2 = tail call i32 @shmdt(i8* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ DirectIndexedXE0(int);
int /*<<< orphan*/ LSR16(int /*<<< orphan*/, int);
void Op56E0M0(void) { LSR16(DirectIndexedXE0(3), 0xFFFF); }


x86 assembly (clang, -O0):
<Op56E0M0>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3,%edi
call   1040 <DirectIndexedXE0@plt>
mov    %eax,%edi
mov    $0xffff,%esi
call   1030 <LSR16@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Op56E0M0>:
push   %rax
mov    $0x3,%edi
call   1040 <DirectIndexedXE0@plt>
mov    %eax,%edi
mov    $0xffff,%esi
pop    %rax
jmp    1030 <LSR16@plt>

LLVM IR (-O0):
define void @Op56E0M0() {
%1 = call i32 @DirectIndexedXE0(i32 3)
%2 = call i32 @LSR16(i32 %1, i32 65535)
ret void
}

LLVM IR (-O2):
define void @Op56E0M0() {
%1 = tail call i32 @DirectIndexedXE0(i32 3)
%2 = tail call i32 @LSR16(i32 %1, i32 65535)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
void console_setpos(int col, int row) {
  printf("%c[%d;%dH", 0x1B, row + 1, col + 1);
}


x86 assembly (clang, -O0):
<console_setpos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edx
add    $0x1,%edx
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
lea    0xecf(%rip),%rdi
mov    $0x1b,%esi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<console_setpos>:
lea    0x1(%rsi),%edx
lea    0x1(%rdi),%ecx
lea    0xee3(%rip),%rdi
mov    $0x1b,%esi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"%c[%d;%dH\00"
define void @console_setpos(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = add nsw i32 %5, 1
%7 = load i32, i32* %3
%8 = add nsw i32 %7, 1
%9 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 27, i32 %6, i32 %8)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"%c[%d;%dH\00"
define void @console_setpos(i32 %0, i32 %1) {
%3 = add nsw i32 %1, 1
%4 = add nsw i32 %0, 1
%5 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 27, i32 %3, i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  enum BOOLEAN { NO, YES };
  if (NO == 0)
    printf("No!\n");
  else
    printf("Yes!\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [5 x i8] c"No!\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [4 x i8] c"No!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0))
ret i32 0
}
unsigned long EEPROMBlockProtectGet(unsigned long ulBlock) {
  ;
  (*((volatile unsigned long *)(0x400AF004))) = ulBlock;
  return ((*((volatile unsigned long *)(0x400AF030))));
}


x86 assembly (clang, -O0):
<EEPROMBlockProtectGet>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
mov    $0x400af004,%eax
mov    %rcx,(%rax)
mov    $0x400af030,%eax
mov    (%rax),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<EEPROMBlockProtectGet>:
mov    %rdi,0x400af004
40
mov    0x400af030,%rax
40
ret

LLVM IR (-O0):
define i64 @EEPROMBlockProtectGet(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
store volatile i64 %3, i64* inttoptr (i64 1074458628 to i64*)
%4 = load volatile i64, i64* inttoptr (i64 1074458672 to i64*)
ret i64 %4
}

LLVM IR (-O2):
define i64 @EEPROMBlockProtectGet(i64 %0) {
store volatile i64 %0, i64* inttoptr (i64 1074458628 to i64*)
%2 = load volatile i64, i64* inttoptr (i64 1074458672 to i64*)
ret i64 %2
}
int security_inode_mkdir(struct inode *dir, struct dentry *dentry, int mode) {
  return 0;
}


x86 assembly (clang, -O0):
<security_inode_mkdir>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.inode = type opaque
%struct.dentry = type opaque
define i32 @security_inode_mkdir(%struct.inode* %0, %struct.dentry* %1, i32 %2) {
%4 = alloca %struct.inode*
%5 = alloca %struct.dentry*
%6 = alloca i32
store %struct.inode* %0, %struct.inode** %4
store %struct.dentry* %1, %struct.dentry** %5
store i32 %2, i32* %6
ret i32 0
}

LLVM IR (-O2):
%struct.inode = type opaque
%struct.dentry = type opaque
define i32 @security_inode_mkdir(%struct.inode* nocapture readnone %0, %struct.dentry* nocapture readnone %1, i32 %2) {
ret i32 0
}
/* Type definitions */
typedef unsigned long volatile uint32_t;

/* Variables and functions */
uint32_t FlashIntStatus(bool bMasked) {
  if (bMasked) {
    return ((*((volatile unsigned long *)(0x400FD014))));
  } else {
    return ((*((volatile unsigned long *)(0x400FD00C))));
  }
}


x86 assembly (clang, -O0):
<FlashIntStatus>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1122 <FlashIntStatus+0x22>
mov    $0x400fd014,%eax
mov    (%rax),%rax
mov    %rax,-0x8(%rbp)
jmp    112e <FlashIntStatus+0x2e>
mov    $0x400fd00c,%eax
mov    (%rax),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<FlashIntStatus>:
xor    %eax,%eax
test   %edi,%edi
setne  %al
mov    0x400fd00c(,%rax,8),%rax
40
ret

LLVM IR (-O0):
define i64 @FlashIntStatus(i32 %0) {
%2 = alloca i64
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = load volatile i64, i64* inttoptr (i64 1074778132 to i64*)
store i64 %7, i64* %2
br label %10
8: ; preds = %1
%9 = load volatile i64, i64* inttoptr (i64 1074778124 to i64*)
store i64 %9, i64* %2
br label %10
10: ; preds = %8, %6
%11 = load i64, i64* %2
ret i64 %11
}

LLVM IR (-O2):
define i64 @FlashIntStatus(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = select i1 %2, i64* inttoptr (i64 1074778124 to i64*), i64* inttoptr (i64 1074778132 to i64*)
%4 = load volatile i64, i64* %3
ret i64 %4
}
/* Variables and functions */
scalar_t__ bar(int);
int /*<<< orphan*/ fail();
int foo(int x) {
  int i;
  int s = 0;
  if (x <= 0)
    fail();
  for (i = 0; i < x; ++i) {
    s += bar(i / 4);
  }
  return s;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x0,-0x4(%rbp)
jg     1143 <foo+0x23>
mov    $0x0,%al
call   1030 <fail@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1183 <foo+0x63>
mov    -0x8(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1040 <bar@plt>
mov    %rax,%rcx
movslq -0xc(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    114a <foo+0x2a>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rbp
push   %r14
push   %rbx
test   %edi,%edi
jle    1146 <foo+0x26>
mov    %edi,%r14d
xor    %ebx,%ebx
xor    %ebp,%ebp
nop
mov    %ebp,%edi
shr    $0x2,%edi
call   1040 <bar@plt>
add    %eax,%ebx
add    $0x1,%ebp
cmp    %ebp,%r14d
jne    1130 <foo+0x10>
jmp    114f <foo+0x2f>
xor    %ebx,%ebx
xor    %eax,%eax
call   1030 <fail@plt>
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @foo(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %4
%5 = load i32, i32* %2
%6 = icmp sle i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 (...) @fail()
br label %9
9: ; preds = %7, %1
store i32 0, i32* %3
br label %10
10: ; preds = %22, %9
%11 = load i32, i32* %3
%12 = load i32, i32* %2
%13 = icmp slt i32 %11, %12
br i1 %13, label %14, label %25
14: ; preds = %10
%15 = load i32, i32* %3
%16 = sdiv i32 %15, 4
%17 = call i64 @bar(i32 %16)
%18 = load i32, i32* %4
%19 = sext i32 %18 to i64
%20 = add nsw i64 %19, %17
%21 = trunc i64 %20 to i32
store i32 %21, i32* %4
br label %22
22: ; preds = %14
%23 = load i32, i32* %3
%24 = add nsw i32 %23, 1
store i32 %24, i32* %3
br label %10
25: ; preds = %10
%26 = load i32, i32* %4
ret i32 %26
}

LLVM IR (-O2):
define i32 @foo(i32 %0) {
%2 = icmp slt i32 %0, 1
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 (...) @fail()
br label %14
5: ; preds = %1, %5
%6 = phi i32 [ %11, %5 ], [ 0, %1 ]
%7 = phi i32 [ %12, %5 ], [ 0, %1 ]
%8 = lshr i32 %7, 2
%9 = tail call i64 @bar(i32 %8)
%10 = trunc i64 %9 to i32
%11 = add i32 %6, %10
%12 = add nuw nsw i32 %7, 1
%13 = icmp eq i32 %12, %0
br i1 %13, label %14, label %5
14: ; preds = %5, %3
%15 = phi i32 [ 0, %3 ], [ %11, %5 ]
ret i32 %15
}
const char *parse_size_usage() {
  return ("size in decimal, octal, or hex with optional k,m,g,t suffix");
}


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

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

LLVM IR (-O0):
@.str = [60 x i8] c"size in decimal, octal, or hex with optional k,m,g,t suffix\00"
define i8* @parse_size_usage() {
ret i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [60 x i8] c"size in decimal, octal, or hex with optional k,m,g,t suffix\00"
define i8* @parse_size_usage() {
ret i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0)
}
int fibonacci(int n) {
  long long x, y;
  if (n < 2)
    return n;
#pragma analysis_check assert auto_sc_firstprivate(n) assert auto_sc_shared(x)
#pragma omp task default(AUTO)
  x = fibonacci(n - 1);
#pragma analysis_check assert auto_sc_firstprivate(n) assert auto_sc_shared(y)
#pragma omp task default(AUTO)
  y = fibonacci(n - 2);
#pragma omp taskwait
  return x + y;
}


x86 assembly (clang, -O0):
<fibonacci>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    1130 <fibonacci+0x20>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    115d <fibonacci+0x4d>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <fibonacci@plt>
cltq
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x2,%edi
call   1030 <fibonacci@plt>
cltq
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
add    -0x18(%rbp),%rax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fibonacci>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
xor    %ebp,%ebp
cmp    $0x2,%edi
jge    1120 <fibonacci+0x10>
mov    %ebx,%ecx
jmp    1144 <fibonacci+0x34>
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    -0x1(%rbx),%edi
call   1030 <fibonacci@plt>
lea    -0x2(%rbx),%ecx
add    %eax,%ebp
cmp    $0x3,%ebx
mov    %ecx,%ebx
ja     1130 <fibonacci+0x20>
add    %ecx,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @fibonacci(i32 %0) {
%2 = icmp slt i32 %0, 2
br i1 %2, label %11, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %8, %3 ], [ %0, %1 ]
%5 = phi i32 [ %9, %3 ], [ 0, %1 ]
%6 = add nsw i32 %4, -1
%7 = tail call i32 @fibonacci(i32 %6)
%8 = add nsw i32 %4, -2
%9 = add i32 %7, %5
%10 = icmp ult i32 %4, 4
br i1 %10, label %11, label %3
11: ; preds = %3, %1
%12 = phi i32 [ 0, %1 ], [ %9, %3 ]
%13 = phi i32 [ %0, %1 ], [ %8, %3 ]
%14 = add i32 %13, %12
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ display();
int /*<<< orphan*/ display_flush_buffer();
int refresh_display() {
  display();
  display_flush_buffer();
  return 1;
}


x86 assembly (clang, -O0):
<refresh_display>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <display@plt>
mov    $0x0,%al
call   1040 <display_flush_buffer@plt>
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<refresh_display>:
push   %rax
xor    %eax,%eax
call   1030 <display@plt>
xor    %eax,%eax
call   1040 <display_flush_buffer@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @refresh_display() {
%1 = call i32 (...) @display()
%2 = call i32 (...) @display_flush_buffer()
ret i32 1
}

LLVM IR (-O2):
define i32 @refresh_display() {
%1 = tail call i32 (...) @display()
%2 = tail call i32 (...) @display_flush_buffer()
ret i32 1
}
void RTVfsIoStrmRelease(void) {}


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

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

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

LLVM IR (-O2):
define void @RTVfsIoStrmRelease() {
ret void
}
/* Variables and functions */
bool nrf52_errata_138(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf52_errata_138() {
ret i32 0
}
/* Variables and functions */
scalar_t__ __VERIFIER_nondet_int();
int /*<<< orphan*/ f(int);
int main() {
  if (__VERIFIER_nondet_int()) {
    f(1);
  } else {
    f(2);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <__VERIFIER_nondet_int@plt>
cmp    $0x0,%rax
je     114f <main+0x2f>
mov    $0x1,%edi
call   1030 <f@plt>
jmp    1159 <main+0x39>
mov    $0x2,%edi
call   1030 <f@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <__VERIFIER_nondet_int@plt>
cmp    $0x1,%rax
mov    $0x1,%edi
adc    $0x0,%edi
call   1030 <f@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 (...) @__VERIFIER_nondet_int()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @f(i32 1)
br label %8
6: ; preds = %0
%7 = call i32 @f(i32 2)
br label %8
8: ; preds = %6, %4
%9 = load i32, i32* %1
ret i32 %9
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 (...) @__VERIFIER_nondet_int()
%2 = icmp eq i64 %1, 0
%3 = select i1 %2, i32 2, i32 1
%4 = tail call i32 @f(i32 %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ assert_int_equal(int, int /*<<< orphan*/);
int /*<<< orphan*/ b_pawn_defended_from_east(int);
void b_pawn_defended_from_east_test(void **state) {
  assert_int_equal(0x0000000800000000ul,
                   b_pawn_defended_from_east(0x0000100800000000ul));
}


x86 assembly (clang, -O0):
<b_pawn_defended_from_east_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xor    %edi,%edi
call   1040 <b_pawn_defended_from_east@plt>
mov    %eax,%esi
xor    %edi,%edi
call   1030 <assert_int_equal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<b_pawn_defended_from_east_test>:
push   %rax
xor    %edi,%edi
call   1040 <b_pawn_defended_from_east@plt>
xor    %edi,%edi
mov    %eax,%esi
pop    %rax
jmp    1030 <assert_int_equal@plt>

LLVM IR (-O0):
define void @b_pawn_defended_from_east_test(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = call i32 @b_pawn_defended_from_east(i32 0)
%4 = call i32 @assert_int_equal(i32 0, i32 %3)
ret void
}

LLVM IR (-O2):
define void @b_pawn_defended_from_east_test(i8** nocapture readnone %0) {
%2 = tail call i32 @b_pawn_defended_from_east(i32 0)
%3 = tail call i32 @assert_int_equal(i32 0, i32 %2)
ret void
}
/* Variables and functions */
char *cnv_help();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
void help(void) {
  printf("%s\n", cnv_help());
  exit(0);
}


x86 assembly (clang, -O0):
<help>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <cnv_help@plt>
mov    %rax,%rsi
lea    0xebb(%rip),%rdi
call   1040 <printf@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<help>:
push   %rax
xor    %eax,%eax
call   1030 <cnv_help@plt>
lea    0xec1(%rip),%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
define void @help() {
%1 = call i8* (...) @cnv_help()
%2 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %1)
%3 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @help() {
%1 = tail call i8* (...) @cnv_help()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %1)
%3 = tail call i32 @exit(i32 0)
unreachable
}
double add_dd_d(double x, double y) { return x + y; }


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

x86 assembly (clang, -O2):
<add_dd_d>:
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @add_dd_d(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fadd double %5, %6
ret double %7
}

LLVM IR (-O2):
define double @add_dd_d(double %0, double %1) {
%3 = fadd double %0, %1
ret double %3
}