xunge/DecIR huggingface dataset:
int http_charset_convert(char *content_type, char *content_encoding, char *data,
                         int len, char *tocharset, int is_need_compress,
                         char **out) {
  int nout = 0;
  return nout;
}


x86 assembly (clang, -O0):
<http_charset_convert>:
push   %rbp
mov    %rsp,%rbp
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @http_charset_convert(i8* %0, i8* %1, i8* %2, i32 %3, i8* %4, i32 %5, i8** %6) {
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i32
%12 = alloca i8*
%13 = alloca i32
%14 = alloca i8**
%15 = alloca i32
store i8* %0, i8** %8
store i8* %1, i8** %9
store i8* %2, i8** %10
store i32 %3, i32* %11
store i8* %4, i8** %12
store i32 %5, i32* %13
store i8** %6, i8*** %14
store i32 0, i32* %15
%16 = load i32, i32* %15
ret i32 %16
}

LLVM IR (-O2):
define i32 @http_charset_convert(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2, i32 %3, i8* nocapture readnone %4, i32 %5, i8** nocapture readnone %6) {
ret i32 0
}
void UserEventFreeListEmptyCalloutf(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ read(int, void *, size_t);
ssize_t fileRead(int fd, void *buf, size_t len) { return read(fd, buf, len); }


x86 assembly (clang, -O0):
<fileRead>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <read@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fileRead>:
jmp    1030 <read@plt>

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

LLVM IR (-O2):
define i32 @fileRead(i32 %0, i8* nocapture %1, i64 %2) {
%4 = tail call i32 @read(i32 %0, i8* %1, i64 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ core4_print(char *, char const *);
void U_EMREXCLUDECLIPRECT_print(const char *contents) {
  core4_print("U_EMREXCLUDECLIPRECT", contents);
}


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

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

LLVM IR (-O0):
@.str = [21 x i8] c"U_EMREXCLUDECLIPRECT\00"
define void @U_EMREXCLUDECLIPRECT_print(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @core4_print(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"U_EMREXCLUDECLIPRECT\00"
define void @U_EMREXCLUDECLIPRECT_print(i8* %0) {
%2 = tail call i32 @core4_print(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0x4d() {
  Assert_real((ispunct(77) == 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_ispunct.c",
              390, ("ispunct should be 0 for M"));
}


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

x86 assembly (clang, -O2):
<t_ispunct_0x4d>:
push   %rax
mov    $0x4d,%edi
call   1030 <ispunct@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x186,%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_ispunct.c\00"
@.str.1 = [26 x i8] c"ispunct should be 0 for M\00"
define void @t_ispunct_0x4d() {
%1 = call i64 @ispunct(i32 77)
%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 390, i8* getelementptr inbounds ([26 x i8], [26 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_ispunct.c\00"
@.str.1 = [26 x i8] c"ispunct should be 0 for M\00"
define void @t_ispunct_0x4d() {
%1 = tail call i64 @ispunct(i32 77)
%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 390, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ aes_ecb_decrypt(int /*<<< orphan*/ *, int /*<<< orphan*/,
                                   int /*<<< orphan*/ *);
void AES_ECB_DecryptData(uint8_t *text, uint16_t textLen, uint8_t *aesKey) {
  aes_ecb_decrypt(text, textLen, aesKey);
}


x86 assembly (clang, -O0):
<AES_ECB_DecryptData>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
call   1030 <aes_ecb_decrypt@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<AES_ECB_DecryptData>:
jmp    1030 <aes_ecb_decrypt@plt>

LLVM IR (-O0):
define void @AES_ECB_DecryptData(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 = load i32, i32* %5
%9 = load i32*, i32** %6
%10 = call i32 @aes_ecb_decrypt(i32* %7, i32 %8, i32* %9)
ret void
}

LLVM IR (-O2):
define void @AES_ECB_DecryptData(i32* %0, i32 %1, i32* %2) {
%4 = tail call i32 @aes_ecb_decrypt(i32* %0, i32 %1, i32* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ r1(int /*<<< orphan*/);
int /*<<< orphan*/ r2(int /*<<< orphan*/);
int /*<<< orphan*/ r3(int /*<<< orphan*/);
int /*<<< orphan*/ r4(int /*<<< orphan*/);
int /*<<< orphan*/ r5(int /*<<< orphan*/);
int /*<<< orphan*/ r6(int /*<<< orphan*/);
int /*<<< orphan*/ r7(int /*<<< orphan*/);
int /*<<< orphan*/ w1(int /*<<< orphan*/);
int /*<<< orphan*/ w2(int /*<<< orphan*/);
int /*<<< orphan*/ w3(int /*<<< orphan*/);
int main() {
__CPROVER_ASYNC_0:
  w1(0);
__CPROVER_ASYNC_1:
  w2(0);
__CPROVER_ASYNC_2:
  w3(0);
__CPROVER_ASYNC_3:
  r1(0);
__CPROVER_ASYNC_4:
  r2(0);
__CPROVER_ASYNC_5:
  r3(0);
__CPROVER_ASYNC_6:
  r4(0);
__CPROVER_ASYNC_7:
  r5(0);
__CPROVER_ASYNC_8:
  r6(0);
__CPROVER_ASYNC_9:
  r7(0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %edi,%edi
call   1060 <w1@plt>
xor    %edi,%edi
call   10b0 <w2@plt>
xor    %edi,%edi
call   1070 <w3@plt>
xor    %edi,%edi
call   10c0 <r1@plt>
xor    %edi,%edi
call   1080 <r2@plt>
xor    %edi,%edi
call   1030 <r3@plt>
xor    %edi,%edi
call   10a0 <r4@plt>
xor    %edi,%edi
call   1050 <r5@plt>
xor    %edi,%edi
call   1090 <r6@plt>
xor    %edi,%edi
call   1040 <r7@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1060 <w1@plt>
xor    %edi,%edi
call   10b0 <w2@plt>
xor    %edi,%edi
call   1070 <w3@plt>
xor    %edi,%edi
call   10c0 <r1@plt>
xor    %edi,%edi
call   1080 <r2@plt>
xor    %edi,%edi
call   1030 <r3@plt>
xor    %edi,%edi
call   10a0 <r4@plt>
xor    %edi,%edi
call   1050 <r5@plt>
xor    %edi,%edi
call   1090 <r6@plt>
xor    %edi,%edi
call   1040 <r7@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %0
%3 = call i32 @w1(i32 0)
br label %4
4: ; preds = %2
%5 = call i32 @w2(i32 0)
br label %6
6: ; preds = %4
%7 = call i32 @w3(i32 0)
br label %8
8: ; preds = %6
%9 = call i32 @r1(i32 0)
br label %10
10: ; preds = %8
%11 = call i32 @r2(i32 0)
br label %12
12: ; preds = %10
%13 = call i32 @r3(i32 0)
br label %14
14: ; preds = %12
%15 = call i32 @r4(i32 0)
br label %16
16: ; preds = %14
%17 = call i32 @r5(i32 0)
br label %18
18: ; preds = %16
%19 = call i32 @r6(i32 0)
br label %20
20: ; preds = %18
%21 = call i32 @r7(i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @w1(i32 0)
%2 = tail call i32 @w2(i32 0)
%3 = tail call i32 @w3(i32 0)
%4 = tail call i32 @r1(i32 0)
%5 = tail call i32 @r2(i32 0)
%6 = tail call i32 @r3(i32 0)
%7 = tail call i32 @r4(i32 0)
%8 = tail call i32 @r5(i32 0)
%9 = tail call i32 @r6(i32 0)
%10 = tail call i32 @r7(i32 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ dac_open(int);
int main(void) {
  dac_open(4 * 320);
  while (1)
    ;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x500,%edi
call   1030 <dac_open@plt>
jmp    1129 <main+0x19>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x500,%edi
call   1030 <dac_open@plt>
nopl   0x0(%rax,%rax,1)
jmp    1120 <main+0x10>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @dac_open(i32 1280)
br label %3
3: ; preds = %0, %3
br label %3
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @dac_open(i32 1280)
br label %2
2: ; preds = %0, %2
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *argv0) {
  fprintf(stderr,
          "Usage: %s [-c count]"
          " [-f frequency] [-g goodness] -h hostname\n"
          "\t[-i interval] [-l] [-p port] [-q min_delay]"
          " [-s] [-t]\n",
          argv0);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [118 x i8] c"Usage: %s [-c count] [-f frequency] [-g goodness] -h hostname\0A\09[-i interval] [-l] [-p port] [-q min_delay] [-s] [-t]\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([118 x i8], [118 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [118 x i8] c"Usage: %s [-c count] [-f frequency] [-g goodness] -h hostname\0A\09[-i interval] [-l] [-p port] [-q min_delay] [-s] [-t]\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([118 x i8], [118 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ set_key_wait_vtime(int /*<<< orphan*/);
void clr_key_wait_unix(void) { set_key_wait_vtime(0); }


x86 assembly (clang, -O0):
<clr_key_wait_unix>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <set_key_wait_vtime@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @clr_key_wait_unix() {
%1 = call i32 @set_key_wait_vtime(i32 0)
ret void
}

LLVM IR (-O2):
define void @clr_key_wait_unix() {
%1 = tail call i32 @set_key_wait_vtime(i32 0)
ret void
}
unsigned short hashInt(unsigned int in) {
  unsigned short hash = 0;
  hash += (in >> 24) & 0xFF;
  hash *= 37;
  hash += (in >> 16) & 0xFF;
  hash *= 37;
  hash += (in >> 8) & 0xFF;
  hash *= 37;
  hash += in & 0xFF;
  return hash;
}


x86 assembly (clang, -O0):
<hashInt>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movw   $0x0,-0x6(%rbp)
mov    -0x4(%rbp),%ecx
shr    $0x18,%ecx
and    $0xff,%ecx
movzwl -0x6(%rbp),%eax
add    %ecx,%eax
mov    %ax,-0x6(%rbp)
movzwl -0x6(%rbp),%eax
imul   $0x25,%eax,%eax
mov    %ax,-0x6(%rbp)
mov    -0x4(%rbp),%ecx
shr    $0x10,%ecx
and    $0xff,%ecx
movzwl -0x6(%rbp),%eax
add    %ecx,%eax
mov    %ax,-0x6(%rbp)
movzwl -0x6(%rbp),%eax
imul   $0x25,%eax,%eax
mov    %ax,-0x6(%rbp)
mov    -0x4(%rbp),%ecx
shr    $0x8,%ecx
and    $0xff,%ecx
movzwl -0x6(%rbp),%eax
add    %ecx,%eax
mov    %ax,-0x6(%rbp)
movzwl -0x6(%rbp),%eax
imul   $0x25,%eax,%eax
mov    %ax,-0x6(%rbp)
mov    -0x4(%rbp),%ecx
and    $0xff,%ecx
movzwl -0x6(%rbp),%eax
add    %ecx,%eax
mov    %ax,-0x6(%rbp)
movzwl -0x6(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hashInt>:
mov    %edi,%ecx
mov    %edi,%edx
movzbl %ch,%esi
movzbl %cl,%eax
shr    $0x18,%ecx
lea    (%rcx,%rcx,8),%edi
lea    (%rcx,%rdi,4),%ecx
shr    $0x10,%edx
movzbl %dl,%edx
add    %ecx,%edx
lea    (%rdx,%rdx,8),%ecx
lea    (%rdx,%rcx,4),%ecx
add    %ecx,%esi
lea    (%rsi,%rsi,8),%ecx
lea    (%rsi,%rcx,4),%ecx
add    %ecx,%eax
ret

LLVM IR (-O0):
define zeroext i16 @hashInt(i32 %0) {
%2 = alloca i32
%3 = alloca i16
store i32 %0, i32* %2
store i16 0, i16* %3
%4 = load i32, i32* %2
%5 = lshr i32 %4, 24
%6 = and i32 %5, 255
%7 = load i16, i16* %3
%8 = zext i16 %7 to i32
%9 = add i32 %8, %6
%10 = trunc i32 %9 to i16
store i16 %10, i16* %3
%11 = load i16, i16* %3
%12 = zext i16 %11 to i32
%13 = mul nsw i32 %12, 37
%14 = trunc i32 %13 to i16
store i16 %14, i16* %3
%15 = load i32, i32* %2
%16 = lshr i32 %15, 16
%17 = and i32 %16, 255
%18 = load i16, i16* %3
%19 = zext i16 %18 to i32
%20 = add i32 %19, %17
%21 = trunc i32 %20 to i16
store i16 %21, i16* %3
%22 = load i16, i16* %3
%23 = zext i16 %22 to i32
%24 = mul nsw i32 %23, 37
%25 = trunc i32 %24 to i16
store i16 %25, i16* %3
%26 = load i32, i32* %2
%27 = lshr i32 %26, 8
%28 = and i32 %27, 255
%29 = load i16, i16* %3
%30 = zext i16 %29 to i32
%31 = add i32 %30, %28
%32 = trunc i32 %31 to i16
store i16 %32, i16* %3
%33 = load i16, i16* %3
%34 = zext i16 %33 to i32
%35 = mul nsw i32 %34, 37
%36 = trunc i32 %35 to i16
store i16 %36, i16* %3
%37 = load i32, i32* %2
%38 = and i32 %37, 255
%39 = load i16, i16* %3
%40 = zext i16 %39 to i32
%41 = add i32 %40, %38
%42 = trunc i32 %41 to i16
store i16 %42, i16* %3
%43 = load i16, i16* %3
ret i16 %43
}

LLVM IR (-O2):
define zeroext i16 @hashInt(i32 %0) {
%2 = lshr i32 %0, 24
%3 = mul nuw nsw i32 %2, 37
%4 = lshr i32 %0, 16
%5 = and i32 %4, 255
%6 = add nuw nsw i32 %3, %5
%7 = mul nuw nsw i32 %6, 37
%8 = lshr i32 %0, 8
%9 = and i32 %8, 255
%10 = add nuw nsw i32 %7, %9
%11 = mul nuw nsw i32 %10, 37
%12 = and i32 %0, 255
%13 = add nuw nsw i32 %11, %12
%14 = trunc i32 %13 to i16
ret i16 %14
}
/* Type definitions */
struct parameter {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ pcn_out(int, int, int);
int com_review(int p0, struct parameter *param) {
  (void)(param);
  pcn_out(p0, 9, 697);
  pcn_out(p0, 9, 765);
  pcn_out(p0, 9, 783);
  return 0;
}


x86 assembly (clang, -O0):
<com_review>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x9,%esi
mov    $0x2b9,%edx
call   1030 <pcn_out@plt>
mov    -0x4(%rbp),%edi
mov    $0x9,%esi
mov    $0x2fd,%edx
call   1030 <pcn_out@plt>
mov    -0x4(%rbp),%edi
mov    $0x9,%esi
mov    $0x30f,%edx
call   1030 <pcn_out@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<com_review>:
push   %rbx
mov    %edi,%ebx
mov    $0x9,%esi
mov    $0x2b9,%edx
call   1030 <pcn_out@plt>
mov    %ebx,%edi
mov    $0x9,%esi
mov    $0x2fd,%edx
call   1030 <pcn_out@plt>
mov    %ebx,%edi
mov    $0x9,%esi
mov    $0x30f,%edx
call   1030 <pcn_out@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.parameter = type { i32 }
define i32 @com_review(i32 %0, %struct.parameter* %1) {
%3 = alloca i32
%4 = alloca %struct.parameter*
store i32 %0, i32* %3
store %struct.parameter* %1, %struct.parameter** %4
%5 = load %struct.parameter*, %struct.parameter** %4
%6 = load i32, i32* %3
%7 = call i32 @pcn_out(i32 %6, i32 9, i32 697)
%8 = load i32, i32* %3
%9 = call i32 @pcn_out(i32 %8, i32 9, i32 765)
%10 = load i32, i32* %3
%11 = call i32 @pcn_out(i32 %10, i32 9, i32 783)
ret i32 0
}

LLVM IR (-O2):
%struct.parameter = type { i32 }
define i32 @com_review(i32 %0, %struct.parameter* nocapture readnone %1) {
%3 = tail call i32 @pcn_out(i32 %0, i32 9, i32 697)
%4 = tail call i32 @pcn_out(i32 %0, i32 9, i32 765)
%5 = tail call i32 @pcn_out(i32 %0, i32 9, i32 783)
ret i32 0
}
/* Variables and functions */
int close(int);
int /*<<< orphan*/ xa_debug(int, char *, int);
int fd_close(int fd) {
  if (fd < 2)
    xa_debug(1, "DEBUG: Closing fd %d", fd);
  else
    xa_debug(1, "DEBUG: Closing fd %d", fd);
  if (fd >= 0) {
    return close(fd);
  } else
    return -1;
}


x86 assembly (clang, -O0):
<fd_close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    114e <fd_close+0x2e>
mov    -0x8(%rbp),%edx
mov    $0x1,%edi
lea    0xebc(%rip),%rsi
call   1040 <xa_debug@plt>
jmp    1162 <fd_close+0x42>
mov    -0x8(%rbp),%edx
mov    $0x1,%edi
lea    0xea3(%rip),%rsi
call   1040 <xa_debug@plt>
cmpl   $0x0,-0x8(%rbp)
jl     117c <fd_close+0x5c>
mov    -0x8(%rbp),%edi
call   1030 <close@plt>
mov    %eax,-0x4(%rbp)
jmp    1183 <fd_close+0x63>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fd_close>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rsi
mov    $0x1,%edi
mov    %ebx,%edx
call   1040 <xa_debug@plt>
test   %ebx,%ebx
js     1142 <fd_close+0x22>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <close@plt>
mov    $0xffffffff,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"DEBUG: Closing fd %d\00"
define i32 @fd_close(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp slt i32 %4, 2
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* %3
%8 = call i32 @xa_debug(i32 1, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %7)
br label %12
9: ; preds = %1
%10 = load i32, i32* %3
%11 = call i32 @xa_debug(i32 1, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %10)
br label %12
12: ; preds = %9, %6
%13 = load i32, i32* %3
%14 = icmp sge i32 %13, 0
br i1 %14, label %15, label %18
15: ; preds = %12
%16 = load i32, i32* %3
%17 = call i32 @close(i32 %16)
store i32 %17, i32* %2
br label %19
18: ; preds = %12
store i32 -1, i32* %2
br label %19
19: ; preds = %18, %15
%20 = load i32, i32* %2
ret i32 %20
}

LLVM IR (-O2):
@.str = [21 x i8] c"DEBUG: Closing fd %d\00"
define i32 @fd_close(i32 %0) {
%2 = tail call i32 @xa_debug(i32 1, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = icmp sgt i32 %0, -1
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @close(i32 %0)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ %5, %4 ], [ -1, %1 ]
ret i32 %7
}
void gdk_parse_args() {}


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

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

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

LLVM IR (-O2):
define void @gdk_parse_args() {
ret void
}
char const *basename(char const *path) {
  char const *start = path;
  for (; *path; path++)
    if (*path == '/')
      start = path + 1;
  return start;
}


x86 assembly (clang, -O0):
<basename>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     114f <basename+0x4f>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2f,%eax
jne    1139 <basename+0x39>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    113e <basename+0x3e>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1110 <basename+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<basename>:
mov    %rdi,%rax
lea    0x1(%rdi),%rcx
jmp    1117 <basename+0x17>
nopl   0x0(%rax)
mov    %rcx,%rax
add    $0x1,%rcx
movzbl -0x1(%rcx),%edx
cmp    $0x2f,%dl
je     1110 <basename+0x10>
test   %dl,%dl
jne    1113 <basename+0x13>
ret

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

LLVM IR (-O2):
define i8* @basename(i8* %0) {
br label %2
2: ; preds = %8, %1
%3 = phi i8* [ %0, %1 ], [ %10, %8 ]
%4 = phi i8* [ %0, %1 ], [ %9, %8 ]
%5 = load i8, i8* %3
switch i8 %5, label %8 [
i8 0, label %11
i8 47, label %6
]
6: ; preds = %2
%7 = getelementptr inbounds i8, i8* %3, i64 1
br label %8
8: ; preds = %2, %6
%9 = phi i8* [ %7, %6 ], [ %4, %2 ]
%10 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
11: ; preds = %2
ret i8* %4
}
void init_add_rel_color_pt_funcs_c(void) {}


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

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

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

LLVM IR (-O2):
define void @init_add_rel_color_pt_funcs_c() {
ret void
}
void __attribute__((always_)) trace_initialize(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, int /*<<< orphan*/ *, int);
int __byte_decode_array(const void *_buf, int offset, int maxlen, uint8_t *p,
                        int elements) {
  if (maxlen < elements)
    return -1;
  uint8_t *buf = (uint8_t *)_buf;
  memcpy(p, &buf[offset], elements);
  return elements;
}


x86 assembly (clang, -O0):
<__byte_decode_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    1142 <__byte_decode_array+0x32>
movl   $0xffffffff,-0x4(%rbp)
jmp    116b <__byte_decode_array+0x5b>
mov    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x30(%rbp),%rsi
movslq -0x14(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
mov    -0x24(%rbp),%edx
call   1030 <memcpy@plt>
mov    -0x24(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__byte_decode_array>:
mov    $0xffffffff,%eax
cmp    %r8d,%edx
jl     1133 <__byte_decode_array+0x23>
push   %rbx
mov    %r8d,%ebx
movslq %esi,%rax
lea    (%rdi,%rax,4),%rsi
mov    %rcx,%rdi
mov    %r8d,%edx
call   1030 <memcpy@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @__byte_decode_array(i8* %0, i32 %1, i32 %2, i32* %3, i32 %4) {
%6 = icmp slt i32 %2, %4
br i1 %6, label %12, label %7
7: ; preds = %5
%8 = bitcast i8* %0 to i32*
%9 = sext i32 %1 to i64
%10 = getelementptr inbounds i32, i32* %8, i64 %9
%11 = tail call i32 @memcpy(i32* %3, i32* %10, i32 %4)
br label %12
12: ; preds = %5, %7
%13 = phi i32 [ %4, %7 ], [ -1, %5 ]
ret i32 %13
}
adrx0reg1_set(r0, r1, x0, x1, p0, p1) short r0, r1;
short *p0, *p1;
{ (((short *)10000000)[x0]) = r1; }


x86 assembly (clang, -O0):
<adrx0reg1_set>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %di,%si
mov    %si,-0x6(%rbp)
mov    %ax,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    -0x8(%rbp),%dx
movslq -0xc(%rbp),%rcx
mov    $0x989680,%eax
mov    %dx,(%rax,%rcx,2)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<adrx0reg1_set>:
movslq %edx,%rax
mov    %si,0x989680(%rax,%rax,1)
ret

LLVM IR (-O0):
define i32 @adrx0reg1_set(i32 %0, i32 %1, i32 %2, i32 %3, i16* %4, i16* %5) {
%7 = alloca i32
%8 = alloca i16
%9 = alloca i16
%10 = alloca i32
%11 = alloca i32
%12 = alloca i16*
%13 = alloca i16*
%14 = trunc i32 %0 to i16
%15 = trunc i32 %1 to i16
store i16 %14, i16* %8
store i16 %15, i16* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i16* %4, i16** %12
store i16* %5, i16** %13
%16 = load i16, i16* %9
%17 = load i32, i32* %10
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i16, i16* inttoptr (i64 10000000 to i16*), i64 %18
store i16 %16, i16* %19
%20 = load i32, i32* %7
ret i32 %20
}

LLVM IR (-O2):
define i32 @adrx0reg1_set(i32 %0, i32 %1, i32 %2, i32 %3, i16* nocapture readnone %4, i16* nocapture readnone %5) {
%7 = trunc i32 %1 to i16
%8 = sext i32 %2 to i64
%9 = getelementptr inbounds i16, i16* inttoptr (i64 10000000 to i16*), i64 %8
store i16 %7, i16* %9
ret i32 undef
}
void cam_inhibit_set(const int c) {}


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

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

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

LLVM IR (-O2):
define void @cam_inhibit_set(i32 %0) {
ret void
}
void serializeInt(void **buffer, int value) {
  *(int *)*buffer = value;
  *buffer += sizeof(int);
}


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

x86 assembly (clang, -O2):
<serializeInt>:
mov    (%rdi),%rax
mov    %esi,(%rax)
add    $0x4,%rax
mov    %rax,(%rdi)
ret

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

LLVM IR (-O2):
define void @serializeInt(i8** nocapture %0, i32 %1) {
%3 = bitcast i8** %0 to i32**
%4 = load i32*, i32** %3
store i32 %1, i32* %4
%5 = getelementptr i32, i32* %4, i64 1
store i32* %5, i32** %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ espcomm_delay_ms(int);
int /*<<< orphan*/ serialport_send_break();
int /*<<< orphan*/ serialport_set_dtr(int);
int /*<<< orphan*/ serialport_set_rts(int);
void board_ck_rb() {
  serialport_set_rts(1);
  serialport_set_dtr(1);
  serialport_send_break();
  espcomm_delay_ms(5);
  serialport_set_rts(0);
  espcomm_delay_ms(250);
  serialport_set_dtr(0);
}


x86 assembly (clang, -O0):
<board_ck_rb>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1060 <serialport_set_rts@plt>
mov    $0x1,%edi
call   1040 <serialport_set_dtr@plt>
mov    $0x0,%al
call   1050 <serialport_send_break@plt>
mov    $0x5,%edi
call   1030 <espcomm_delay_ms@plt>
xor    %edi,%edi
call   1060 <serialport_set_rts@plt>
mov    $0xfa,%edi
call   1030 <espcomm_delay_ms@plt>
xor    %edi,%edi
call   1040 <serialport_set_dtr@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<board_ck_rb>:
push   %rax
mov    $0x1,%edi
call   1060 <serialport_set_rts@plt>
mov    $0x1,%edi
call   1040 <serialport_set_dtr@plt>
xor    %eax,%eax
call   1050 <serialport_send_break@plt>
mov    $0x5,%edi
call   1030 <espcomm_delay_ms@plt>
xor    %edi,%edi
call   1060 <serialport_set_rts@plt>
mov    $0xfa,%edi
call   1030 <espcomm_delay_ms@plt>
xor    %edi,%edi
pop    %rax
jmp    1040 <serialport_set_dtr@plt>

LLVM IR (-O0):
define void @board_ck_rb() {
%1 = call i32 @serialport_set_rts(i32 1)
%2 = call i32 @serialport_set_dtr(i32 1)
%3 = call i32 (...) @serialport_send_break()
%4 = call i32 @espcomm_delay_ms(i32 5)
%5 = call i32 @serialport_set_rts(i32 0)
%6 = call i32 @espcomm_delay_ms(i32 250)
%7 = call i32 @serialport_set_dtr(i32 0)
ret void
}

LLVM IR (-O2):
define void @board_ck_rb() {
%1 = tail call i32 @serialport_set_rts(i32 1)
%2 = tail call i32 @serialport_set_dtr(i32 1)
%3 = tail call i32 (...) @serialport_send_break()
%4 = tail call i32 @espcomm_delay_ms(i32 5)
%5 = tail call i32 @serialport_set_rts(i32 0)
%6 = tail call i32 @espcomm_delay_ms(i32 250)
%7 = tail call i32 @serialport_set_dtr(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage() { printf("xkcp_spy -h address -s|c -t cmd [ -m param]\n"); }


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

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

LLVM IR (-O0):
@.str = [45 x i8] c"xkcp_spy -h address -s|c -t cmd [ -m param]\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [44 x i8] c"xkcp_spy -h address -s|c -t cmd [ -m param]\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
double floor(double);
double int_wrapper(double *arg_list) { return floor(arg_list[0]); }


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

x86 assembly (clang, -O2):
<int_wrapper>:
movsd  (%rdi),%xmm0
jmp    1030 <floor@plt>

LLVM IR (-O0):
define double @int_wrapper(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = getelementptr inbounds double, double* %3, i64 0
%5 = load double, double* %4
%6 = call double @llvm.floor.f64(double %5)
ret double %6
}

LLVM IR (-O2):
define double @int_wrapper(double* nocapture %0) {
%2 = load double, double* %0
%3 = tail call double @llvm.floor.f64(double %2)
ret double %3
}
/* Variables and functions */
char *strncpy(char *dst, const char *src, int n) {
  int i;
  for (i = 0; i < n; i++)
    if ((*dst++ = *src++) == 0)
      break;
  return dst;
}


x86 assembly (clang, -O0):
<strncpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1168 <strncpy+0x68>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %al,(%rcx)
movsbl %al,%eax
cmp    $0x0,%eax
jne    1155 <strncpy+0x55>
jmp    1168 <strncpy+0x68>
jmp    115a <strncpy+0x5a>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1116 <strncpy+0x16>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strncpy>:
mov    %rdi,%rax
test   %edx,%edx
jle    1128 <strncpy+0x28>
xor    %ecx,%ecx
nopl   0x0(%rax)
movzbl (%rsi,%rcx,1),%edi
mov    %dil,(%rax,%rcx,1)
add    $0x1,%rcx
test   %dil,%dil
je     1125 <strncpy+0x25>
cmp    %edx,%ecx
jl     1110 <strncpy+0x10>
add    %rcx,%rax
ret

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

LLVM IR (-O2):
define i8* @strncpy(i8* writeonly %0, i8* nocapture %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %16
5: ; preds = %3, %5
%6 = phi i32 [ %13, %5 ], [ 0, %3 ]
%7 = phi i8* [ %10, %5 ], [ %0, %3 ]
%8 = phi i8* [ %12, %5 ], [ %1, %3 ]
%9 = load i8, i8* %8
%10 = getelementptr inbounds i8, i8* %7, i64 1
store i8 %9, i8* %7
%11 = icmp ne i8 %9, 0
%12 = getelementptr inbounds i8, i8* %8, i64 1
%13 = add nuw nsw i32 %6, 1
%14 = icmp slt i32 %13, %2
%15 = select i1 %11, i1 %14, i1 false
br i1 %15, label %5, label %16
16: ; preds = %5, %3
%17 = phi i8* [ %0, %3 ], [ %10, %5 ]
ret i8* %17
}
int ft_isquote(int c) {
  if (c == '\'' || c == '"' || c == '`')
    return (1);
  return (0);
}


x86 assembly (clang, -O0):
<ft_isquote>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x27,-0x8(%rbp)
je     1125 <ft_isquote+0x25>
cmpl   $0x22,-0x8(%rbp)
je     1125 <ft_isquote+0x25>
cmpl   $0x60,-0x8(%rbp)
jne    1131 <ft_isquote+0x31>
movl   $0x1,-0x4(%rbp)
jmp    1138 <ft_isquote+0x38>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_isquote>:
add    $0xffffffde,%edi
cmp    $0x3e,%edi
ja     111e <ft_isquote+0x1e>
mov    $0x1,%eax
movabs $0x4000000000000021,%rcx
bt     %rdi,%rcx
jae    111e <ft_isquote+0x1e>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @ft_isquote(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 39
br i1 %5, label %12, label %6
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp eq i32 %7, 34
br i1 %8, label %12, label %9
9: ; preds = %6
%10 = load i32, i32* %3
%11 = icmp eq i32 %10, 96
br i1 %11, label %12, label %13
12: ; preds = %9, %6, %1
store i32 1, i32* %2
br label %14
13: ; preds = %9
store i32 0, i32* %2
br label %14
14: ; preds = %13, %12
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @ft_isquote(i32 %0) {
switch i32 %0, label %2 [
i32 96, label %3
i32 39, label %3
i32 34, label %3
]
2: ; preds = %1
br label %3
3: ; preds = %1, %1, %1, %2
%4 = phi i32 [ 0, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %4
}
/* Variables and functions */
float sinf(float);
float r_sin(float *x) { return (sinf(*x)); }


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

x86 assembly (clang, -O2):
<r_sin>:
movss  (%rdi),%xmm0
jmp    1030 <sinf@plt>

LLVM IR (-O0):
define float @r_sin(float* %0) {
%2 = alloca float*
store float* %0, float** %2
%3 = load float*, float** %2
%4 = load float, float* %3
%5 = call float @sinf(float %4)
ret float %5
}

LLVM IR (-O2):
define float @r_sin(float* nocapture %0) {
%2 = load float, float* %0
%3 = tail call float @sinf(float %2)
ret float %3
}
double bot_vector_magnitude_squared_3d(const double v[3]) {
  return v[0] * v[0] + v[1] * v[1] + v[2] * v[2];
}


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

x86 assembly (clang, -O2):
<bot_vector_magnitude_squared_3d>:
movsd  (%rdi),%xmm1
movsd  0x8(%rdi),%xmm0
mulsd  %xmm0,%xmm0
mulsd  %xmm1,%xmm1
addsd  %xmm0,%xmm1
movsd  0x10(%rdi),%xmm0
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @bot_vector_magnitude_squared_3d(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = getelementptr inbounds double, double* %3, i64 0
%5 = load double, double* %4
%6 = load double*, double** %2
%7 = getelementptr inbounds double, double* %6, i64 0
%8 = load double, double* %7
%9 = load double*, double** %2
%10 = getelementptr inbounds double, double* %9, i64 1
%11 = load double, double* %10
%12 = load double*, double** %2
%13 = getelementptr inbounds double, double* %12, i64 1
%14 = load double, double* %13
%15 = fmul double %11, %14
%16 = call double @llvm.fmuladd.f64(double %5, double %8, double %15)
%17 = load double*, double** %2
%18 = getelementptr inbounds double, double* %17, i64 2
%19 = load double, double* %18
%20 = load double*, double** %2
%21 = getelementptr inbounds double, double* %20, i64 2
%22 = load double, double* %21
%23 = call double @llvm.fmuladd.f64(double %19, double %22, double %16)
ret double %23
}

LLVM IR (-O2):
define double @bot_vector_magnitude_squared_3d(double* nocapture %0) {
%2 = load double, double* %0
%3 = getelementptr inbounds double, double* %0, i64 1
%4 = load double, double* %3
%5 = fmul double %4, %4
%6 = tail call double @llvm.fmuladd.f64(double %2, double %2, double %5)
%7 = getelementptr inbounds double, double* %0, i64 2
%8 = load double, double* %7
%9 = tail call double @llvm.fmuladd.f64(double %8, double %8, double %6)
ret double %9
}
/* Variables and functions */
int close(int);
int iob_pipe_close(void *p) { return close((int)(size_t)p); }


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

x86 assembly (clang, -O2):
<iob_pipe_close>:
jmp    1030 <close@plt>

LLVM IR (-O0):
define i32 @iob_pipe_close(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = ptrtoint i8* %3 to i64
%5 = trunc i64 %4 to i32
%6 = call i32 @close(i32 %5)
ret i32 %6
}

LLVM IR (-O2):
define i32 @iob_pipe_close(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = trunc i64 %2 to i32
%4 = tail call i32 @close(i32 %3)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ outb(int, int);
void uart_init(void) {
  outb(0x0, 1016 + 0x01);
  outb(0x01, 1016 + 0x02);
  outb(0x80 | 3, 1016 + 0x03);
  outb((115200 / 115200) & 0xFF, 1016 + 0x00);
  outb(((115200 / 115200) >> 8) & 0xFF, 1016 + 0x01);
  outb(3, 1016 + 0x03);
}


x86 assembly (clang, -O0):
<uart_init>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
mov    $0x3f9,%esi
call   1030 <outb@plt>
mov    $0x1,%edi
mov    $0x3fa,%esi
call   1030 <outb@plt>
mov    $0x83,%edi
mov    $0x3fb,%esi
call   1030 <outb@plt>
mov    $0x1,%edi
mov    $0x3f8,%esi
call   1030 <outb@plt>
xor    %edi,%edi
mov    $0x3f9,%esi
call   1030 <outb@plt>
mov    $0x3,%edi
mov    $0x3fb,%esi
call   1030 <outb@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<uart_init>:
push   %rax
xor    %edi,%edi
mov    $0x3f9,%esi
call   1030 <outb@plt>
mov    $0x1,%edi
mov    $0x3fa,%esi
call   1030 <outb@plt>
mov    $0x83,%edi
mov    $0x3fb,%esi
call   1030 <outb@plt>
mov    $0x1,%edi
mov    $0x3f8,%esi
call   1030 <outb@plt>
xor    %edi,%edi
mov    $0x3f9,%esi
call   1030 <outb@plt>
mov    $0x3,%edi
mov    $0x3fb,%esi
pop    %rax
jmp    1030 <outb@plt>

LLVM IR (-O0):
define void @uart_init() {
%1 = call i32 @outb(i32 0, i32 1017)
%2 = call i32 @outb(i32 1, i32 1018)
%3 = call i32 @outb(i32 131, i32 1019)
%4 = call i32 @outb(i32 1, i32 1016)
%5 = call i32 @outb(i32 0, i32 1017)
%6 = call i32 @outb(i32 3, i32 1019)
ret void
}

LLVM IR (-O2):
define void @uart_init() {
%1 = tail call i32 @outb(i32 0, i32 1017)
%2 = tail call i32 @outb(i32 1, i32 1018)
%3 = tail call i32 @outb(i32 131, i32 1019)
%4 = tail call i32 @outb(i32 1, i32 1016)
%5 = tail call i32 @outb(i32 0, i32 1017)
%6 = tail call i32 @outb(i32 3, i32 1019)
ret void
}
void I2CClockActivitySelect(unsigned int baseAdd, unsigned int flag) {
  (*((volatile unsigned int *)(baseAdd + (0x10)))) &= ~((0x00000300u));
  (*((volatile unsigned int *)(baseAdd + (0x10)))) |= flag;
}


x86 assembly (clang, -O0):
<I2CClockActivitySelect>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%eax
mov    %eax,%eax
mov    (%rax),%ecx
and    $0xfffffcff,%ecx
mov    %ecx,(%rax)
mov    -0x8(%rbp),%edx
mov    -0x4(%rbp),%eax
add    $0x10,%eax
mov    %eax,%eax
mov    (%rax),%ecx
or     %edx,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<I2CClockActivitySelect>:
add    $0x10,%edi
andl   $0xfffffcff,(%rdi)
or     %esi,(%rdi)
ret

LLVM IR (-O0):
define void @I2CClockActivitySelect(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = add i32 %5, 16
%7 = zext i32 %6 to i64
%8 = inttoptr i64 %7 to i32*
%9 = load volatile i32, i32* %8
%10 = and i32 %9, -769
store volatile i32 %10, i32* %8
%11 = load i32, i32* %4
%12 = load i32, i32* %3
%13 = add i32 %12, 16
%14 = zext i32 %13 to i64
%15 = inttoptr i64 %14 to i32*
%16 = load volatile i32, i32* %15
%17 = or i32 %16, %11
store volatile i32 %17, i32* %15
ret void
}

LLVM IR (-O2):
define void @I2CClockActivitySelect(i32 %0, i32 %1) {
%3 = add i32 %0, 16
%4 = zext i32 %3 to i64
%5 = inttoptr i64 %4 to i32*
%6 = load volatile i32, i32* %5
%7 = and i32 %6, -769
store volatile i32 %7, i32* %5
%8 = load volatile i32, i32* %5
%9 = or i32 %8, %1
store volatile i32 %9, i32* %5
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;

/* Variables and functions */
uint16_t unpack16_int(uint8_t *buf) { return (buf[0] << 8) | buf[1]; }


x86 assembly (clang, -O0):
<unpack16_int>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
or     0x4(%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<unpack16_int>:
mov    (%rdi),%eax
shl    $0x8,%eax
or     0x4(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @unpack16_int(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 = shl i32 %5, 8
%7 = load i32*, i32** %2
%8 = getelementptr inbounds i32, i32* %7, i64 1
%9 = load i32, i32* %8
%10 = or i32 %6, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @unpack16_int(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = shl i32 %2, 8
%4 = getelementptr inbounds i32, i32* %0, i64 1
%5 = load i32, i32* %4
%6 = or i32 %3, %5
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isprint(int);
void t_isprint_0xd3() {
  Assert_real((isprint(211) == 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_isprint.c",
              1060, ("isprint should be 0 for 0xd3"));
}


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

x86 assembly (clang, -O2):
<t_isprint_0xd3>:
push   %rax
mov    $0xd3,%edi
call   1030 <isprint@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x424,%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_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0xd3\00"
define void @t_isprint_0xd3() {
%1 = call i64 @isprint(i32 211)
%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 1060, 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_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0xd3\00"
define void @t_isprint_0xd3() {
%1 = tail call i64 @isprint(i32 211)
%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 1060, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}