xunge/DecIR huggingface dataset:
int are_equal(int a[], int b[], int length) {
  for (int i = 0; i < length; i++) {
    if (a[i] != b[i])
      return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<are_equal>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    115d <are_equal+0x5d>
mov    -0x10(%rbp),%rax
movslq -0x20(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    -0x18(%rbp),%rcx
movslq -0x20(%rbp),%rdx
cmp    (%rcx,%rdx,4),%eax
je     114a <are_equal+0x4a>
movl   $0x0,-0x4(%rbp)
jmp    1164 <are_equal+0x64>
jmp    114f <are_equal+0x4f>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1116 <are_equal+0x16>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<are_equal>:
test   %edx,%edx
jle    113d <are_equal+0x3d>
mov    (%rdi),%ecx
xor    %eax,%eax
cmp    (%rsi),%ecx
jne    113c <are_equal+0x3c>
mov    %edx,%r8d
mov    $0x1,%eax
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rax,%rdx
cmp    %rax,%r8
je     1134 <are_equal+0x34>
mov    (%rdi,%rdx,4),%ecx
lea    0x1(%rdx),%rax
cmp    (%rsi,%rdx,4),%ecx
je     1120 <are_equal+0x20>
xor    %eax,%eax
cmp    %r8,%rdx
setae  %al
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @are_equal(i32* nocapture %0, i32* nocapture %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %24
5: ; preds = %3
%6 = zext i32 %2 to i64
%7 = zext i32 %2 to i64
%8 = load i32, i32* %0
%9 = load i32, i32* %1
%10 = icmp eq i32 %8, %9
br i1 %10, label %11, label %24
11: ; preds = %5, %14
%12 = phi i64 [ %20, %14 ], [ 1, %5 ]
%13 = icmp eq i64 %12, %7
br i1 %13, label %21, label %14
14: ; preds = %11
%15 = getelementptr inbounds i32, i32* %0, i64 %12
%16 = load i32, i32* %15
%17 = getelementptr inbounds i32, i32* %1, i64 %12
%18 = load i32, i32* %17
%19 = icmp eq i32 %16, %18
%20 = add nuw nsw i64 %12, 1
br i1 %19, label %11, label %21
21: ; preds = %11, %14
%22 = icmp uge i64 %12, %6
%23 = zext i1 %22 to i32
br label %24
24: ; preds = %21, %5, %3
%25 = phi i32 [ 1, %3 ], [ 0, %5 ], [ %23, %21 ]
ret i32 %25
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int getc(int /*<<< orphan*/ *);
int /*<<< orphan*/ ungetc(int, int /*<<< orphan*/ *);
void Read_White_Space(FILE *stream) {
  int c;
  while ((c = getc(stream)) == ' ' || c == '\n' || c == '\t')
    ;
  ungetc(c, stream);
}


x86 assembly (clang, -O0):
<Read_White_Space>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <getc@plt>
mov    %eax,%ecx
mov    %ecx,-0xc(%rbp)
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0xd(%rbp)
je     1161 <Read_White_Space+0x41>
mov    $0x1,%al
cmpl   $0xa,-0xc(%rbp)
mov    %al,-0xd(%rbp)
je     1161 <Read_White_Space+0x41>
cmpl   $0x9,-0xc(%rbp)
sete   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    1171 <Read_White_Space+0x51>
jmp    1176 <Read_White_Space+0x56>
jmp    112c <Read_White_Space+0xc>
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%rsi
call   1030 <ungetc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Read_White_Space>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
movabs $0x100000600,%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1040 <getc@plt>
cmp    $0x20,%eax
ja     1155 <Read_White_Space+0x35>
mov    %eax,%ecx
bt     %rcx,%r14
jb     1140 <Read_White_Space+0x20>
mov    %eax,%edi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <ungetc@plt>

LLVM IR (-O0):
define void @Read_White_Space(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
br label %4
4: ; preds = %16, %1
%5 = load i32*, i32** %2
%6 = call i32 @getc(i32* %5)
store i32 %6, i32* %3
%7 = icmp eq i32 %6, 32
br i1 %7, label %14, label %8
8: ; preds = %4
%9 = load i32, i32* %3
%10 = icmp eq i32 %9, 10
br i1 %10, label %14, label %11
11: ; preds = %8
%12 = load i32, i32* %3
%13 = icmp eq i32 %12, 9
br label %14
14: ; preds = %11, %8, %4
%15 = phi i1 [ true, %8 ], [ true, %4 ], [ %13, %11 ]
br i1 %15, label %16, label %17
16: ; preds = %14
br label %4
17: ; preds = %14
%18 = load i32, i32* %3
%19 = load i32*, i32** %2
%20 = call i32 @ungetc(i32 %18, i32* %19)
ret void
}

LLVM IR (-O2):
define void @Read_White_Space(i32* nocapture %0) {
br label %2
2: ; preds = %4, %1
%3 = tail call i32 @getc(i32* %0)
switch i32 %3, label %5 [
i32 32, label %4
i32 10, label %4
i32 9, label %4
]
4: ; preds = %2, %2, %2
br label %2
5: ; preds = %2
%6 = tail call i32 @ungetc(i32 %3, i32* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
int main() {
  char unnume = 'O';
  printf("This dictionary carries words from letter %c ", unnume);
  unnume = 'Z';
  printf("to letter %c.", unnume);
  return (0);
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x4f,%esi
call   1030 <printf@plt>
lea    0xf05(%rip),%rdi
mov    $0x5a,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [46 x i8] c"This dictionary carries words from letter %c \00"
@.str.1 = [14 x i8] c"to letter %c.\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
store i8 79, i8* %2
%3 = load i8, i8* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0), i8 signext %3)
store i8 90, i8* %2
%5 = load i8, i8* %2
%6 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8 signext %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [46 x i8] c"This dictionary carries words from letter %c \00"
@.str.1 = [14 x i8] c"to letter %c.\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0), i8 signext 79)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8 signext 90)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ dcmp(int, int);
int /*<<< orphan*/ dfcast(double);
int /*<<< orphan*/ printf(char *, char *);
void dtest(void) {
  printf("testing '%s'\n", "double");
  dcmp(1, 2.5);
  dcmp(2, 1.5);
  dcmp(1, 1);
  dfcast(234.6);
  dfcast(-2334.6);
}


x86 assembly (clang, -O0):
<dtest>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xedc(%rip),%rsi
call   1030 <printf@plt>
mov    $0x1,%edi
mov    $0x2,%esi
call   1050 <dcmp@plt>
mov    $0x2,%edi
mov    $0x1,%esi
call   1050 <dcmp@plt>
mov    $0x1,%esi
mov    %esi,%edi
call   1050 <dcmp@plt>
movsd  0xe8f(%rip),%xmm0
call   1040 <dfcast@plt>
movsd  0xe7a(%rip),%xmm0
call   1040 <dfcast@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<dtest>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xedf(%rip),%rsi
call   1030 <printf@plt>
mov    $0x1,%edi
mov    $0x2,%esi
call   1050 <dcmp@plt>
mov    $0x2,%edi
mov    $0x1,%esi
call   1050 <dcmp@plt>
mov    $0x1,%edi
mov    $0x1,%esi
call   1050 <dcmp@plt>
movsd  0xe87(%rip),%xmm0
call   1040 <dfcast@plt>
movsd  0xe82(%rip),%xmm0
pop    %rax
jmp    1040 <dfcast@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"testing '%s'\0A\00"
@.str.1 = [7 x i8] c"double\00"
define void @dtest() {
%1 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 @dcmp(i32 1, i32 2)
%3 = call i32 @dcmp(i32 2, i32 1)
%4 = call i32 @dcmp(i32 1, i32 1)
%5 = call i32 @dfcast(double 2.346000e+02)
%6 = call i32 @dfcast(double -2.334600e+03)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"testing '%s'\0A\00"
@.str.1 = [7 x i8] c"double\00"
define void @dtest() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @dcmp(i32 1, i32 2)
%3 = tail call i32 @dcmp(i32 2, i32 1)
%4 = tail call i32 @dcmp(i32 1, i32 1)
%5 = tail call i32 @dfcast(double 2.346000e+02)
%6 = tail call i32 @dfcast(double -2.334600e+03)
ret void
}
int squashfs3_2_0_supported(struct squashfs3_sb_info *msblk) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.squashfs3_sb_info = type opaque
define i32 @squashfs3_2_0_supported(%struct.squashfs3_sb_info* nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
const uint8_t **get_num(uint8_t num) {
  switch (num) {
  default:
    break;
  }
}


x86 assembly (clang, -O0):
<get_num>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
jmp    110c <get_num+0xc>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32** @get_num(i32 %0) {
%2 = alloca i32**
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %5 [
]
5: ; preds = %1
br label %6
6: ; preds = %5
%7 = load i32**, i32*** %2
ret i32** %7
}

LLVM IR (-O2):
define noalias i32** @get_num(i32 %0) {
ret i32** undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
main(void) {
  int intVal;
  short shVal;
  char chVal;
  int *iPtr;
  short *sPtr;
  char *cPtr;
  iPtr = &intVal;
  sPtr = &shVal;
  cPtr = &chVal;
  *iPtr = 1000;
  *sPtr = 100;
  *cPtr = 10;
  printf("intVal = %d\n", intVal);
  printf("shVal = %d\n", shVal);
  printf("chVal = %d\n", chVal);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
lea    -0x6(%rbp),%rax
mov    %rax,-0x18(%rbp)
lea    -0x7(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x3e8,(%rax)
mov    -0x18(%rbp),%rax
movw   $0x64,(%rax)
mov    -0x20(%rbp),%rax
movb   $0xa,(%rax)
mov    -0x4(%rbp),%eax
lea    0xeac(%rip),%rdi
movsbl %al,%esi
call   1030 <printf@plt>
mov    -0x6(%rbp),%ax
lea    0xea6(%rip),%rdi
movsbl %al,%esi
call   1030 <printf@plt>
lea    0xea3(%rip),%rdi
movsbl -0x7(%rbp),%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0xffffffe8,%esi
call   1030 <printf@plt>
lea    0xee4(%rip),%rdi
mov    $0x64,%esi
call   1030 <printf@plt>
lea    0xedf(%rip),%rdi
mov    $0xa,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"intVal = %d\0A\00"
@.str.1 = [12 x i8] c"shVal = %d\0A\00"
@.str.2 = [12 x i8] c"chVal = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i16
%3 = alloca i8
%4 = alloca i32*
%5 = alloca i16*
%6 = alloca i8*
store i32* %1, i32** %4
store i16* %2, i16** %5
store i8* %3, i8** %6
%7 = load i32*, i32** %4
store i32 1000, i32* %7
%8 = load i16*, i16** %5
store i16 100, i16* %8
%9 = load i8*, i8** %6
store i8 10, i8* %9
%10 = load i32, i32* %1
%11 = trunc i32 %10 to i8
%12 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8 signext %11)
%13 = load i16, i16* %2
%14 = trunc i16 %13 to i8
%15 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8 signext %14)
%16 = load i8, i8* %3
%17 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i8 signext %16)
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"intVal = %d\0A\00"
@.str.1 = [12 x i8] c"shVal = %d\0A\00"
@.str.2 = [12 x i8] c"chVal = %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8 signext -24)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8 signext 100)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i8 signext 10)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ jaj();
void main(void) { jaj(); }


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

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

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

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 (...) @jaj()
ret void
}
void pipe_read() { return; }


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ ccr_scale(int);
void Set_CCR_Color(uint32_t RGB_Color, uint16_t *ccr) {
  ccr[0] = ccr_scale((RGB_Color >> 16) & 0xFF);
  ccr[1] = ccr_scale((RGB_Color >> 8) & 0xFF);
  ccr[2] = ccr_scale(RGB_Color & 0xFF);
}


x86 assembly (clang, -O0):
<Set_CCR_Color>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
sar    $0x10,%edi
and    $0xff,%edi
call   1030 <ccr_scale@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%edi
sar    $0x8,%edi
and    $0xff,%edi
call   1030 <ccr_scale@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0x4(%rbp),%edi
and    $0xff,%edi
call   1030 <ccr_scale@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0x8(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Set_CCR_Color>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %edi,%ebx
mov    %edi,%eax
shr    $0x10,%eax
movzbl %al,%edi
call   1030 <ccr_scale@plt>
mov    %eax,(%r14)
movzbl %bh,%edi
call   1030 <ccr_scale@plt>
mov    %eax,0x4(%r14)
movzbl %bl,%edi
call   1030 <ccr_scale@plt>
mov    %eax,0x8(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @Set_CCR_Color(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 = ashr i32 %5, 16
%7 = and i32 %6, 255
%8 = call i32 @ccr_scale(i32 %7)
%9 = load i32*, i32** %4
%10 = getelementptr inbounds i32, i32* %9, i64 0
store i32 %8, i32* %10
%11 = load i32, i32* %3
%12 = ashr i32 %11, 8
%13 = and i32 %12, 255
%14 = call i32 @ccr_scale(i32 %13)
%15 = load i32*, i32** %4
%16 = getelementptr inbounds i32, i32* %15, i64 1
store i32 %14, i32* %16
%17 = load i32, i32* %3
%18 = and i32 %17, 255
%19 = call i32 @ccr_scale(i32 %18)
%20 = load i32*, i32** %4
%21 = getelementptr inbounds i32, i32* %20, i64 2
store i32 %19, i32* %21
ret void
}

LLVM IR (-O2):
define void @Set_CCR_Color(i32 %0, i32* nocapture writeonly %1) {
%3 = lshr i32 %0, 16
%4 = and i32 %3, 255
%5 = tail call i32 @ccr_scale(i32 %4)
store i32 %5, i32* %1
%6 = lshr i32 %0, 8
%7 = and i32 %6, 255
%8 = tail call i32 @ccr_scale(i32 %7)
%9 = getelementptr inbounds i32, i32* %1, i64 1
store i32 %8, i32* %9
%10 = and i32 %0, 255
%11 = tail call i32 @ccr_scale(i32 %10)
%12 = getelementptr inbounds i32, i32* %1, i64 2
store i32 %11, i32* %12
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void println(const char *printed, int n) {
  int i = 0;
  printf("\n");
  for (i = 0; i < n; i++) {
    printf("%s,", printed);
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<println>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
lea    0xed3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1167 <println+0x57>
mov    -0x8(%rbp),%rsi
lea    0xeb0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    113b <println+0x2b>
lea    0xe92(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<println>:
push   %r15
push   %r14
push   %rbx
mov    %esi,%ebx
mov    %rdi,%r14
mov    $0xa,%edi
call   1030 <putchar@plt>
test   %ebx,%ebx
jle    1152 <println+0x32>
lea    0xec1(%rip),%r15
nop
mov    %r15,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0xffffffff,%ebx
jne    1140 <println+0x20>
mov    $0xa,%edi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@.str.1 = [4 x i8] c"%s,\00"
define void @println(i8* %0, i32 %1) {
%3 = tail call i32 @putchar(i32 10)
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %10
5: ; preds = %2, %5
%6 = phi i32 [ %8, %5 ], [ 0, %2 ]
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%8 = add nuw nsw i32 %6, 1
%9 = icmp eq i32 %8, %1
br i1 %9, label %10, label %5
10: ; preds = %5, %2
%11 = tail call i32 @putchar(i32 10)
ret void
}
float fp_neg(float a) { return -a; }


x86 assembly (clang, -O0):
<fp_neg>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fp_neg>:
xorps  0xef9(%rip),%xmm0
ret

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

LLVM IR (-O2):
define float @fp_neg(float %0) {
%2 = fneg float %0
ret float %2
}
void FlipLong(unsigned char *ptr) {
  register unsigned char val;
  val = *(ptr);
  *(ptr) = *(ptr + 3);
  *(ptr + 3) = val;
  ptr += 1;
  val = *(ptr);
  *(ptr) = *(ptr + 1);
  *(ptr + 1) = val;
}


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

x86 assembly (clang, -O2):
<FlipLong>:
mov    (%rdi),%al
mov    0x3(%rdi),%cl
mov    %cl,(%rdi)
mov    %al,0x3(%rdi)
rolw   $0x8,0x1(%rdi)
ret

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

LLVM IR (-O2):
define void @FlipLong(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = getelementptr inbounds i8, i8* %0, i64 3
%4 = load i8, i8* %3
store i8 %4, i8* %0
store i8 %2, i8* %3
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = getelementptr inbounds i8, i8* %0, i64 2
%8 = load i8, i8* %7
store i8 %8, i8* %5
store i8 %6, i8* %7
ret void
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
void *liballoc_memset(void *s, int c, uint64_t n) {
  int i;
  for (i = 0; i < n; i++)
    ((char *)s)[i] = c;
  return s;
}


x86 assembly (clang, -O0):
<liballoc_memset>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    113f <liballoc_memset+0x3f>
mov    -0xc(%rbp),%eax
mov    %al,%dl
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1115 <liballoc_memset+0x15>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<liballoc_memset>:
push   %rbx
mov    %rdi,%rbx
test   %edx,%edx
jle    1122 <liballoc_memset+0x12>
mov    %edx,%edx
mov    %rbx,%rdi
call   1030 <memset@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @liballoc_memset(i8* returned writeonly %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %8
5: ; preds = %3
%6 = trunc i32 %1 to i8
%7 = zext i32 %2 to i64
br label %8
8: ; preds = %5, %3
ret i8* %0
}
void av_mediacodec_default_init() {}


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

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

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

LLVM IR (-O2):
define void @av_mediacodec_default_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0xe3() {
  Assert_real((isxdigit(227) == 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_isxdigit.c",
              1140, ("isxdigit should be 0 for 0xe3"));
}


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

x86 assembly (clang, -O2):
<t_isxdigit_0xe3>:
push   %rax
mov    $0xe3,%edi
call   1030 <isxdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x474,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 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_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0xe3\00"
define void @t_isxdigit_0xe3() {
%1 = call i64 @isxdigit(i32 227)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 1140, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 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_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0xe3\00"
define void @t_isxdigit_0xe3() {
%1 = tail call i64 @isxdigit(i32 227)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 1140, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int testREX(int rex, int mask) { return (rex & mask) == mask; }


x86 assembly (clang, -O0):
<testREX>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    -0x8(%rbp),%eax
cmp    -0x8(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<testREX>:
not    %edi
xor    %eax,%eax
test   %edi,%esi
sete   %al
ret

LLVM IR (-O0):
define i32 @testREX(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 = and i32 %5, %6
%8 = load i32, i32* %4
%9 = icmp eq i32 %7, %8
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @testREX(i32 %0, i32 %1) {
%3 = and i32 %1, %0
%4 = icmp eq i32 %3, %1
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
uint8_t be8getv(void *p) {
  uint8_t *a;
  uint8_t v;
  a = p;
  v = a[0];
  return v;
}


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

x86 assembly (clang, -O2):
<be8getv>:
mov    (%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @be8getv(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
ret i32 %3
}
void yy_1_TableContentStar(char *yytext, int yyleng) {
  ;
  ;
}


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

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

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

LLVM IR (-O2):
define void @yy_1_TableContentStar(i8* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int celcon_set_type_of_mixture(int r, int *mix) {
  int fail;
  double *c;
  fail = _ada_use_c2phc(91, &r, mix, c);
  return fail;
}


x86 assembly (clang, -O0):
<celcon_set_type_of_mixture>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x5b,%edi
lea    -0x4(%rbp),%rsi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<celcon_set_type_of_mixture>:
push   %rax
mov    %rsi,%rdx
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x5b,%edi
call   1030 <_ada_use_c2phc@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @celcon_set_type_of_mixture(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32
%6 = alloca double*
store i32 %0, i32* %3
store i32* %1, i32** %4
%7 = load i32*, i32** %4
%8 = load double*, double** %6
%9 = call i32 @_ada_use_c2phc(i32 91, i32* %3, i32* %7, double* %8)
store i32 %9, i32* %5
%10 = load i32, i32* %5
ret i32 %10
}

LLVM IR (-O2):
define i32 @celcon_set_type_of_mixture(i32 %0, i32* %1) {
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 @_ada_use_c2phc(i32 91, i32* %3, i32* %1, double* undef)
ret i32 %4
}
/* Type definitions */
typedef int volatile uint32_t;

/* Variables and functions */
uint32_t volatile_fetch_or_u32(volatile uint32_t *dest, uint32_t val) {
  uint32_t result = *dest;
  *dest = result | val;
  return result;
}


x86 assembly (clang, -O0):
<volatile_fetch_or_u32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
mov    -0xc(%rbp),%eax
or     %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<volatile_fetch_or_u32>:
mov    %esi,-0x4(%rsp)
mov    (%rdi),%eax
mov    %eax,-0x8(%rsp)
mov    -0x8(%rsp),%eax
or     -0x4(%rsp),%eax
mov    %eax,(%rdi)
mov    -0x8(%rsp),%eax
ret

LLVM IR (-O0):
define i32 @volatile_fetch_or_u32(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store volatile i32 %1, i32* %4
%6 = load i32*, i32** %3
%7 = load volatile i32, i32* %6
store volatile i32 %7, i32* %5
%8 = load volatile i32, i32* %5
%9 = load volatile i32, i32* %4
%10 = or i32 %8, %9
%11 = load i32*, i32** %3
store volatile i32 %10, i32* %11
%12 = load volatile i32, i32* %5
ret i32 %12
}

LLVM IR (-O2):
define i32 @volatile_fetch_or_u32(i32* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store volatile i32 %1, i32* %3
%5 = bitcast i32* %4 to i8*
%6 = load volatile i32, i32* %0
store volatile i32 %6, i32* %4
%7 = load volatile i32, i32* %4
%8 = load volatile i32, i32* %3
%9 = or i32 %8, %7
store volatile i32 %9, i32* %0
%10 = load volatile i32, i32* %4
ret i32 %10
}
/* Variables and functions */
bool fspath_read_file(const char path[], char *content) { return false; }


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

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

LLVM IR (-O0):
define i32 @fspath_read_file(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
ret i32 0
}

LLVM IR (-O2):
define i32 @fspath_read_file(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 0
}
int ft_str_is_lowercase(char *str) {
  int it;
  it = 0;
  while (str[it]) {
    if (str[it] < 'a' || str[it] > 'z')
      return (0);
    it++;
  }
  return (1);
}


x86 assembly (clang, -O0):
<ft_str_is_lowercase>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1165 <ft_str_is_lowercase+0x65>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x61,%eax
jl     114b <ft_str_is_lowercase+0x4b>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x7a,%eax
jle    1157 <ft_str_is_lowercase+0x57>
movl   $0x0,-0x4(%rbp)
jmp    116c <ft_str_is_lowercase+0x6c>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    110f <ft_str_is_lowercase+0xf>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_str_is_lowercase>:
mov    (%rdi),%cl
mov    $0x1,%eax
test   %cl,%cl
je     1123 <ft_str_is_lowercase+0x23>
add    $0x1,%rdi
nop
add    $0x85,%cl
cmp    $0xe5,%cl
jbe    1124 <ft_str_is_lowercase+0x24>
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <ft_str_is_lowercase+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @ft_str_is_lowercase(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %8
4: ; preds = %8
%5 = getelementptr inbounds i8, i8* %0, i64 %13
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
br i1 %7, label %14, label %8
8: ; preds = %1, %4
%9 = phi i64 [ %13, %4 ], [ 0, %1 ]
%10 = phi i8 [ %6, %4 ], [ %2, %1 ]
%11 = add i8 %10, -123
%12 = icmp ult i8 %11, -26
%13 = add nuw i64 %9, 1
br i1 %12, label %14, label %4
14: ; preds = %8, %4, %1
%15 = phi i32 [ 1, %1 ], [ 1, %4 ], [ 0, %8 ]
ret i32 %15
}
/* Variables and functions */
scalar_t__ malloc(int);
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ swap(int *, int *);
int main() {
  int *a;
  int *b;
  a = (int *)malloc(sizeof(int));
  b = (int *)malloc(sizeof(int));
  *a = 1;
  *b = 2;
  swap(a, b);
  printf("a: %d, b: %d", *a, *b);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x1,(%rax)
mov    -0x10(%rbp),%rax
movl   $0x2,(%rax)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <swap@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
mov    -0x10(%rbp),%rax
mov    (%rax),%edx
lea    0xe78(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,%r14
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
movl   $0x1,(%r14)
movl   $0x2,(%rax)
mov    %r14,%rdi
mov    %rax,%rsi
call   1050 <swap@plt>
mov    (%r14),%esi
mov    (%rbx),%edx
lea    0xe8e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [13 x i8] c"a: %d, b: %d\00"
define i32 @main() {
%1 = tail call i64 @malloc(i32 4)
%2 = inttoptr i64 %1 to i32*
%3 = tail call i64 @malloc(i32 4)
%4 = inttoptr i64 %3 to i32*
store i32 1, i32* %2
store i32 2, i32* %4
%5 = tail call i32 @swap(i32* %2, i32* %4)
%6 = load i32, i32* %2
%7 = load i32, i32* %4
%8 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %7)
ret i32 0
}
/* Variables and functions */
int nextPow2(int);
int rk_threads(int n) { return (n < 256 * 2) ? nextPow2((n + 1) / 2) : 256; }


x86 assembly (clang, -O0):
<rk_threads>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x200,-0x4(%rbp)
jge    1145 <rk_threads+0x35>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1030 <nextPow2@plt>
mov    %eax,-0x8(%rbp)
jmp    1152 <rk_threads+0x42>
mov    $0x100,%eax
mov    %eax,-0x8(%rbp)
jmp    1152 <rk_threads+0x42>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rk_threads>:
cmp    $0x1ff,%edi
jg     112c <rk_threads+0x1c>
mov    %edi,%eax
add    $0x1,%eax
shr    $0x1f,%eax
add    %eax,%edi
add    $0x1,%edi
sar    %edi
jmp    1030 <nextPow2@plt>
mov    $0x100,%eax
ret

LLVM IR (-O0):
define i32 @rk_threads(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 512
br i1 %4, label %5, label %10
5: ; preds = %1
%6 = load i32, i32* %2
%7 = add nsw i32 %6, 1
%8 = sdiv i32 %7, 2
%9 = call i32 @nextPow2(i32 %8)
br label %11
10: ; preds = %1
br label %11
11: ; preds = %10, %5
%12 = phi i32 [ %9, %5 ], [ 256, %10 ]
ret i32 %12
}

LLVM IR (-O2):
define i32 @rk_threads(i32 %0) {
%2 = icmp slt i32 %0, 512
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = add nsw i32 %0, 1
%5 = sdiv i32 %4, 2
%6 = tail call i32 @nextPow2(i32 %5)
br label %7
7: ; preds = %1, %3
%8 = phi i32 [ %6, %3 ], [ 256, %1 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ setaction_pass();
zz_bind_pass() {
  setaction_pass();
  return 1;
}


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

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

LLVM IR (-O0):
define i32 @zz_bind_pass() {
%1 = call i32 (...) @setaction_pass()
ret i32 1
}

LLVM IR (-O2):
define i32 @zz_bind_pass() {
%1 = tail call i32 (...) @setaction_pass()
ret i32 1
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint16_t;

/* Variables and functions */
bool ndm_endian_is_le() {
  const uint16_t TEST_ = 0xff00;
  return *((const uint8_t *)(&TEST_)) == 0;
}


x86 assembly (clang, -O0):
<ndm_endian_is_le>:
push   %rbp
mov    %rsp,%rbp
movl   $0xff00,-0x4(%rbp)
cmpq   $0x0,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @ndm_endian_is_le() {
%1 = alloca i32
store i32 65280, i32* %1
%2 = bitcast i32* %1 to i64*
%3 = load i64, i64* %2
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @ndm_endian_is_le() {
ret i32 0
}
/* Variables and functions */
double exp(double);
double log(double);
double HillR(double x, double thresh, double n) {
  double r = exp(n * log(x / thresh));
  return 1.0 / (1 + r);
}


x86 assembly (clang, -O0):
<HillR>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x8(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
call   1040 <log@plt>
movaps %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
mulsd  %xmm1,%xmm0
call   1030 <exp@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  0xe92(%rip),%xmm1
addsd  -0x20(%rbp),%xmm1
movsd  0xe85(%rip),%xmm0
divsd  %xmm1,%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<HillR>:
push   %rax
movsd  %xmm2,(%rsp)
divsd  %xmm1,%xmm0
call   1040 <log@plt>
mulsd  (%rsp),%xmm0
call   1030 <exp@plt>
movsd  0xebf(%rip),%xmm1
addsd  %xmm1,%xmm0
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @HillR(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%8 = load double, double* %6
%9 = load double, double* %4
%10 = load double, double* %5
%11 = fdiv double %9, %10
%12 = call double @log(double %11)
%13 = fmul double %8, %12
%14 = call double @exp(double %13)
store double %14, double* %7
%15 = load double, double* %7
%16 = fadd double 1.000000e+00, %15
%17 = fdiv double 1.000000e+00, %16
ret double %17
}

LLVM IR (-O2):
define double @HillR(double %0, double %1, double %2) {
%4 = fdiv double %0, %1
%5 = tail call double @log(double %4)
%6 = fmul double %5, %2
%7 = tail call double @exp(double %6)
%8 = fadd double %7, 1.000000e+00
%9 = fdiv double 1.000000e+00, %8
ret double %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ pthread_exit(int /*<<< orphan*/ *);
int /*<<< orphan*/ sleep(int);
void *hello_world(void *tid) {
  printf("Hello World. Esta é a Thread %d\n", (int)tid);
  sleep(((int)tid + 1) * 2);
  pthread_exit(NULL);
}


x86 assembly (clang, -O0):
<hello_world>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,%esi
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    %eax,%edi
add    $0x1,%edi
shl    $0x1,%edi
call   1050 <sleep@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1040 <pthread_exit@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hello_world>:
push   %rbx
mov    %rdi,%rbx
lea    0xec5(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
lea    (%rbx,%rbx,1),%edi
add    $0x2,%edi
call   1050 <sleep@plt>
xor    %edi,%edi
pop    %rbx
jmp    1040 <pthread_exit@plt>

LLVM IR (-O0):
@.str = [34 x i8] c"Hello World. Esta \C3\A9 a Thread %d\0A\00"
define i8* @hello_world(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = ptrtoint i8* %4 to i32
%6 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = load i8*, i8** %3
%8 = ptrtoint i8* %7 to i32
%9 = add nsw i32 %8, 1
%10 = mul nsw i32 %9, 2
%11 = call i32 @sleep(i32 %10)
%12 = call i32 @pthread_exit(i32* null)
%13 = load i8*, i8** %2
ret i8* %13
}

LLVM IR (-O2):
@.str = [34 x i8] c"Hello World. Esta \C3\A9 a Thread %d\0A\00"
define noalias i8* @hello_world(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = trunc i64 %2 to i32
%4 = tail call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = shl i32 %3, 1
%6 = add i32 %5, 2
%7 = tail call i32 @sleep(i32 %6)
%8 = tail call i32 @pthread_exit(i32* null)
ret i8* undef
}
/* Type definitions */
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
char *strdup(char *);
int /*<<< orphan*/ string_concat(char *, int, size_t *, char *, char *);
char *header_tostr() {
  char buf[512], tmp[128];
  size_t off = 0;
  string_concat(
      buf, sizeof(buf), &off, "%s\n",
      "version;userID;timestamp;src;dst;method;status;ttl;hopaddr;rtt");
  return strdup(buf);
}


x86 assembly (clang, -O0):
<header_tostr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x290,%rsp
movq   $0x0,-0x288(%rbp)
lea    -0x200(%rbp),%rdi
mov    $0x200,%esi
lea    -0x288(%rbp),%rdx
lea    0xeb0(%rip),%rcx
lea    0xead(%rip),%r8
call   1030 <string_concat@plt>
lea    -0x200(%rbp),%rdi
call   1040 <strdup@plt>
add    $0x290,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<header_tostr>:
push   %rbx
sub    $0x210,%rsp
movq   $0x0,0x8(%rsp)
lea    0xec8(%rip),%rcx
lea    0xec5(%rip),%r8
lea    0x10(%rsp),%rbx
lea    0x8(%rsp),%rdx
mov    %rbx,%rdi
mov    $0x200,%esi
call   1030 <string_concat@plt>
mov    %rbx,%rdi
call   1040 <strdup@plt>
add    $0x210,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [63 x i8] c"version;userID;timestamp;src;dst;method;status;ttl;hopaddr;rtt\00"
define i8* @header_tostr() {
%1 = alloca [512 x i8]
%2 = alloca [128 x i8]
%3 = alloca i64
store i64 0, i64* %3
%4 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 0
%5 = call i32 @string_concat(i8* %4, i32 512, i64* %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.1, i64 0, i64 0))
%6 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 0
%7 = call i8* @strdup(i8* %6)
ret i8* %7
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [63 x i8] c"version;userID;timestamp;src;dst;method;status;ttl;hopaddr;rtt\00"
define noalias i8* @header_tostr() {
%1 = alloca [512 x i8]
%2 = alloca i64
%3 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 0
%4 = bitcast i64* %2 to i8*
store i64 0, i64* %2
%5 = call i32 @string_concat(i8* %3, i32 512, i64* %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.1, i64 0, i64 0))
%6 = call i8* @strdup(i8* %3)
ret i8* %6
}