xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int uint32_t;
typedef int int32_t;

/* Variables and functions */
int fixed_9_9_int(int32_t x) {
  if (x & ((uint32_t)1 << 17)) {
    x = 0 - x;
    return 0 - ((x >> 9) & ((1 << 9) - 1));
  } else
    return (x >> 9) & ((1 << 9) - 1);
}


x86 assembly (clang, -O0):
<fixed_9_9_int>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0x20000,%eax
cmp    $0x0,%eax
je     1138 <fixed_9_9_int+0x38>
xor    %eax,%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%ecx
sar    $0x9,%ecx
and    $0x1ff,%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    1146 <fixed_9_9_int+0x46>
mov    -0x8(%rbp),%eax
sar    $0x9,%eax
and    $0x1ff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fixed_9_9_int>:
mov    %edi,%eax
test   $0x20000,%edi
jne    1113 <fixed_9_9_int+0x13>
shr    $0x9,%eax
and    $0x1ff,%eax
ret
neg    %eax
shr    $0x9,%eax
and    $0x1ff,%eax
neg    %eax
ret

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

LLVM IR (-O2):
define i32 @fixed_9_9_int(i32 %0) {
%2 = and i32 %0, 131072
%3 = icmp eq i32 %2, 0
br i1 %3, label %9, label %4
4: ; preds = %1
%5 = sub nsw i32 0, %0
%6 = lshr i32 %5, 9
%7 = and i32 %6, 511
%8 = sub nsw i32 0, %7
br label %12
9: ; preds = %1
%10 = lshr i32 %0, 9
%11 = and i32 %10, 511
br label %12
12: ; preds = %9, %4
%13 = phi i32 [ %8, %4 ], [ %11, %9 ]
ret i32 %13
}
_Bool unsigned_to_bool(unsigned u) { return (_Bool)u; }


x86 assembly (clang, -O0):
<unsigned_to_bool>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<unsigned_to_bool>:
test   %edi,%edi
setne  %al
ret

LLVM IR (-O0):
define zeroext i1 @unsigned_to_bool(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
ret i1 %4
}

LLVM IR (-O2):
define zeroext i1 @unsigned_to_bool(i32 %0) {
%2 = icmp ne i32 %0, 0
ret i1 %2
}
void f83(void) {
  ({
    ({ 0; });
    ({ 0; });
  a:
    goto a;
    0;
  });
  ({
    ({ 0; });
    ({ 0; });
    0;
  });
  0;
}


x86 assembly (clang, -O0):
<f83>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
jmp    1112 <f83+0x12>

x86 assembly (clang, -O2):
<f83>:
jmp    1100 <f83>

LLVM IR (-O0):
define void @f83() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = load i32, i32* %1
store i32 0, i32* %2
%5 = load i32, i32* %2
br label %6
6: ; preds = %6, %0
br label %6
}

LLVM IR (-O2):
define void @f83() {
br label %1
1: ; preds = %1, %0
br label %1
}
unsigned int csum_fold(unsigned int sum) {
  sum += (sum << 16) + (sum >> 16);
  return (~sum) >> 16;
}


x86 assembly (clang, -O0):
<csum_fold>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x10,%eax
mov    -0x4(%rbp),%ecx
shr    $0x10,%ecx
add    %ecx,%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
xor    $0xffffffff,%eax
shr    $0x10,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<csum_fold>:
mov    %edi,%eax
rol    $0x10,%eax
add    %edi,%eax
not    %eax
shr    $0x10,%eax
ret

LLVM IR (-O0):
define i32 @csum_fold(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = shl i32 %3, 16
%5 = load i32, i32* %2
%6 = lshr i32 %5, 16
%7 = add i32 %4, %6
%8 = load i32, i32* %2
%9 = add i32 %8, %7
store i32 %9, i32* %2
%10 = load i32, i32* %2
%11 = xor i32 %10, -1
%12 = lshr i32 %11, 16
ret i32 %12
}

LLVM IR (-O2):
define i32 @csum_fold(i32 %0) {
%2 = tail call i32 @llvm.fshl.i32(i32 %0, i32 %0, i32 16)
%3 = add i32 %2, %0
%4 = xor i32 %3, -1
%5 = lshr i32 %4, 16
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isgraph(int);
void t_isgraph_0x9a() {
  Assert_real((isgraph(154) == 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_isgraph.c",
              775, ("isgraph should be 0 for 0x9a"));
}


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

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

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0x9a\00"
define void @t_isgraph_0x9a() {
%1 = call i64 @isgraph(i32 154)
%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 775, 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_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0x9a\00"
define void @t_isgraph_0x9a() {
%1 = tail call i64 @isgraph(i32 154)
%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 775, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int test_imm_82int8_mem(signed char *val) {
  return ((*val) & (-0x82 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_82int8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edx
and    $0xffffff7e,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_82int8_mem>:
movsbl (%rdi),%eax
test   $0xffffff7e,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_82int8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = and i32 %5, -130
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_82int8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = sext i8 %2 to i32
%4 = and i32 %3, -130
%5 = icmp eq i32 %4, 0
%6 = select i1 %5, i32 -40, i32 -20
ret i32 %6
}
void BCR_writew(unsigned short value) { ; }


x86 assembly (clang, -O0):
<BCR_writew>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @BCR_writew(i16 zeroext %0) {
ret void
}
void XtSessionGetToken() {}


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

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

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

LLVM IR (-O2):
define void @XtSessionGetToken() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
int pipe(int *);
void pp(int *pipefd) {
  if (pipe(pipefd) == -1) {
    perror("pipe failed");
    exit(1);
  }
}


x86 assembly (clang, -O0):
<pp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <pipe@plt>
cmp    $0xffffffff,%eax
jne    1164 <pp+0x34>
lea    0xeab(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pp>:
push   %rax
call   1030 <pipe@plt>
cmp    $0xffffffff,%eax
je     113d <pp+0xd>
pop    %rax
ret
lea    0xebc(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"pipe failed\00"
define void @pp(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @pipe(i32* %3)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = call i32 @perror(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @exit(i32 1)
unreachable
9: ; preds = %1
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"pipe failed\00"
define void @pp(i32* %0) {
%2 = tail call i32 @pipe(i32* %0)
%3 = icmp eq i32 %2, -1
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 @perror(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @exit(i32 1)
unreachable
7: ; preds = %1
ret void
}
char *skipLine(char *buf) {
  while (*buf != 0 && *buf != '\n')
    buf++;
  return (*buf == '\n') ? buf + 1 : 0;
}


x86 assembly (clang, -O0):
<skipLine>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
je     112d <skipLine+0x2d>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    113d <skipLine+0x3d>
jmp    114e <skipLine+0x4e>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <skipLine+0x8>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
jne    116f <skipLine+0x6f>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    117a <skipLine+0x7a>
xor    %eax,%eax
mov    %rax,-0x18(%rbp)
jmp    117a <skipLine+0x7a>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<skipLine>:
add    $0x1,%rdi
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movzbl -0x1(%rdi),%ecx
test   %cl,%cl
je     1123 <skipLine+0x23>
cmp    $0xa,%cl
je     1123 <skipLine+0x23>
add    $0x1,%rdi
jmp    1110 <skipLine+0x10>
xor    %eax,%eax
cmp    $0xa,%cl
cmove  %rdi,%rax
ret

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

LLVM IR (-O2):
define i8* @skipLine(i8* %0) {
br label %2
2: ; preds = %5, %1
%3 = phi i8* [ %0, %1 ], [ %6, %5 ]
%4 = load i8, i8* %3
switch i8 %4, label %5 [
i8 0, label %7
i8 10, label %7
]
5: ; preds = %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
7: ; preds = %2, %2
%8 = icmp eq i8 %4, 10
%9 = getelementptr inbounds i8, i8* %3, i64 1
%10 = select i1 %8, i8* %9, i8* null
ret i8* %10
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fgetc(int /*<<< orphan*/ *);
void AURAE_Script_Fgets(FILE *file, char *string) {
  int octet = 1, i = 0;
  while (octet != 0) {
    octet = fgetc(file);
    string[i] = octet;
    i++;
  }
  string[i] = 0;
}


x86 assembly (clang, -O0):
<AURAE_Script_Fgets>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1162 <AURAE_Script_Fgets+0x52>
mov    -0x8(%rbp),%rdi
call   1030 <fgetc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %al,%dl
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    112e <AURAE_Script_Fgets+0x1e>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<AURAE_Script_Fgets>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
xor    %ebx,%ebx
nopl   (%rax)
mov    %r15,%rdi
call   1030 <fgetc@plt>
mov    %al,(%r14,%rbx,1)
add    $0x1,%rbx
test   %eax,%eax
jne    1120 <AURAE_Script_Fgets+0x10>
mov    %ebx,%eax
movb   $0x0,(%r14,%rax,1)
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @AURAE_Script_Fgets(i32* nocapture %0, i8* nocapture writeonly %1) {
br label %3
3: ; preds = %2, %3
%4 = phi i64 [ 0, %2 ], [ %8, %3 ]
%5 = tail call i32 @fgetc(i32* %0)
%6 = trunc i32 %5 to i8
%7 = getelementptr inbounds i8, i8* %1, i64 %4
store i8 %6, i8* %7
%8 = add nuw i64 %4, 1
%9 = icmp eq i32 %5, 0
br i1 %9, label %10, label %3
10: ; preds = %3
%11 = and i64 %8, 4294967295
%12 = getelementptr inbounds i8, i8* %1, i64 %11
store i8 0, i8* %12
ret void
}
/* Variables and functions */
int /*<<< orphan*/ file_porter(char *, char *);
int main(int argc, char **argv) {
  char *src_dir = "./";
  char *encrypt_dir = "./wakeup";
  file_porter(src_dir, encrypt_dir);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed3(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    0xecb(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1030 <file_porter@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"./\00"
@.str.1 = [9 x i8] c"./wakeup\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @file_porter(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ XWMHints;

/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ free(int /*<<< orphan*/ *);
void free_XWMHints(void *_p) {
  if (_p == NULL)
    abort();
  free((XWMHints *)_p);
}


x86 assembly (clang, -O0):
<free_XWMHints>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    113e <free_XWMHints+0x1e>
mov    $0x0,%al
call   1040 <abort@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_XWMHints>:
test   %rdi,%rdi
je     112a <free_XWMHints+0xa>
jmp    1030 <free@plt>
push   %rax
xor    %eax,%eax
call   1040 <abort@plt>

LLVM IR (-O0):
define void @free_XWMHints(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 (...) @abort()
unreachable
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = bitcast i8* %8 to i32*
%10 = call i32 @free(i32* %9)
ret void
}

LLVM IR (-O2):
define void @free_XWMHints(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %1
%6 = bitcast i8* %0 to i32*
%7 = tail call i32 @free(i32* %6)
ret void
}
int fallthrough() { return 42; }


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

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

LLVM IR (-O0):
define i32 @fallthrough() {
ret i32 42
}

LLVM IR (-O2):
define i32 @fallthrough() {
ret i32 42
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void cmd_help(void) {
  printf("just like gdb.\n"
         "b -- set breakpoint, e.g. b funcion_name\n"
         "d -- delete breakpoint, e.g. b funcion_name\n"
         "i -- display target's current instruction & eip\n"
         "c -- continue\n"
         "n -- next CPU instruction\n"
         "r -- start the target\n"
         "lbp -- display all breakpoints\n"
         "help(h) -- help infos\n");
}


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

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

LLVM IR (-O0):
@.str = [264 x i8] c"just like gdb.\0Ab -- set breakpoint, e.g. b funcion_name\0Ad -- delete breakpoint, e.g. b funcion_name\0Ai -- display target's current instruction & eip\0Ac -- continue\0An -- next CPU instruction\0Ar -- start the target\0Albp -- display all breakpoints\0Ahelp(h) -- help infos\0A\00"
define void @cmd_help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([264 x i8], [264 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [263 x i8] c"just like gdb.\0Ab -- set breakpoint, e.g. b funcion_name\0Ad -- delete breakpoint, e.g. b funcion_name\0Ai -- display target's current instruction & eip\0Ac -- continue\0An -- next CPU instruction\0Ar -- start the target\0Albp -- display all breakpoints\0Ahelp(h) -- help infos\00"
define void @cmd_help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([263 x i8], [263 x i8]* @str, i64 0, i64 0))
ret void
}
int fun996() { return 996; }


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

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

LLVM IR (-O0):
define i32 @fun996() {
ret i32 996
}

LLVM IR (-O2):
define i32 @fun996() {
ret i32 996
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ Interpolate_3(int /*<<< orphan*/, int, int /*<<< orphan*/,
                                 int, int /*<<< orphan*/, int, int);
void Interp7(uint32_t *pc, uint32_t c1, uint32_t c2, uint32_t c3) {
  *pc = Interpolate_3(c1, 6, c2, 1, c3, 1, 3);
}


x86 assembly (clang, -O0):
<Interp7>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%r8d
mov    $0x6,%esi
mov    $0x1,%r9d
mov    %r9d,%ecx
movl   $0x3,(%rsp)
call   1030 <Interpolate_3@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Interp7>:
push   %rbx
sub    $0x10,%rsp
mov    %ecx,%r8d
mov    %rdi,%rbx
movl   $0x3,(%rsp)
mov    %esi,%edi
mov    $0x6,%esi
mov    $0x1,%ecx
mov    $0x1,%r9d
call   1030 <Interpolate_3@plt>
mov    %eax,(%rbx)
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define void @Interp7(i32* nocapture writeonly %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @Interpolate_3(i32 %1, i32 6, i32 %2, i32 1, i32 %3, i32 1, i32 3)
store i32 %5, i32* %0
ret void
}
/* Variables and functions */
int asin(double);
int /*<<< orphan*/ print(int);
int rand();
int round(double);
void main() {
  int i;
  print(asin(.5));
  print(rand());
  print(i = round(3.14));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  0xeb8(%rip),%xmm0
call   1040 <asin@plt>
mov    %eax,%edi
call   1030 <print@plt>
mov    $0x0,%al
call   1060 <rand@plt>
mov    %eax,%edi
call   1030 <print@plt>
movsd  0xe8e(%rip),%xmm0
call   1050 <round@plt>
mov    %eax,%edi
mov    %edi,-0x4(%rbp)
call   1030 <print@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movsd  0xeb7(%rip),%xmm0
call   1040 <asin@plt>
mov    %eax,%edi
call   1030 <print@plt>
xor    %eax,%eax
call   1060 <rand@plt>
mov    %eax,%edi
call   1030 <print@plt>
movsd  0xe9d(%rip),%xmm0
call   1050 <round@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <print@plt>

LLVM IR (-O0):
define void @main() {
%1 = alloca i32
%2 = call i32 @asin(double 5.000000e-01)
%3 = call i32 @print(i32 %2)
%4 = call i32 (...) @rand()
%5 = call i32 @print(i32 %4)
%6 = call i32 @round(double 3.140000e+00)
store i32 %6, i32* %1
%7 = call i32 @print(i32 %6)
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 @asin(double 5.000000e-01)
%2 = tail call i32 @print(i32 %1)
%3 = tail call i32 (...) @rand()
%4 = tail call i32 @print(i32 %3)
%5 = tail call i32 @round(double 3.140000e+00)
%6 = tail call i32 @print(i32 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ data_isai(int);
int data_multihumans(void) {
  int p;
  int totHumans = 0;
  for (p = 0; p < 4; p++) {
    if (!data_isai(p)) {
      totHumans++;
    }
  }
  if (totHumans >= 2)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<data_multihumans>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x4,-0x8(%rbp)
jge    115d <data_multihumans+0x4d>
mov    -0x8(%rbp),%edi
call   1030 <data_isai@plt>
cmp    $0x0,%eax
jne    114a <data_multihumans+0x3a>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    114f <data_multihumans+0x3f>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <data_multihumans+0x16>
cmpl   $0x2,-0xc(%rbp)
jl     1173 <data_multihumans+0x63>
movl   $0x1,-0x4(%rbp)
jmp    117a <data_multihumans+0x6a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<data_multihumans>:
push   %rbx
xor    %edi,%edi
call   1030 <data_isai@plt>
xor    %ebx,%ebx
test   %eax,%eax
sete   %bl
mov    $0x1,%edi
call   1030 <data_isai@plt>
cmp    $0x1,%eax
adc    $0x0,%ebx
mov    $0x2,%edi
call   1030 <data_isai@plt>
cmp    $0x1,%eax
adc    $0x0,%ebx
mov    $0x3,%edi
call   1030 <data_isai@plt>
cmp    $0x1,%eax
adc    $0x0,%ebx
xor    %eax,%eax
cmp    $0x2,%ebx
setae  %al
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @data_multihumans() {
%1 = tail call i32 @data_isai(i32 0)
%2 = icmp eq i32 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @data_isai(i32 1)
%5 = icmp eq i32 %4, 0
%6 = zext i1 %5 to i32
%7 = add nuw nsw i32 %3, %6
%8 = tail call i32 @data_isai(i32 2)
%9 = icmp eq i32 %8, 0
%10 = zext i1 %9 to i32
%11 = add nuw nsw i32 %7, %10
%12 = tail call i32 @data_isai(i32 3)
%13 = icmp eq i32 %12, 0
%14 = zext i1 %13 to i32
%15 = add nuw nsw i32 %11, %14
%16 = icmp ugt i32 %15, 1
%17 = zext i1 %16 to i32
ret i32 %17
}
/* Variables and functions */
int /*<<< orphan*/ ordenadas(int *, int *);
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int a = 30, b = 20;
  printf("Valor de a %d\tvalor de b %d\n", a, b);
  ordenadas(&a, &b);
  printf("Valor de a %d\tvalor de b %d\n", a, b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1e,-0x8(%rbp)
movl   $0x14,-0xc(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xeb6(%rip),%rdi
call   1040 <printf@plt>
lea    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   1030 <ordenadas@plt>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xe97(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movl   $0x1e,0xc(%rsp)
movl   $0x14,0x8(%rsp)
lea    0xec4(%rip),%rbx
mov    %rbx,%rdi
mov    $0x1e,%esi
mov    $0x14,%edx
call   1040 <printf@plt>
lea    0xc(%rsp),%rdi
lea    0x8(%rsp),%rsi
call   1030 <ordenadas@plt>
mov    0xc(%rsp),%esi
mov    0x8(%rsp),%edx
mov    %rbx,%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [29 x i8] c"Valor de a %d\09valor de b %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 30, i32* %2
store i32 20, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* %3
%6 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %5)
%7 = call i32 @ordenadas(i32* %2, i32* %3)
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %8, i32 %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [29 x i8] c"Valor de a %d\09valor de b %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
store i32 30, i32* %1
%4 = bitcast i32* %2 to i8*
store i32 20, i32* %2
%5 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 30, i32 20)
%6 = call i32 @ordenadas(i32* %1, i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %8)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ main();
int g(int *f) {
  main();
  return *f;
}


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

x86 assembly (clang, -O2):
<g>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <main@plt>
mov    (%rbx),%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @g(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = call i32 (...) @main()
%4 = load i32*, i32** %2
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @g(i32* nocapture %0) {
%2 = tail call i32 (...) @main()
%3 = load i32, i32* %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void showbits_ui(unsigned int bits) {
  int x;
  for (x = 0; x < sizeof bits << 3; x++)
    printf("%d", !!(bits & (1 << x)));
  printf("\n");
}


x86 assembly (clang, -O0):
<showbits_ui>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movslq -0x8(%rbp),%rax
cmp    $0x20,%rax
jae    116c <showbits_ui+0x5c>
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%esi
lea    0xea9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <showbits_ui+0x12>
lea    0xe90(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<showbits_ui>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%ebx
lea    0xed3(%rip),%r14
xor    %ebp,%ebp
nop
mov    %ebx,%esi
mov    %ebp,%ecx
shr    %cl,%esi
and    $0x1,%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%ebp
cmp    $0x20,%ebp
jne    1130 <showbits_ui+0x10>
mov    $0xa,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [2 x i8] c"\0A\00"
define void @showbits_ui(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
br label %4
4: ; preds = %18, %1
%5 = load i32, i32* %3
%6 = sext i32 %5 to i64
%7 = icmp ult i64 %6, 32
br i1 %7, label %8, label %21
8: ; preds = %4
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = shl i32 1, %10
%12 = and i32 %9, %11
%13 = icmp ne i32 %12, 0
%14 = xor i1 %13, true
%15 = xor i1 %14, true
%16 = zext i1 %15 to i32
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %16)
br label %18
18: ; preds = %8
%19 = load i32, i32* %3
%20 = add nsw i32 %19, 1
store i32 %20, i32* %3
br label %4
21: ; preds = %4
%22 = 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 = [3 x i8] c"%d\00"
define void @showbits_ui(i32 %0) {
br label %2
2: ; preds = %1, %2
%3 = phi i32 [ 0, %1 ], [ %7, %2 ]
%4 = lshr i32 %0, %3
%5 = and i32 %4, 1
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = add nuw nsw i32 %3, 1
%8 = icmp eq i32 %7, 32
br i1 %8, label %9, label %2
9: ; preds = %2
%10 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
long long __builtin_wasm_trunc_saturate_s_i64_f32(float);
long long trunc_saturate_s_i64_f32(float f) {
  return __builtin_wasm_trunc_saturate_s_i64_f32(f);
}


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

x86 assembly (clang, -O2):
<trunc_saturate_s_i64_f32>:
jmp    1030 <__builtin_wasm_trunc_saturate_s_i64_f32@plt>

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

LLVM IR (-O2):
define i64 @trunc_saturate_s_i64_f32(float %0) {
%2 = tail call i64 @__builtin_wasm_trunc_saturate_s_i64_f32(float %0)
ret i64 %2
}
void INT_Excep_AD0_ADI0(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_AD0_ADI0() {
ret void
}
int diffrec(int n) {
  static int base[] = {0, 1, 1, 2, 4};
  if (n <= 4) {
    return base[n];
  }
  return diffrec(n - 1) + diffrec(n - 3) + diffrec(n - 4);
}


x86 assembly (clang, -O0):
<diffrec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x4,-0x8(%rbp)
jg     113b <diffrec+0x2b>
movslq -0x8(%rbp),%rcx
lea    0x2f00(%rip),%rax
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x4(%rbp)
jmp    1173 <diffrec+0x63>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <diffrec@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x3,%edi
call   1030 <diffrec@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x4,%edi
call   1030 <diffrec@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<diffrec>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%ebx
xor    %ebp,%ebp
cmp    $0x5,%edi
jge    1121 <diffrec+0x11>
mov    %ebx,%ecx
jmp    1154 <diffrec+0x44>
xor    %r14d,%r14d
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
lea    -0x1(%rbx),%edi
call   1030 <diffrec@plt>
mov    %eax,%ebp
lea    -0x3(%rbx),%edi
call   1030 <diffrec@plt>
lea    -0x4(%rbx),%ecx
add    %r14d,%ebp
add    %eax,%ebp
mov    %ebp,%r14d
cmp    $0x9,%ebx
mov    %ecx,%ebx
jae    1130 <diffrec+0x20>
movslq %ecx,%rax
lea    0xea2(%rip),%rcx
add    (%rcx,%rax,4),%ebp
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
@diffrec.base = internal unnamed_addr constant [5 x i32] [i32 0, i32 1, i32 1, i32 2, i32 4]
define i32 @diffrec(i32 %0) {
%2 = icmp slt i32 %0, 5
br i1 %2, label %3, label %10
3: ; preds = %10, %1
%4 = phi i32 [ 0, %1 ], [ %19, %10 ]
%5 = phi i32 [ %0, %1 ], [ %17, %10 ]
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds [5 x i32], [5 x i32]* @diffrec.base, i64 0, i64 %6
%8 = load i32, i32* %7
%9 = add nsw i32 %8, %4
ret i32 %9
10: ; preds = %1, %10
%11 = phi i32 [ %17, %10 ], [ %0, %1 ]
%12 = phi i32 [ %19, %10 ], [ 0, %1 ]
%13 = add nsw i32 %11, -1
%14 = tail call i32 @diffrec(i32 %13)
%15 = add nsw i32 %11, -3
%16 = tail call i32 @diffrec(i32 %15)
%17 = add nsw i32 %11, -4
%18 = add i32 %14, %12
%19 = add i32 %18, %16
%20 = icmp ult i32 %11, 9
br i1 %20, label %3, label %10
}
unsigned getval_254() { return 3281112713U; }


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

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

LLVM IR (-O0):
define i32 @getval_254() {
ret i32 -1013854583
}

LLVM IR (-O2):
define i32 @getval_254() {
ret i32 -1013854583
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void server_run() { fprintf(stderr, "server_run\n"); }


x86 assembly (clang, -O0):
<server_run>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<server_run>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [12 x i8] c"server_run\0A\00"
define void @server_run() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [12 x i8] c"server_run\0A\00"
define void @server_run() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ handle_error(char *);
void *realloc(void *, size_t);
void *Realloc(void *ptr, size_t size) {
  if (size == 0) {
    handle_error("Cannot Realloc a size of 0!");
  }
  ptr = realloc(ptr, size);
  if (ptr == NULL) {
    handle_error("Error on realloc");
  }
  return ptr;
}


x86 assembly (clang, -O0):
<Realloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1147 <Realloc+0x27>
lea    0xebe(%rip),%rdi
call   1040 <handle_error@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <realloc@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    116f <Realloc+0x4f>
lea    0xeb2(%rip),%rdi
call   1040 <handle_error@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Realloc>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
test   %rsi,%rsi
jne    113b <Realloc+0x1b>
lea    0xeca(%rip),%rdi
call   1040 <handle_error@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <realloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    115a <Realloc+0x3a>
lea    0xec7(%rip),%rdi
call   1040 <handle_error@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [28 x i8] c"Cannot Realloc a size of 0!\00"
@.str.1 = [17 x i8] c"Error on realloc\00"
define i8* @Realloc(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 = icmp eq i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = call i32 @handle_error(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %2
%10 = load i8*, i8** %3
%11 = load i64, i64* %4
%12 = call i8* @realloc(i8* %10, i64 %11)
store i8* %12, i8** %3
%13 = load i8*, i8** %3
%14 = icmp eq i8* %13, null
br i1 %14, label %15, label %17
15: ; preds = %9
%16 = call i32 @handle_error(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
br label %17
17: ; preds = %15, %9
%18 = load i8*, i8** %3
ret i8* %18
}

LLVM IR (-O2):
@.str = [28 x i8] c"Cannot Realloc a size of 0!\00"
@.str.1 = [17 x i8] c"Error on realloc\00"
define noalias i8* @Realloc(i8* nocapture %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @handle_error(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %2
%7 = tail call i8* @realloc(i8* %0, i64 %1)
%8 = icmp eq i8* %7, null
br i1 %8, label %9, label %11
9: ; preds = %6
%10 = tail call i32 @handle_error(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
br label %11
11: ; preds = %9, %6
ret i8* %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned long, int);
int rdrand_long(unsigned long *);
int main() {
  int i;
  for (i = 0; 1; i++) {
    unsigned long v = 0;
    int ok = rdrand_long(&v);
    if (ok != 10)
      printf("v=%lx ok=%i\n", v, ok);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    $0x1,%al
test   $0x1,%al
jne    1145 <main+0x25>
jmp    1189 <main+0x69>
movq   $0x0,-0x10(%rbp)
lea    -0x10(%rbp),%rdi
call   1040 <rdrand_long@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0xa,-0x14(%rbp)
je     1176 <main+0x56>
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
lea    0xe8f(%rip),%rdi
call   1030 <printf@plt>
jmp    117b <main+0x5b>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1136 <main+0x16>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    %rsp,%rbx
lea    0xed2(%rip),%r14
xchg   %ax,%ax
movq   $0x0,(%rsp)
mov    %rbx,%rdi
call   1040 <rdrand_long@plt>
cmp    $0xa,%eax
je     1130 <main+0x10>
mov    (%rsp),%rsi
mov    %r14,%rdi
mov    %eax,%edx
call   1030 <printf@plt>
jmp    1130 <main+0x10>

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

LLVM IR (-O2):
@.str = [13 x i8] c"v=%lx ok=%i\0A\00"
define i32 @main() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
br label %3
3: ; preds = %9, %0
store i64 0, i64* %1
%4 = call i32 @rdrand_long(i64* %1)
%5 = icmp eq i32 %4, 10
br i1 %5, label %9, label %6
6: ; preds = %3
%7 = load i64, i64* %1
%8 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i64 %7, i32 %4)
br label %9
9: ; preds = %6, %3
br label %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_bytes_snprint() {
  printf("NOT IMPLEMENTED:"
         "pa_bytes_snprint"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [34 x i8] c"NOT IMPLEMENTED:pa_bytes_snprint\0A\00"
define i32 @pa_bytes_snprint() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [33 x i8] c"NOT IMPLEMENTED:pa_bytes_snprint\00"
define i32 @pa_bytes_snprint() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
int gb_min_int(int a, int b) { return (a < b) ? a : b; }


x86 assembly (clang, -O0):
<gb_min_int>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1121 <gb_min_int+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <gb_min_int+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gb_min_int>:
mov    %esi,%eax
cmp    %esi,%edi
cmovl  %edi,%eax
ret

LLVM IR (-O0):
define i32 @gb_min_int(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 = icmp slt i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %3
br label %12
10: ; preds = %2
%11 = load i32, i32* %4
br label %12
12: ; preds = %10, %8
%13 = phi i32 [ %9, %8 ], [ %11, %10 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @gb_min_int(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
int GenMaxLocalsSize(void) { return 0x7FFFFFFF; }


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

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

LLVM IR (-O0):
define i32 @GenMaxLocalsSize() {
ret i32 2147483647
}

LLVM IR (-O2):
define i32 @GenMaxLocalsSize() {
ret i32 2147483647
}
const char *mg_version(void) { return "3.0"; }


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"3.0\00"
define i8* @mg_version() {
ret i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [4 x i8] c"3.0\00"
define i8* @mg_version() {
ret i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ ssqjac_(int *, int *, double *, double *, int *, int *);
void mgh_ssqjac(int m, int n, const double *x, double *fjac, int ldfjac,
                int nprob) {
  int _m = m, _n = n, _ldfjac = ldfjac, _nprob = nprob;
  assert(sizeof(double) == sizeof(*x));
  ssqjac_(&_m, &_n, (double *)x, (double *)fjac, &_ldfjac, &_nprob);
}


x86 assembly (clang, -O0):
<mgh_ssqjac>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9d,-0x20(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    $0x1,%edi
call   1040 <assert@plt>
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
lea    -0x24(%rbp),%rdi
lea    -0x28(%rbp),%rsi
lea    -0x2c(%rbp),%r8
lea    -0x30(%rbp),%r9
call   1030 <ssqjac_@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mgh_ssqjac>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %rcx,%r14
mov    %rdx,%rbx
mov    %edi,0x14(%rsp)
mov    %esi,0x10(%rsp)
mov    %r8d,0xc(%rsp)
mov    %r9d,0x8(%rsp)
mov    $0x1,%edi
call   1040 <assert@plt>
lea    0x14(%rsp),%rdi
lea    0x10(%rsp),%rsi
lea    0xc(%rsp),%r8
lea    0x8(%rsp),%r9
mov    %rbx,%rdx
mov    %r14,%rcx
call   1030 <ssqjac_@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @mgh_ssqjac(i32 %0, i32 %1, double* %2, double* %3, i32 %4, i32 %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca double*
%10 = alloca double*
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
store i32 %0, i32* %7
store i32 %1, i32* %8
store double* %2, double** %9
store double* %3, double** %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%17 = load i32, i32* %7
store i32 %17, i32* %13
%18 = load i32, i32* %8
store i32 %18, i32* %14
%19 = load i32, i32* %11
store i32 %19, i32* %15
%20 = load i32, i32* %12
store i32 %20, i32* %16
%21 = call i32 @assert(i32 1)
%22 = load double*, double** %9
%23 = load double*, double** %10
%24 = call i32 @ssqjac_(i32* %13, i32* %14, double* %22, double* %23, i32* %15, i32* %16)
ret void
}

LLVM IR (-O2):
define void @mgh_ssqjac(i32 %0, i32 %1, double* %2, double* %3, i32 %4, i32 %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = bitcast i32* %7 to i8*
store i32 %0, i32* %7
%12 = bitcast i32* %8 to i8*
store i32 %1, i32* %8
%13 = bitcast i32* %9 to i8*
store i32 %4, i32* %9
%14 = bitcast i32* %10 to i8*
store i32 %5, i32* %10
%15 = tail call i32 @assert(i32 1)
%16 = call i32 @ssqjac_(i32* %7, i32* %8, double* %2, double* %3, i32* %9, i32* %10)
ret void
}
void gtk_tooltips_data_get() {}


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

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

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

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