xunge/DecIR huggingface dataset:
void U32TO8(unsigned char *p, unsigned long v) {
  p[0] = (v)&0xff;
  p[1] = (v >> 8) & 0xff;
  p[2] = (v >> 16) & 0xff;
  p[3] = (v >> 24) & 0xff;
}


x86 assembly (clang, -O0):
<U32TO8>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
shr    $0x8,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0x10(%rbp),%rax
shr    $0x10,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0x10(%rbp),%rax
shr    $0x18,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x3(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<U32TO8>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
define void @U32TO8(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = and i64 %5, 255
%7 = trunc i64 %6 to i8
%8 = load i8*, i8** %3
%9 = getelementptr inbounds i8, i8* %8, i64 0
store i8 %7, i8* %9
%10 = load i64, i64* %4
%11 = lshr i64 %10, 8
%12 = and i64 %11, 255
%13 = trunc i64 %12 to i8
%14 = load i8*, i8** %3
%15 = getelementptr inbounds i8, i8* %14, i64 1
store i8 %13, i8* %15
%16 = load i64, i64* %4
%17 = lshr i64 %16, 16
%18 = and i64 %17, 255
%19 = trunc i64 %18 to i8
%20 = load i8*, i8** %3
%21 = getelementptr inbounds i8, i8* %20, i64 2
store i8 %19, i8* %21
%22 = load i64, i64* %4
%23 = lshr i64 %22, 24
%24 = and i64 %23, 255
%25 = trunc i64 %24 to i8
%26 = load i8*, i8** %3
%27 = getelementptr inbounds i8, i8* %26, i64 3
store i8 %25, i8* %27
ret void
}

LLVM IR (-O2):
define void @U32TO8(i8* nocapture writeonly %0, i64 %1) {
%3 = trunc i64 %1 to i8
store i8 %3, i8* %0
%4 = lshr i64 %1, 8
%5 = trunc i64 %4 to i8
%6 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %5, i8* %6
%7 = lshr i64 %1, 16
%8 = trunc i64 %7 to i8
%9 = getelementptr inbounds i8, i8* %0, i64 2
store i8 %8, i8* %9
%10 = lshr i64 %1, 24
%11 = trunc i64 %10 to i8
%12 = getelementptr inbounds i8, i8* %0, i64 3
store i8 %11, i8* %12
ret void
}
unsigned long getNextAmplitudeTri(unsigned long currentAmplitude,
                                  unsigned long currentTime,
                                  unsigned long currentFrequency) {}


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

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

LLVM IR (-O0):
define i64 @getNextAmplitudeTri(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
store i64 %0, i64* %5
store i64 %1, i64* %6
store i64 %2, i64* %7
%8 = load i64, i64* %4
ret i64 %8
}

LLVM IR (-O2):
define i64 @getNextAmplitudeTri(i64 %0, i64 %1, i64 %2) {
ret i64 undef
}
/* Variables and functions */
int /*<<< orphan*/ isspace(char);
int util_checkspace(char *str) {
  while (*str) {
    if (!isspace(*str))
      return -1;
    str++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<util_checkspace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     115b <util_checkspace+0x4b>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%eax
jne    114a <util_checkspace+0x3a>
movl   $0xffffffff,-0x4(%rbp)
jmp    1162 <util_checkspace+0x52>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    111c <util_checkspace+0xc>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<util_checkspace>:
push   %rbp
push   %rbx
push   %rax
mov    (%rdi),%al
xor    %ebp,%ebp
test   %al,%al
je     114e <util_checkspace+0x3e>
mov    %rdi,%rbx
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl %al,%edi
call   1030 <isspace@plt>
test   %eax,%eax
je     1149 <util_checkspace+0x39>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <util_checkspace+0x20>
jmp    114e <util_checkspace+0x3e>
mov    $0xffffffff,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @util_checkspace(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %7
4: ; preds = %7
%5 = load i8, i8* %12
%6 = icmp eq i8 %5, 0
br i1 %6, label %13, label %7
7: ; preds = %1, %4
%8 = phi i8 [ %5, %4 ], [ %2, %1 ]
%9 = phi i8* [ %12, %4 ], [ %0, %1 ]
%10 = tail call i32 @isspace(i8 signext %8)
%11 = icmp eq i32 %10, 0
%12 = getelementptr inbounds i8, i8* %9, i64 1
br i1 %11, label %13, label %4
13: ; preds = %7, %4, %1
%14 = phi i32 [ 0, %1 ], [ 0, %4 ], [ -1, %7 ]
ret i32 %14
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
uint32_t get_uint32_le(uint8_t *buf) {
  uint32_t res;
  res = buf[3] << 24 | buf[2] << 16 | buf[1] << 8 | buf[0];
  return res;
}


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

x86 assembly (clang, -O2):
<get_uint32_le>:
mov    0xc(%rdi),%ecx
shl    $0x18,%ecx
mov    0x4(%rdi),%eax
mov    0x8(%rdi),%edx
shl    $0x10,%edx
or     %ecx,%edx
shl    $0x8,%eax
or     %edx,%eax
or     (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @get_uint32_le(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = getelementptr inbounds i32, i32* %4, i64 3
%6 = load i32, i32* %5
%7 = shl i32 %6, 24
%8 = load i32*, i32** %2
%9 = getelementptr inbounds i32, i32* %8, i64 2
%10 = load i32, i32* %9
%11 = shl i32 %10, 16
%12 = or i32 %7, %11
%13 = load i32*, i32** %2
%14 = getelementptr inbounds i32, i32* %13, i64 1
%15 = load i32, i32* %14
%16 = shl i32 %15, 8
%17 = or i32 %12, %16
%18 = load i32*, i32** %2
%19 = getelementptr inbounds i32, i32* %18, i64 0
%20 = load i32, i32* %19
%21 = or i32 %17, %20
store i32 %21, i32* %3
%22 = load i32, i32* %3
ret i32 %22
}

LLVM IR (-O2):
define i32 @get_uint32_le(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 3
%3 = load i32, i32* %2
%4 = shl i32 %3, 24
%5 = getelementptr inbounds i32, i32* %0, i64 2
%6 = load i32, i32* %5
%7 = shl i32 %6, 16
%8 = or i32 %7, %4
%9 = getelementptr inbounds i32, i32* %0, i64 1
%10 = load i32, i32* %9
%11 = shl i32 %10, 8
%12 = or i32 %8, %11
%13 = load i32, i32* %0
%14 = or i32 %12, %13
ret i32 %14
}
/* Type definitions */
struct clk {
  int dummy;
};

/* Variables and functions */
struct clk *clk_fixed_factor(char const *, char const *, unsigned int,
                             unsigned int);
struct clk *mxs_clk_fixed_factor(const char *name, const char *parent_name,
                                 unsigned int mult, unsigned int div) {
  return clk_fixed_factor(name, parent_name, mult, div);
}


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

x86 assembly (clang, -O2):
<mxs_clk_fixed_factor>:
jmp    1030 <clk_fixed_factor@plt>

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

LLVM IR (-O2):
%struct.clk = type { i32 }
define %struct.clk* @mxs_clk_fixed_factor(i8* %0, i8* %1, i32 %2, i32 %3) {
%5 = tail call %struct.clk* @clk_fixed_factor(i8* %0, i8* %1, i32 %2, i32 %3)
ret %struct.clk* %5
}
/* Variables and functions */
int /*<<< orphan*/ getLine(char *, int);
int /*<<< orphan*/ printTokensInReverse(char *);
int /*<<< orphan*/ printf(char *);
char *strtok(char *, char *);
int main() {
  char str[80];
  char *tokenPtr;
  printf("Enter sentence: ");
  getLine(str, 80);
  tokenPtr = strtok(str, " ");
  printTokensInReverse(tokenPtr);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
call   1040 <printf@plt>
lea    -0x60(%rbp),%rdi
mov    $0x50,%esi
call   1050 <getLine@plt>
lea    -0x60(%rbp),%rdi
lea    0xe9b(%rip),%rsi
call   1060 <strtok@plt>
mov    %rax,-0x68(%rbp)
mov    -0x68(%rbp),%rdi
call   1030 <printTokensInReverse@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x50,%rsp
lea    0xeb4(%rip),%rdi
call   1040 <printf@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x50,%esi
call   1050 <getLine@plt>
lea    0xea7(%rip),%rsi
mov    %rbx,%rdi
call   1060 <strtok@plt>
mov    %rax,%rdi
call   1030 <printTokensInReverse@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"Enter sentence: \00"
@.str.1 = [2 x i8] c" \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [80 x i8]
%3 = alloca i8*
store i32 0, i32* %1
%4 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%5 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 0
%6 = call i32 @getLine(i8* %5, i32 80)
%7 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 0
%8 = call i8* @strtok(i8* %7, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i8* %8, i8** %3
%9 = load i8*, i8** %3
%10 = call i32 @printTokensInReverse(i8* %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"Enter sentence: \00"
@.str.1 = [2 x i8] c" \00"
define i32 @main() {
%1 = alloca [80 x i8]
%2 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 0
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @getLine(i8* %2, i32 80)
%5 = call i8* @strtok(i8* %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 @printTokensInReverse(i8* %5)
ret i32 0
}
/* Variables and functions */
void *malloc(unsigned int);
void *_Znwj(unsigned int s) { return malloc(s); }


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

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

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

LLVM IR (-O2):
define noalias i8* @_Znwj(i32 %0) {
%2 = tail call i8* @malloc(i32 %0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ configurePatchOok();
int /*<<< orphan*/ enterCpePatchOok();
void refreshPatchOok(void) {
  enterCpePatchOok();
  configurePatchOok();
}


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

x86 assembly (clang, -O2):
<refreshPatchOok>:
push   %rax
xor    %eax,%eax
call   1040 <enterCpePatchOok@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <configurePatchOok@plt>

LLVM IR (-O0):
define void @refreshPatchOok() {
%1 = call i32 (...) @enterCpePatchOok()
%2 = call i32 (...) @configurePatchOok()
ret void
}

LLVM IR (-O2):
define void @refreshPatchOok() {
%1 = tail call i32 (...) @enterCpePatchOok()
%2 = tail call i32 (...) @configurePatchOok()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
size_t read_FP_BE(int /*<<< orphan*/ *, int /*<<< orphan*/ *, int);
size_t uint16ReadFromFP(FILE *fp, uint16_t *data) {
  return read_FP_BE(fp, data, sizeof(uint16_t));
}


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

x86 assembly (clang, -O2):
<uint16ReadFromFP>:
mov    $0x4,%edx
jmp    1030 <read_FP_BE@plt>

LLVM IR (-O0):
define i64 @uint16ReadFromFP(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%5 = load i32*, i32** %3
%6 = load i32*, i32** %4
%7 = call i64 @read_FP_BE(i32* %5, i32* %6, i32 4)
ret i64 %7
}

LLVM IR (-O2):
define i64 @uint16ReadFromFP(i32* %0, i32* %1) {
%3 = tail call i64 @read_FP_BE(i32* %0, i32* %1, i32 4)
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ ExtSelect(char *, char *, int /*<<< orphan*/);
void ExttMailServerSelect(void) {
  ExtSelect("tMailServer",
            "tMailServer.uMailServer,tMailServer.cLabel,tMailServer.cList,"
            "tMailServer.uOwner,tMailServer.uCreatedBy,tMailServer."
            "uCreatedDate,tMailServer.uModBy,tMailServer.uModDate",
            0);
}


x86 assembly (clang, -O0):
<ExttMailServerSelect>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xeea(%rip),%rsi
xor    %edx,%edx
call   1030 <ExtSelect@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ExttMailServerSelect>:
lea    0xee9(%rip),%rdi
lea    0xeee(%rip),%rsi
xor    %edx,%edx
jmp    1030 <ExtSelect@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"tMailServer\00"
@.str.1 = [168 x i8] c"tMailServer.uMailServer,tMailServer.cLabel,tMailServer.cList,tMailServer.uOwner,tMailServer.uCreatedBy,tMailServer.uCreatedDate,tMailServer.uModBy,tMailServer.uModDate\00"
define void @ExttMailServerSelect() {
%1 = call i32 @ExtSelect(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str.1, i64 0, i64 0), i32 0)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"tMailServer\00"
@.str.1 = [168 x i8] c"tMailServer.uMailServer,tMailServer.cLabel,tMailServer.cList,tMailServer.uOwner,tMailServer.uCreatedBy,tMailServer.uCreatedDate,tMailServer.uModBy,tMailServer.uModDate\00"
define void @ExttMailServerSelect() {
%1 = tail call i32 @ExtSelect(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str.1, i64 0, i64 0), i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char const *, int, int);
int main(void) {
  const char *OUTPUT_FORMAT = "x = %d, y = %d\n";
  int x = 1, y = 2;
  printf(OUTPUT_FORMAT, x, y);
  do {
    int temp = x;
    x = y;
    y = temp;
  } while (0);
  printf(OUTPUT_FORMAT, x, y);
  getchar();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xed8(%rip),%rbx
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x2,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
mov    $0x1,%edx
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"x = %d, y = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8** %2
store i32 1, i32* %3
store i32 2, i32* %4
%6 = load i8*, i8** %2
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = call i32 @printf(i8* %6, i32 %7, i32 %8)
br label %10
10: ; preds = %0
%11 = load i32, i32* %3
store i32 %11, i32* %5
%12 = load i32, i32* %4
store i32 %12, i32* %3
%13 = load i32, i32* %5
store i32 %13, i32* %4
br label %14
14: ; preds = %10
%15 = load i8*, i8** %2
%16 = load i32, i32* %3
%17 = load i32, i32* %4
%18 = call i32 @printf(i8* %15, i32 %16, i32 %17)
%19 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"x = %d, y = %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 1, i32 2)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 2, i32 1)
%3 = tail call i32 (...) @getchar()
ret i32 0
}
void print_percentage(long bytes, long expected) {}


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

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

LLVM IR (-O0):
define void @print_percentage(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
ret void
}

LLVM IR (-O2):
define void @print_percentage(i64 %0, i64 %1) {
ret void
}
int is_prime(int x) {
  int ret = 1;
  int i;
  if (x == 1)
    ret = 0;
  for (i = 2; i < x; i++) {
    if (x % i == 0) {
      ret = 0;
      break;
    }
  }
  return ret;
}


x86 assembly (clang, -O0):
<is_prime>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x1,-0x4(%rbp)
jne    111f <is_prime+0x1f>
movl   $0x0,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1161 <is_prime+0x61>
mov    -0x4(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cmp    $0x0,%edx
jne    114e <is_prime+0x4e>
movl   $0x0,-0x8(%rbp)
jmp    1161 <is_prime+0x61>
jmp    1153 <is_prime+0x53>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1126 <is_prime+0x26>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_prime>:
cmp    $0x1,%edi
setne  %cl
cmp    $0x3,%edi
jl     1120 <is_prime+0x20>
mov    $0x2,%esi
mov    %edi,%eax
cltd
idiv   %esi
test   %edx,%edx
je     1124 <is_prime+0x24>
add    $0x1,%esi
cmp    %esi,%edi
jne    1110 <is_prime+0x10>
movzbl %cl,%eax
ret
xor    %ecx,%ecx
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @is_prime(i32 %0) {
%2 = icmp ne i32 %0, 1
%3 = icmp sgt i32 %0, 2
br i1 %3, label %6, label %11
4: ; preds = %6
%5 = icmp eq i32 %10, %0
br i1 %5, label %11, label %6
6: ; preds = %1, %4
%7 = phi i32 [ %10, %4 ], [ 2, %1 ]
%8 = srem i32 %0, %7
%9 = icmp eq i32 %8, 0
%10 = add nuw nsw i32 %7, 1
br i1 %9, label %11, label %4
11: ; preds = %4, %6, %1
%12 = phi i1 [ %2, %1 ], [ false, %6 ], [ %2, %4 ]
%13 = zext i1 %12 to i32
ret i32 %13
}
/* Type definitions */
struct backlight {
  int dummy;
};

/* Variables and functions */
long backlight_get(struct backlight *, char *);
long backlight_get_actual_brightness(struct backlight *backlight) {
  return backlight_get(backlight, "actual_brightness");
}


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

x86 assembly (clang, -O2):
<backlight_get_actual_brightness>:
lea    0xee9(%rip),%rsi
jmp    1030 <backlight_get@plt>

LLVM IR (-O0):
%struct.backlight = type { i32 }
@.str = [18 x i8] c"actual_brightness\00"
define i64 @backlight_get_actual_brightness(%struct.backlight* %0) {
%2 = alloca %struct.backlight*
store %struct.backlight* %0, %struct.backlight** %2
%3 = load %struct.backlight*, %struct.backlight** %2
%4 = call i64 @backlight_get(%struct.backlight* %3, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret i64 %4
}

LLVM IR (-O2):
%struct.backlight = type { i32 }
@.str = [18 x i8] c"actual_brightness\00"
define i64 @backlight_get_actual_brightness(%struct.backlight* %0) {
%2 = tail call i64 @backlight_get(%struct.backlight* %0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret i64 %2
}
int is_decimal(char c) {
  if (c < '0' || c > '9')
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<is_decimal>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x30,%eax
jl     1124 <is_decimal+0x24>
movsbl -0x5(%rbp),%eax
cmp    $0x39,%eax
jle    1130 <is_decimal+0x30>
movl   $0x0,-0x4(%rbp)
jmp    1137 <is_decimal+0x37>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_decimal>:
add    $0xd0,%dil
xor    %eax,%eax
cmp    $0xa,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @is_decimal(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp slt i32 %5, 48
br i1 %6, label %11, label %7
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sgt i32 %9, 57
br i1 %10, label %11, label %12
11: ; preds = %7, %1
store i32 0, i32* %2
br label %13
12: ; preds = %7
store i32 1, i32* %2
br label %13
13: ; preds = %12, %11
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @is_decimal(i8 signext %0) {
%2 = add i8 %0, -48
%3 = icmp ult i8 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ f2(int);
void f(int n) {
  if (n < 3)
    return;
  n--;
  f2(n);
  assert(1);
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x3,-0x4(%rbp)
jge    113a <f+0x1a>
jmp    1155 <f+0x35>
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <f2@plt>
mov    $0x1,%edi
call   1040 <assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
cmp    $0x3,%edi
jge    1126 <f+0x6>
ret
push   %rax
add    $0xffffffff,%edi
call   1030 <f2@plt>
mov    $0x1,%edi
pop    %rax
jmp    1040 <assert@plt>

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

LLVM IR (-O2):
define void @f(i32 %0) {
%2 = icmp slt i32 %0, 3
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = add nsw i32 %0, -1
%5 = tail call i32 @f2(i32 %4)
%6 = tail call i32 @assert(i32 1)
br label %7
7: ; preds = %1, %3
ret void
}
__attribute__((always_)) void touch_softlockup_watchdog(void) {}


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

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

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

LLVM IR (-O2):
define void @touch_softlockup_watchdog() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(unsigned long *);
void xt_core_note_maximum_unsigned_long(unsigned long *maximum,
                                        unsigned long candidate) {
  assert(maximum);
  if (candidate > *maximum) {
    *maximum = candidate;
  }
}


x86 assembly (clang, -O0):
<xt_core_note_maximum_unsigned_long>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <assert@plt>
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
cmp    (%rcx),%rax
jbe    1145 <xt_core_note_maximum_unsigned_long+0x35>
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xt_core_note_maximum_unsigned_long>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <assert@plt>
cmp    %r14,(%rbx)
jae    1127 <xt_core_note_maximum_unsigned_long+0x17>
mov    %r14,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @xt_core_note_maximum_unsigned_long(i64* %0, i64 %1) {
%3 = alloca i64*
%4 = alloca i64
store i64* %0, i64** %3
store i64 %1, i64* %4
%5 = load i64*, i64** %3
%6 = call i32 @assert(i64* %5)
%7 = load i64, i64* %4
%8 = load i64*, i64** %3
%9 = load i64, i64* %8
%10 = icmp ugt i64 %7, %9
br i1 %10, label %11, label %14
11: ; preds = %2
%12 = load i64, i64* %4
%13 = load i64*, i64** %3
store i64 %12, i64* %13
br label %14
14: ; preds = %11, %2
ret void
}

LLVM IR (-O2):
define void @xt_core_note_maximum_unsigned_long(i64* %0, i64 %1) {
%3 = tail call i32 @assert(i64* %0)
%4 = load i64, i64* %0
%5 = icmp ult i64 %4, %1
br i1 %5, label %6, label %7
6: ; preds = %2
store i64 %1, i64* %0
br label %7
7: ; preds = %6, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isupper(int);
void t_isupper_0xfc() {
  Assert_real((isupper(252) == 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_isupper.c",
              1265, ("isupper should be 0 for 0xfc"));
}


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

x86 assembly (clang, -O2):
<t_isupper_0xfc>:
push   %rax
mov    $0xfc,%edi
call   1030 <isupper@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x4f1,%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_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0xfc\00"
define void @t_isupper_0xfc() {
%1 = call i64 @isupper(i32 252)
%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 1265, 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_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0xfc\00"
define void @t_isupper_0xfc() {
%1 = tail call i64 @isupper(i32 252)
%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 1265, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ clock();
unsigned long time(int /*<<< orphan*/ *);
unsigned long _clockSeed() {
  unsigned long seed;
  seed = time(NULL);
  seed += clock();
  return seed;
}


x86 assembly (clang, -O0):
<_clockSeed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %rax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <clock@plt>
add    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_clockSeed>:
push   %rbx
xor    %edi,%edi
call   1040 <time@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1030 <clock@plt>
add    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @_clockSeed() {
%1 = alloca i64
%2 = call i64 @time(i32* null)
store i64 %2, i64* %1
%3 = call i64 (...) @clock()
%4 = load i64, i64* %1
%5 = add i64 %4, %3
store i64 %5, i64* %1
%6 = load i64, i64* %1
ret i64 %6
}

LLVM IR (-O2):
define i64 @_clockSeed() {
%1 = tail call i64 @time(i32* null)
%2 = tail call i64 (...) @clock()
%3 = add i64 %2, %1
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ openUSBDevice();
int /*<<< orphan*/ uflush();
void uopen() {
  openUSBDevice();
  uflush();
}


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

x86 assembly (clang, -O2):
<uopen>:
push   %rax
xor    %eax,%eax
call   1030 <openUSBDevice@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <uflush@plt>

LLVM IR (-O0):
define void @uopen() {
%1 = call i32 (...) @openUSBDevice()
%2 = call i32 (...) @uflush()
ret void
}

LLVM IR (-O2):
define void @uopen() {
%1 = tail call i32 (...) @openUSBDevice()
%2 = tail call i32 (...) @uflush()
ret void
}
/* Variables and functions */
int kmp(char *, char *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  char *s = "";
  char *p = "";
  int lenOfP = 0;
  int *next = NULL;
  int i, j;
  int r = 0;
  s = "ababcabcacbab";
  p = "abcac";
  r = kmp(s, p, 0);
  printf("Index result: %d", r);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xed7(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    0xecc(%rip),%rax
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movq   $0x0,-0x28(%rbp)
movl   $0x0,-0x34(%rbp)
lea    0xe9e(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    0xea1(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
xor    %edx,%edx
call   1040 <kmp@plt>
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%esi
lea    0xe87(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str.1 = [14 x i8] c"ababcabcacbab\00"
@.str.2 = [6 x i8] c"abcac\00"
@.str.3 = [17 x i8] c"Index result: %d\00"
define i32 @main() {
%1 = tail call i32 @kmp(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 0)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ e_adc();
int /*<<< orphan*/ e_imm();
void e_adc_imm() {
  e_imm();
  e_adc();
}


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

x86 assembly (clang, -O2):
<e_adc_imm>:
push   %rax
xor    %eax,%eax
call   1030 <e_imm@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <e_adc@plt>

LLVM IR (-O0):
define void @e_adc_imm() {
%1 = call i32 (...) @e_imm()
%2 = call i32 (...) @e_adc()
ret void
}

LLVM IR (-O2):
define void @e_adc_imm() {
%1 = tail call i32 (...) @e_imm()
%2 = tail call i32 (...) @e_adc()
ret void
}
/* Type definitions */
typedef int time_t;

/* Variables and functions */
int /*<<< orphan*/ _exit(int);
time_t time(time_t *t) {
  _exit(-1);
  return -1;
}


x86 assembly (clang, -O0):
<time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0xffffffff,%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<time>:
push   %rax
mov    $0xffffffff,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
define i32 @time(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = call i32 @_exit(i32 -1)
unreachable
}

LLVM IR (-O2):
define i32 @time(i32* nocapture readnone %0) {
%2 = tail call i32 @_exit(i32 -1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void printarray(int a[], int len) {
  for (int i = 0; i < len; i++) {
    printf("%d ", a[i]);
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<printarray>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1159 <printarray+0x49>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <printarray+0x16>
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printarray>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1157 <printarray+0x37>
mov    %rdi,%r15
mov    %esi,%r12d
lea    0xec7(%rip),%r14
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <printarray+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define void @printarray(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %8
6: ; preds = %8, %2
%7 = tail call i32 @putchar(i32 10)
ret void
8: ; preds = %4, %8
%9 = phi i64 [ 0, %4 ], [ %13, %8 ]
%10 = getelementptr inbounds i32, i32* %0, i64 %9
%11 = load i32, i32* %10
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = add nuw nsw i64 %9, 1
%14 = icmp eq i64 %13, %5
br i1 %14, label %6, label %8
}
/* Variables and functions */
int /*<<< orphan*/ VDP_fade(int /*<<< orphan*/, int, unsigned short const *,
                            unsigned short const *, unsigned short,
                            unsigned char);
void VDP_fadeAll(const unsigned short *palsrc, const unsigned short *paldst,
                 unsigned short numframe, unsigned char async) {
  VDP_fade(0, 63, palsrc, paldst, numframe, async);
}


x86 assembly (clang, -O0):
<VDP_fadeAll>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %cl,%al
mov    %dx,%cx
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %cx,-0x12(%rbp)
mov    %al,-0x13(%rbp)
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x12(%rbp),%ax
xor    %edi,%edi
mov    $0x3f,%esi
movzwl %ax,%r8d
movzbl -0x13(%rbp),%r9d
call   1030 <VDP_fade@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<VDP_fadeAll>:
mov    %ecx,%r9d
mov    %edx,%r8d
mov    %rsi,%rcx
mov    %rdi,%rdx
xor    %edi,%edi
mov    $0x3f,%esi
jmp    1030 <VDP_fade@plt>

LLVM IR (-O0):
define void @VDP_fadeAll(i16* %0, i16* %1, i16 zeroext %2, i8 zeroext %3) {
%5 = alloca i16*
%6 = alloca i16*
%7 = alloca i16
%8 = alloca i8
store i16* %0, i16** %5
store i16* %1, i16** %6
store i16 %2, i16* %7
store i8 %3, i8* %8
%9 = load i16*, i16** %5
%10 = load i16*, i16** %6
%11 = load i16, i16* %7
%12 = load i8, i8* %8
%13 = call i32 @VDP_fade(i32 0, i32 63, i16* %9, i16* %10, i16 zeroext %11, i8 zeroext %12)
ret void
}

LLVM IR (-O2):
define void @VDP_fadeAll(i16* %0, i16* %1, i16 zeroext %2, i8 zeroext %3) {
%5 = tail call i32 @VDP_fade(i32 0, i32 63, i16* %0, i16* %1, i16 zeroext %2, i8 zeroext %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ BSP_WriteIcr(unsigned long);
int /*<<< orphan*/ printf(char *, unsigned int);
void BSP_ClearDspInterrupt(unsigned int dspInt) {
  unsigned long tmp;
  if (dspInt > 15 || dspInt < 4) {
    printf("bad dsp_int%d\n", dspInt);
    return;
  }
  tmp = 0;
  tmp |= (1 << dspInt);
  BSP_WriteIcr(tmp);
}


x86 assembly (clang, -O0):
<BSP_ClearDspInterrupt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0xf,-0x4(%rbp)
ja     113f <BSP_ClearDspInterrupt+0x1f>
cmpl   $0x4,-0x4(%rbp)
jae    1153 <BSP_ClearDspInterrupt+0x33>
mov    -0x4(%rbp),%esi
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
jmp    1178 <BSP_ClearDspInterrupt+0x58>
movq   $0x0,-0x10(%rbp)
mov    -0x4(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
cltq
or     -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <BSP_WriteIcr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BSP_ClearDspInterrupt>:
mov    %edi,%ecx
lea    -0x10(%rcx),%eax
cmp    $0xfffffff3,%eax
ja     1138 <BSP_ClearDspInterrupt+0x18>
lea    0xecf(%rip),%rdi
mov    %ecx,%esi
jmp    1030 <printf@plt>
mov    $0x1,%edi
shl    %cl,%edi
jmp    1040 <BSP_WriteIcr@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"bad dsp_int%d\0A\00"
define void @BSP_ClearDspInterrupt(i32 %0) {
%2 = alloca i32
%3 = alloca i64
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = icmp ugt i32 %4, 15
br i1 %5, label %9, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = icmp ult i32 %7, 4
br i1 %8, label %9, label %12
9: ; preds = %6, %1
%10 = load i32, i32* %2
%11 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %10)
br label %20
12: ; preds = %6
store i64 0, i64* %3
%13 = load i32, i32* %2
%14 = shl i32 1, %13
%15 = sext i32 %14 to i64
%16 = load i64, i64* %3
%17 = or i64 %16, %15
store i64 %17, i64* %3
%18 = load i64, i64* %3
%19 = call i32 @BSP_WriteIcr(i64 %18)
br label %20
20: ; preds = %12, %9
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"bad dsp_int%d\0A\00"
define void @BSP_ClearDspInterrupt(i32 %0) {
%2 = add i32 %0, -16
%3 = icmp ult i32 %2, -12
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %0)
br label %10
6: ; preds = %1
%7 = shl nuw nsw i32 1, %0
%8 = zext i32 %7 to i64
%9 = tail call i32 @BSP_WriteIcr(i64 %8)
br label %10
10: ; preds = %6, %4
ret void
}
void HMAC_CTX_set_flags(void) {}


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

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

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

LLVM IR (-O2):
define void @HMAC_CTX_set_flags() {
ret void
}
int foo(void) {
  int a, b, c;
  asm("# Magic instruction" : "=r"(a) : : "eax");
  asm("# Magic instruction" : "=r"(b) : : "edx");
  asm("# Magic instruction" : "=r"(c) : : "ecx");
  return a + b + c;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %ecx,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    %eax,-0x8(%rbp)
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
add    %ecx,%esi
add    %esi,%eax
ret

LLVM IR (-O0):
define i32 @foo() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = call i32 asm "# Magic instruction", "=r,~{eax},~{dirflag},~{fpsr},~{flags}"()
store i32 %4, i32* %1
%5 = call i32 asm "# Magic instruction", "=r,~{edx},~{dirflag},~{fpsr},~{flags}"()
store i32 %5, i32* %2
%6 = call i32 asm "# Magic instruction", "=r,~{ecx},~{dirflag},~{fpsr},~{flags}"()
store i32 %6, i32* %3
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = add nsw i32 %7, %8
%10 = load i32, i32* %3
%11 = add nsw i32 %9, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @foo() {
%1 = tail call i32 asm "# Magic instruction", "=r,~{eax},~{dirflag},~{fpsr},~{flags}"()
%2 = tail call i32 asm "# Magic instruction", "=r,~{edx},~{dirflag},~{fpsr},~{flags}"()
%3 = tail call i32 asm "# Magic instruction", "=r,~{ecx},~{dirflag},~{fpsr},~{flags}"()
%4 = add nsw i32 %2, %1
%5 = add nsw i32 %4, %3
ret i32 %5
}
/* Variables and functions */
scalar_t__ ft_strcmp(char const *, char const *);
int ft_strequ(char const *s1, char const *s2) {
  if (ft_strcmp(s1, s2) != 0)
    return (0);
  else
    return (1);
}


x86 assembly (clang, -O0):
<ft_strequ>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <ft_strcmp@plt>
cmp    $0x0,%rax
je     1143 <ft_strequ+0x33>
movl   $0x0,-0x4(%rbp)
jmp    114a <ft_strequ+0x3a>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_strequ>:
push   %rax
call   1030 <ft_strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @ft_strequ(i8* %0, i8* %1) {
%3 = tail call i64 @ft_strcmp(i8* %0, i8* %1)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
int HashMap_CalcArraySize(int totalElemNum) {
  int size = 0;
  size = (totalElemNum * 0.75);
  printf("[F:%s L:%d] TotalElem=%d, HashMapArray_size=%d\n", __FUNCTION__, 372,
         totalElemNum, size);
  return size;
}


x86 assembly (clang, -O0):
<HashMap_CalcArraySize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
movsd  0xed1(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%ecx
mov    -0x8(%rbp),%r8d
lea    0xec0(%rip),%rdi
lea    0xee9(%rip),%rsi
mov    $0x174,%edx
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<HashMap_CalcArraySize>:
push   %rbx
mov    %edi,%ecx
cvtsi2sd %edi,%xmm0
mulsd  0xee1(%rip),%xmm0
cvttsd2si %xmm0,%ebx
lea    0xede(%rip),%rdi
lea    0xf07(%rip),%rsi
mov    $0x174,%edx
mov    %ebx,%r8d
xor    %eax,%eax
call   1030 <printf@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [48 x i8] c"[F:%s L:%d] TotalElem=%d, HashMapArray_size=%d\0A\00"
@__FUNCTION__.HashMap_CalcArraySize = [22 x i8] c"HashMap_CalcArraySize\00"
define i32 @HashMap_CalcArraySize(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
%4 = load i32, i32* %2
%5 = sitofp i32 %4 to double
%6 = fmul double %5, 7.500000e-01
%7 = fptosi double %6 to i32
store i32 %7, i32* %3
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @__FUNCTION__.HashMap_CalcArraySize, i64 0, i64 0), i32 372, i32 %8, i32 %9)
%11 = load i32, i32* %3
ret i32 %11
}

LLVM IR (-O2):
@.str = [48 x i8] c"[F:%s L:%d] TotalElem=%d, HashMapArray_size=%d\0A\00"
@__FUNCTION__.HashMap_CalcArraySize = [22 x i8] c"HashMap_CalcArraySize\00"
define i32 @HashMap_CalcArraySize(i32 %0) {
%2 = sitofp i32 %0 to double
%3 = fmul double %2, 7.500000e-01
%4 = fptosi double %3 to i32
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @__FUNCTION__.HashMap_CalcArraySize, i64 0, i64 0), i32 372, i32 %0, i32 %4)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("C_Sanity\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 = [10 x i8] c"C_Sanity\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [9 x i8] c"C_Sanity\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
ret i32 0
}