xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ isdigit(int const);
int isxdigit(const int c) {
  return ((isdigit(c) != 0) || (((unsigned)c | 32) - (int)'a' < 6)) ? 1 : 0;
}


x86 assembly (clang, -O0):
<isxdigit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <isdigit@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
jne    1147 <isxdigit+0x37>
mov    -0x4(%rbp),%eax
or     $0x20,%eax
sub    $0x61,%eax
cmp    $0x6,%eax
setb   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%dl
xor    %eax,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @isxdigit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @isdigit(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %11, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = or i32 %7, 32
%9 = sub i32 %8, 97
%10 = icmp ult i32 %9, 6
br label %11
11: ; preds = %6, %1
%12 = phi i1 [ true, %1 ], [ %10, %6 ]
%13 = zext i1 %12 to i64
%14 = select i1 %12, i32 1, i32 0
ret i32 %14
}

LLVM IR (-O2):
define i32 @isxdigit(i32 %0) {
%2 = tail call i64 @isdigit(i32 %0)
%3 = icmp ne i64 %2, 0
%4 = or i32 %0, 32
%5 = add i32 %4, -97
%6 = icmp ult i32 %5, 6
%7 = or i1 %6, %3
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Type definitions */
struct UPnPService {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, char *);
void RNDResponseSink_ConnectionManager_GetCurrentConnectionIDs(
    struct UPnPService *Service, int ErrorCode, void *User,
    char *ConnectionIDs) {
  printf("RND Invoke Response: "
         "ConnectionManager/GetCurrentConnectionIDs[ErrorCode:%d](%s)\r\n",
         ErrorCode, ConnectionIDs);
}


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

x86 assembly (clang, -O2):
<RNDResponseSink_ConnectionManager_GetCurrentConnectionIDs>:
lea    0xee9(%rip),%rdi
mov    %rcx,%rdx
jmp    1030 <printf@plt>

LLVM IR (-O0):
%struct.UPnPService = type { i32 }
@.str = [83 x i8] c"RND Invoke Response: ConnectionManager/GetCurrentConnectionIDs[ErrorCode:%d](%s)\0D\0A\00"
define void @RNDResponseSink_ConnectionManager_GetCurrentConnectionIDs(%struct.UPnPService* %0, i32 %1, i8* %2, i8* %3) {
%5 = alloca %struct.UPnPService*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
store %struct.UPnPService* %0, %struct.UPnPService** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i32, i32* %6
%10 = load i8*, i8** %8
%11 = call i32 @printf(i8* getelementptr inbounds ([83 x i8], [83 x i8]* @.str, i64 0, i64 0), i32 %9, i8* %10)
ret void
}

LLVM IR (-O2):
%struct.UPnPService = type { i32 }
@.str = [83 x i8] c"RND Invoke Response: ConnectionManager/GetCurrentConnectionIDs[ErrorCode:%d](%s)\0D\0A\00"
define void @RNDResponseSink_ConnectionManager_GetCurrentConnectionIDs(%struct.UPnPService* nocapture readnone %0, i32 %1, i8* nocapture readnone %2, i8* %3) {
%5 = tail call i32 @printf(i8* getelementptr inbounds ([83 x i8], [83 x i8]* @.str, i64 0, i64 0), i32 %1, i8* %3)
ret void
}
/* Type definitions */
struct dm_hash_table {
  int dummy;
};

/* Variables and functions */
int dm_hash_insert_binary(struct dm_hash_table *, char const *, scalar_t__,
                          void *);
scalar_t__ strlen(char const *);
int dm_hash_insert(struct dm_hash_table *t, const char *key, void *data) {
  return dm_hash_insert_binary(t, key, strlen(key) + 1, data);
}


x86 assembly (clang, -O0):
<dm_hash_insert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    %rax,%rdx
add    $0x1,%rdx
mov    -0x18(%rbp),%rcx
call   1040 <dm_hash_insert_binary@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dm_hash_insert>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %rdi,%r15
mov    %rsi,%rdi
call   1030 <strlen@plt>
lea    0x1(%rax),%rdx
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %r14,%rcx
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <dm_hash_insert_binary@plt>

LLVM IR (-O0):
%struct.dm_hash_table = type { i32 }
define i32 @dm_hash_insert(%struct.dm_hash_table* %0, i8* %1, i8* %2) {
%4 = alloca %struct.dm_hash_table*
%5 = alloca i8*
%6 = alloca i8*
store %struct.dm_hash_table* %0, %struct.dm_hash_table** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load %struct.dm_hash_table*, %struct.dm_hash_table** %4
%8 = load i8*, i8** %5
%9 = load i8*, i8** %5
%10 = call i64 @strlen(i8* %9)
%11 = add nsw i64 %10, 1
%12 = load i8*, i8** %6
%13 = call i32 @dm_hash_insert_binary(%struct.dm_hash_table* %7, i8* %8, i64 %11, i8* %12)
ret i32 %13
}

LLVM IR (-O2):
%struct.dm_hash_table = type { i32 }
define i32 @dm_hash_insert(%struct.dm_hash_table* %0, i8* %1, i8* %2) {
%4 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%5 = add nsw i64 %4, 1
%6 = tail call i32 @dm_hash_insert_binary(%struct.dm_hash_table* %0, i8* %1, i64 %5, i8* %2)
ret i32 %6
}
int test_imm_38int8_reg(signed char val) {
  return ((val) & (0x38 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_38int8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
and    $0x38,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_38int8_reg>:
test   $0x38,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_38int8_reg(i8 signext %0) {
%2 = and i8 %0, 56
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int SNDDummyInit() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @SNDDummyInit() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ set_recursive_depth(int);
void set_recursive_depth_1() { set_recursive_depth(1); }


x86 assembly (clang, -O0):
<set_recursive_depth_1>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <set_recursive_depth@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_recursive_depth_1>:
mov    $0x1,%edi
jmp    1030 <set_recursive_depth@plt>

LLVM IR (-O0):
define void @set_recursive_depth_1() {
%1 = call i32 @set_recursive_depth(i32 1)
ret void
}

LLVM IR (-O2):
define void @set_recursive_depth_1() {
%1 = tail call i32 @set_recursive_depth(i32 1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ ack;

/* Variables and functions */
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *);
int write(int, unsigned char *, int);
void writeACK(int fd) {
  unsigned char ack[] = "$PMTK001,101,0*33\r\n";
  if (write(fd, ack, sizeof(ack)) == -1) {
    printf("error writing\n");
    perror("perror writing");
  }
}


x86 assembly (clang, -O0):
<writeACK>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    0xebe(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xebb(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xeb9(%rip),%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x20(%rbp),%rsi
mov    $0x14,%edx
call   1030 <write@plt>
cmp    $0xffffffff,%eax
jne    118c <writeACK+0x5c>
lea    0xe99(%rip),%rdi
call   1040 <printf@plt>
lea    0xe9c(%rip),%rdi
call   1050 <perror@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writeACK>:
sub    $0x18,%rsp
movaps 0xec5(%rip),%xmm0
movaps %xmm0,(%rsp)
movl   $0xa0d33,0x10(%rsp)
mov    %rsp,%rsi
mov    $0x14,%edx
call   1040 <write@plt>
cmp    $0xffffffff,%eax
je     115e <writeACK+0x2e>
add    $0x18,%rsp
ret
lea    0xeb0(%rip),%rdi
call   1030 <puts@plt>
lea    0xea3(%rip),%rdi
add    $0x18,%rsp
jmp    1050 <perror@plt>

LLVM IR (-O0):
@__const.writeACK.ack = [20 x i8] c"$PMTK001,101,0*33\0D\0A\00"
@.str = [15 x i8] c"error writing\0A\00"
@.str.1 = [15 x i8] c"perror writing\00"
define void @writeACK(i32 %0) {
%2 = alloca i32
%3 = alloca [20 x i8]
store i32 %0, i32* %2
%4 = bitcast [20 x i8]* %3 to i8*
%5 = load i32, i32* %2
%6 = getelementptr inbounds [20 x i8], [20 x i8]* %3, i64 0, i64 0
%7 = call i32 @write(i32 %5, i8* %6, i32 20)
%8 = icmp eq i32 %7, -1
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @perror(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
br label %12
12: ; preds = %9, %1
ret void
}

LLVM IR (-O2):
@__const.writeACK.ack = [20 x i8] c"$PMTK001,101,0*33\0D\0A\00"
@.str.1 = [15 x i8] c"perror writing\00"
@str = [14 x i8] c"error writing\00"
define void @writeACK(i32 %0) {
%2 = alloca [20 x i8]
%3 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%4 = call i32 @write(i32 %0, i8* %3, i32 20)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%8 = tail call i32 @perror(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
br label %9
9: ; preds = %6, %1
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t bbp_swap32(uint32_t n) {
  return (n >> 24) | ((n & 0xff0000) >> 8) | ((n & 0xff00) << 8) |
         ((n & 0xff) << 24);
}


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

x86 assembly (clang, -O2):
<bbp_swap32>:
mov    %edi,%eax
sar    $0x18,%eax
mov    %edi,%ecx
shr    $0x8,%ecx
and    $0xff00,%ecx
mov    %edi,%edx
shl    $0x8,%edx
and    $0xff0000,%edx
shl    $0x18,%edi
or     %edi,%eax
or     %ecx,%eax
or     %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @bbp_swap32(i32 %0) {
%2 = ashr i32 %0, 24
%3 = lshr i32 %0, 8
%4 = and i32 %3, 65280
%5 = shl i32 %0, 8
%6 = and i32 %5, 16711680
%7 = shl i32 %0, 24
%8 = or i32 %7, %2
%9 = or i32 %8, %4
%10 = or i32 %9, %6
ret i32 %10
}
void rop3_140_1_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk3 = ~T;
  stk2 = *D | stk3;
  stk1 = S & stk2;
  *D = (stk1 & (~S) & (~T)) | (*D & S) | (*D & T);
}


x86 assembly (clang, -O0):
<rop3_140_1_1>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0xa(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xd(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xd(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xc(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
movzbl -0xa(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0xa(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_140_1_1>:
or     %edx,%esi
and    %sil,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_140_1_1(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%10 = load i8, i8* %6
%11 = zext i8 %10 to i32
%12 = xor i32 %11, -1
%13 = trunc i32 %12 to i8
store i8 %13, i8* %9
%14 = load i8*, i8** %4
%15 = load i8, i8* %14
%16 = zext i8 %15 to i32
%17 = load i8, i8* %9
%18 = zext i8 %17 to i32
%19 = or i32 %16, %18
%20 = trunc i32 %19 to i8
store i8 %20, i8* %8
%21 = load i8, i8* %5
%22 = zext i8 %21 to i32
%23 = load i8, i8* %8
%24 = zext i8 %23 to i32
%25 = and i32 %22, %24
%26 = trunc i32 %25 to i8
store i8 %26, i8* %7
%27 = load i8, i8* %7
%28 = zext i8 %27 to i32
%29 = load i8, i8* %5
%30 = zext i8 %29 to i32
%31 = xor i32 %30, -1
%32 = and i32 %28, %31
%33 = load i8, i8* %6
%34 = zext i8 %33 to i32
%35 = xor i32 %34, -1
%36 = and i32 %32, %35
%37 = load i8*, i8** %4
%38 = load i8, i8* %37
%39 = zext i8 %38 to i32
%40 = load i8, i8* %5
%41 = zext i8 %40 to i32
%42 = and i32 %39, %41
%43 = or i32 %36, %42
%44 = load i8*, i8** %4
%45 = load i8, i8* %44
%46 = zext i8 %45 to i32
%47 = load i8, i8* %6
%48 = zext i8 %47 to i32
%49 = and i32 %46, %48
%50 = or i32 %43, %49
%51 = trunc i32 %50 to i8
%52 = load i8*, i8** %4
store i8 %51, i8* %52
ret void
}

LLVM IR (-O2):
define void @rop3_140_1_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = or i8 %2, %1
%6 = and i8 %4, %5
store i8 %6, i8* %0
ret void
}
int get_timer_page_address(void) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @get_timer_page_address() {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void boom() {
  printf("***************\n");
  printf("*** BOOM!!! ***\n");
  printf("***************\n");
  exit(-1);
}


x86 assembly (clang, -O0):
<boom>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
lea    0xeda(%rip),%rdi
call   1030 <printf@plt>
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<boom>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0xec9(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
@str.2 = [16 x i8] c"*** BOOM!!! ***\00"
@str.3 = [16 x i8] c"***************\00"
define void @boom() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.3, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.2, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.3, i64 0, i64 0))
%4 = tail call i32 @exit(i32 -1)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tms {
  double tms_utime;
  double tms_stime;
};

/* Variables and functions */
int /*<<< orphan*/ times(struct tms *);
double ibm_cputime_() {
  struct tms bufff;
  double e;
  time_t tt;
  double tarray[2];
  tt = times(&bufff);
  tarray[0] = 0.01 * bufff.tms_utime;
  tarray[1] = 0.01 * bufff.tms_stime;
  e = tarray[0] + tarray[1];
  return e;
}


x86 assembly (clang, -O0):
<ibm_cputime_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    -0x10(%rbp),%rdi
call   1030 <times@plt>
mov    %eax,-0x1c(%rbp)
movsd  0xed4(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xec2(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x30(%rbp),%xmm0
addsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ibm_cputime_>:
sub    $0x18,%rsp
mov    %rsp,%rdi
call   1030 <times@plt>
movapd (%rsp),%xmm1
mulpd  0xed7(%rip),%xmm1
movapd %xmm1,%xmm0
unpckhpd %xmm1,%xmm0
addsd  %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.tms = type { double, double }
define double @ibm_cputime_() {
%1 = alloca %struct.tms
%2 = alloca double
%3 = alloca i32
%4 = alloca [2 x double]
%5 = call i32 @times(%struct.tms* %1)
store i32 %5, i32* %3
%6 = getelementptr inbounds %struct.tms, %struct.tms* %1, i32 0, i32 0
%7 = load double, double* %6
%8 = fmul double 1.000000e-02, %7
%9 = getelementptr inbounds [2 x double], [2 x double]* %4, i64 0, i64 0
store double %8, double* %9
%10 = getelementptr inbounds %struct.tms, %struct.tms* %1, i32 0, i32 1
%11 = load double, double* %10
%12 = fmul double 1.000000e-02, %11
%13 = getelementptr inbounds [2 x double], [2 x double]* %4, i64 0, i64 1
store double %12, double* %13
%14 = getelementptr inbounds [2 x double], [2 x double]* %4, i64 0, i64 0
%15 = load double, double* %14
%16 = getelementptr inbounds [2 x double], [2 x double]* %4, i64 0, i64 1
%17 = load double, double* %16
%18 = fadd double %15, %17
store double %18, double* %2
%19 = load double, double* %2
ret double %19
}

LLVM IR (-O2):
%struct.tms = type { double, double }
define double @ibm_cputime_() {
%1 = alloca <2 x double>
%2 = bitcast <2 x double>* %1 to %struct.tms*
%3 = bitcast <2 x double>* %1 to i8*
%4 = call i32 @times(%struct.tms* %2)
%5 = load <2 x double>, <2 x double>* %1
%6 = fmul <2 x double> %5, <double 1.000000e-02, double 1.000000e-02>
%7 = shufflevector <2 x double> %6, <2 x double> poison, <2 x i32> <i32 1, i32 undef>
%8 = fadd <2 x double> %6, %7
%9 = extractelement <2 x double> %8, i64 0
ret double %9
}
float dremf(x, y)
float x;
float y;
{ return x + y; }


x86 assembly (clang, -O0):
<dremf>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm1,-0x10(%rbp)
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
cvtsd2ss %xmm1,%xmm1
cvtsd2ss %xmm0,%xmm0
movss  %xmm1,-0x4(%rbp)
movss  %xmm0,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
addss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<dremf>:
cvtsd2ss %xmm0,%xmm2
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
addss  %xmm2,%xmm0
ret

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

LLVM IR (-O2):
define float @dremf(double %0, double %1) {
%3 = fptrunc double %0 to float
%4 = fptrunc double %1 to float
%5 = fadd float %3, %4
ret float %5
}
void makeChild() {}


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

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

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

LLVM IR (-O2):
define void @makeChild() {
ret void
}
void BusFaultException(void) {
  while (1) {
  }
}


x86 assembly (clang, -O0):
<BusFaultException>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <BusFaultException+0x9>
jmp    1109 <BusFaultException+0x9>

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

LLVM IR (-O0):
define void @BusFaultException() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @BusFaultException() {
br label %1
1: ; preds = %0, %1
br label %1
}
unsigned fftwf_hash(const char *s) {
  unsigned h = 0xDEADBEEFu;
  do {
    h = h * 17 + (int)*s;
  } while (*s++);
  return h;
}


x86 assembly (clang, -O0):
<fftwf_hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0xdeadbeef,-0xc(%rbp)
imul   $0x11,-0xc(%rbp),%eax
mov    -0x8(%rbp),%rcx
movsbl (%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
cmpb   $0x0,(%rax)
jne    110f <fftwf_hash+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fftwf_hash>:
mov    $0xdeadbeef,%eax
cs nopw 0x0(%rax,%rax,1)
nop
mov    %eax,%ecx
shl    $0x4,%ecx
add    %ecx,%eax
movsbl (%rdi),%ecx
add    %ecx,%eax
add    $0x1,%rdi
test   %ecx,%ecx
jne    1110 <fftwf_hash+0x10>
ret

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

LLVM IR (-O2):
define i32 @fftwf_hash(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %9, %2 ]
%4 = phi i32 [ -559038737, %1 ], [ %8, %2 ]
%5 = mul i32 %4, 17
%6 = load i8, i8* %3
%7 = sext i8 %6 to i32
%8 = add i32 %5, %7
%9 = getelementptr inbounds i8, i8* %3, i64 1
%10 = icmp eq i8 %6, 0
br i1 %10, label %11, label %2
11: ; preds = %2
ret i32 %8
}
int write_mbf(char *mbf) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @write_mbf(i8* nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int);
uint64_t chpl_bitops_rotr_64(uint64_t x, uint64_t n) {
  assert(n < 64);
  return (x >> n) | (x << (-n & (64 - 1)));
}


x86 assembly (clang, -O0):
<chpl_bitops_rotr_64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x40,-0x8(%rbp)
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
sar    %cl,%eax
mov    -0x4(%rbp),%edx
xor    %ecx,%ecx
sub    -0x8(%rbp),%ecx
and    $0x3f,%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chpl_bitops_rotr_64>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %edi,%edi
cmp    $0x40,%esi
setl   %dil
call   1030 <assert@plt>
mov    %ebp,%eax
mov    %ebx,%ecx
sar    %cl,%eax
neg    %bl
mov    %ebx,%ecx
shl    %cl,%ebp
or     %eax,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @chpl_bitops_rotr_64(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp slt i32 %5, 64
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = ashr i32 %9, %10
%12 = load i32, i32* %3
%13 = load i32, i32* %4
%14 = sub nsw i32 0, %13
%15 = and i32 %14, 63
%16 = shl i32 %12, %15
%17 = or i32 %11, %16
ret i32 %17
}

LLVM IR (-O2):
define i32 @chpl_bitops_rotr_64(i32 %0, i32 %1) {
%3 = icmp slt i32 %1, 64
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = ashr i32 %0, %1
%7 = sub nsw i32 0, %1
%8 = and i32 %7, 63
%9 = shl i32 %0, %8
%10 = or i32 %9, %6
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void show_help(void) {
  printf("Usage: %s [OPTION] user[:group]...\n\nOptions:\n    -R, "
         "--recursive\t\tchange group of files recursively\n    -v, "
         "--verbose\t\toutput a diagnostic for every file processed\n    -d, "
         "--no-dereference\t\t\n    -h, --help\t\tdisplay this help\n    -V, "
         "--version\tdisplay version information\n\nReport bugs to "
         "<bulliver@gmail.com>\n",
         "chown");
}


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

x86 assembly (clang, -O2):
<show_help>:
lea    0xee9(%rip),%rdi
lea    0x1017(%rip),%rsi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [309 x i8] c"Usage: %s [OPTION] user[:group]...\0A\0AOptions:\0A -R, --recursive\09\09change group of files recursively\0A -v, --verbose\09\09output a diagnostic for every file processed\0A -d, --no-dereference\09\09\0A -h, --help\09\09display this help\0A -V, --version\09display version information\0A\0AReport bugs to <bulliver@gmail.com>\0A\00"
@.str.1 = [6 x i8] c"chown\00"
define void @show_help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([309 x i8], [309 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [309 x i8] c"Usage: %s [OPTION] user[:group]...\0A\0AOptions:\0A -R, --recursive\09\09change group of files recursively\0A -v, --verbose\09\09output a diagnostic for every file processed\0A -d, --no-dereference\09\09\0A -h, --help\09\09display this help\0A -V, --version\09display version information\0A\0AReport bugs to <bulliver@gmail.com>\0A\00"
@.str.1 = [6 x i8] c"chown\00"
define void @show_help() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([309 x i8], [309 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret void
}
unsigned setbits(unsigned x, int p, int n, unsigned y) {
  unsigned mask, shift;
  mask = ~(~0 << n);
  shift = p + 1 - n;
  return (x & ~(mask << shift)) | ((y & mask) << shift);
}


x86 assembly (clang, -O0):
<setbits>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0xc(%rbp),%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
xor    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
shl    %cl,%edx
mov    %edx,%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x10(%rbp),%edx
and    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<setbits>:
mov    %ecx,%r8d
mov    %edx,%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
not    %eax
sub    %edx,%esi
lea    0x1(%rsi),%ecx
mov    %eax,%edx
shl    %cl,%edx
not    %edx
and    %edi,%edx
and    %r8d,%eax
shl    %cl,%eax
or     %edx,%eax
ret

LLVM IR (-O0):
define i32 @setbits(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%11 = load i32, i32* %7
%12 = shl i32 -1, %11
%13 = xor i32 %12, -1
store i32 %13, i32* %9
%14 = load i32, i32* %6
%15 = add nsw i32 %14, 1
%16 = load i32, i32* %7
%17 = sub nsw i32 %15, %16
store i32 %17, i32* %10
%18 = load i32, i32* %5
%19 = load i32, i32* %9
%20 = load i32, i32* %10
%21 = shl i32 %19, %20
%22 = xor i32 %21, -1
%23 = and i32 %18, %22
%24 = load i32, i32* %8
%25 = load i32, i32* %9
%26 = and i32 %24, %25
%27 = load i32, i32* %10
%28 = shl i32 %26, %27
%29 = or i32 %23, %28
ret i32 %29
}

LLVM IR (-O2):
define i32 @setbits(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = shl nsw i32 -1, %2
%6 = xor i32 %5, -1
%7 = add nsw i32 %1, 1
%8 = sub i32 %7, %2
%9 = shl i32 %6, %8
%10 = xor i32 %9, -1
%11 = and i32 %10, %0
%12 = and i32 %6, %3
%13 = shl i32 %12, %8
%14 = or i32 %11, %13
ret i32 %14
}
int replaceByte(int x, int n, int c) {
  int mask = 0x000000FF;
  int shifted_mask = mask << (n << 3);
  int inversed_mask = ~shifted_mask;
  int num_removed_byte = x & inversed_mask;
  int byteInPosition = c << (n << 3);
  int result_word = num_removed_byte | byteInPosition;
  return result_word;
}


x86 assembly (clang, -O0):
<replaceByte>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movl   $0xff,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    $0x3,%ecx
shl    %cl,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
mov    -0x4(%rbp),%eax
and    -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    $0x3,%ecx
shl    %cl,%eax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
or     -0x20(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<replaceByte>:
lea    0x0(,%rsi,8),%ecx
mov    $0xff,%eax
shl    %cl,%eax
not    %eax
and    %edi,%eax
shl    %cl,%edx
or     %edx,%eax
ret

LLVM IR (-O0):
define i32 @replaceByte(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
store i32 255, i32* %7
%13 = load i32, i32* %7
%14 = load i32, i32* %5
%15 = shl i32 %14, 3
%16 = shl i32 %13, %15
store i32 %16, i32* %8
%17 = load i32, i32* %8
%18 = xor i32 %17, -1
store i32 %18, i32* %9
%19 = load i32, i32* %4
%20 = load i32, i32* %9
%21 = and i32 %19, %20
store i32 %21, i32* %10
%22 = load i32, i32* %6
%23 = load i32, i32* %5
%24 = shl i32 %23, 3
%25 = shl i32 %22, %24
store i32 %25, i32* %11
%26 = load i32, i32* %10
%27 = load i32, i32* %11
%28 = or i32 %26, %27
store i32 %28, i32* %12
%29 = load i32, i32* %12
ret i32 %29
}

LLVM IR (-O2):
define i32 @replaceByte(i32 %0, i32 %1, i32 %2) {
%4 = shl i32 %1, 3
%5 = shl i32 255, %4
%6 = xor i32 %5, -1
%7 = and i32 %6, %0
%8 = shl i32 %2, %4
%9 = or i32 %7, %8
ret i32 %9
}
void nbr_Construct(_tot) int *_tot;
{
  int Base_Construct;
  Construct_FIRST_FNC_OBJ(_tot, &Base_Construct);
}


x86 assembly (clang, -O0):
<nbr_Construct>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x0,%al
call   1030 <Construct_FIRST_FNC_OBJ@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nbr_Construct>:
push   %rax
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1030 <Construct_FIRST_FNC_OBJ@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @nbr_Construct(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 (i32*, i32*, ...) bitcast (i32 (...)* @Construct_FIRST_FNC_OBJ to i32 (i32*, i32*, ...)*)(i32* %4, i32* %3)
ret void
}

LLVM IR (-O2):
define void @nbr_Construct(i32* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 (i32*, i32*, ...) bitcast (i32 (...)* @Construct_FIRST_FNC_OBJ to i32 (i32*, i32*, ...)*)(i32* %0, i32* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ itoa(int, char *, int);
int /*<<< orphan*/ puts(char *);
void printhex(int i) {
  char temp[10];
  itoa(i, temp, 16);
  puts(temp);
}


x86 assembly (clang, -O0):
<printhex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    -0xe(%rbp),%rsi
mov    $0x10,%edx
call   1040 <itoa@plt>
lea    -0xe(%rbp),%rdi
call   1030 <puts@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printhex>:
push   %rbx
sub    $0x10,%rsp
lea    0x6(%rsp),%rbx
mov    %rbx,%rsi
mov    $0x10,%edx
call   1040 <itoa@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @printhex(i32 %0) {
%2 = alloca i32
%3 = alloca [10 x i8]
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%6 = call i32 @itoa(i32 %4, i8* %5, i32 16)
%7 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%8 = call i32 @puts(i8* %7)
ret void
}

LLVM IR (-O2):
define void @printhex(i32 %0) {
%2 = alloca [10 x i8]
%3 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%4 = call i32 @itoa(i32 %0, i8* %3, i32 16)
%5 = call i32 @puts(i8* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ execute_word(char *, void *);
scalar_t__ init_forth();
main() {
  void *up;
  up = (void *)init_forth();
  execute_word("quit", up);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <init_forth@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec2(%rip),%rdi
call   1030 <execute_word@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <init_forth@plt>
lea    0xed1(%rip),%rdi
mov    %rax,%rsi
call   1030 <execute_word@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"quit\00"
define i32 @main() {
%1 = alloca i8*
%2 = call i64 (...) @init_forth()
%3 = inttoptr i64 %2 to i8*
store i8* %3, i8** %1
%4 = load i8*, i8** %1
%5 = call i32 @execute_word(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"quit\00"
define i32 @main() {
%1 = tail call i64 (...) @init_forth()
%2 = inttoptr i64 %1 to i8*
%3 = tail call i32 @execute_word(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ assert(void *);
unsigned char memory_get_byte(void *p_memory, unsigned int idx) {
  assert(p_memory);
  unsigned char ret_val = 0;
  unsigned char *p_buffer = (unsigned char *)p_memory;
  ret_val = *(p_buffer + idx);
  return ret_val;
}


x86 assembly (clang, -O0):
<memory_get_byte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <assert@plt>
movb   $0x0,-0xd(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    (%rax,%rcx,1),%al
mov    %al,-0xd(%rbp)
movzbl -0xd(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<memory_get_byte>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1030 <assert@plt>
mov    %ebp,%eax
mov    (%rbx,%rax,1),%al
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define zeroext i8 @memory_get_byte(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8
%6 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
%7 = load i8*, i8** %3
%8 = call i32 @assert(i8* %7)
store i8 0, i8* %5
%9 = load i8*, i8** %3
store i8* %9, i8** %6
%10 = load i8*, i8** %6
%11 = load i32, i32* %4
%12 = zext i32 %11 to i64
%13 = getelementptr inbounds i8, i8* %10, i64 %12
%14 = load i8, i8* %13
store i8 %14, i8* %5
%15 = load i8, i8* %5
ret i8 %15
}

LLVM IR (-O2):
define zeroext i8 @memory_get_byte(i8* %0, i32 %1) {
%3 = tail call i32 @assert(i8* %0)
%4 = zext i32 %1 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
ret i8 %6
}
/* Variables and functions */
int /*<<< orphan*/ old_main();
int /*<<< orphan*/ startup(int, char **);
int main(int argc, char **argv) {
  startup(argc, argv);
  old_main();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = call i32 @startup(i32 %6, i8** %7)
%9 = call i32 (...) @old_main()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @startup(i32 %0, i8** %1)
%4 = tail call i32 (...) @old_main()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ free(char *);
int jnx_file_mktempdir(char *, char **);
int /*<<< orphan*/ remove(char *);
void test_jnx_dir() {
  char *path;
  char l[] = "/tmp";
  int ret = jnx_file_mktempdir(l, &path);
  assert(ret == 0);
  remove(path);
  free(path);
}


x86 assembly (clang, -O0):
<test_jnx_dir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0xeb2(%rip),%eax
mov    %eax,-0xd(%rbp)
mov    0xead(%rip),%al
mov    %al,-0x9(%rbp)
lea    -0xd(%rbp),%rdi
lea    -0x8(%rbp),%rsi
call   1060 <jnx_file_mktempdir@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    -0x8(%rbp),%rdi
call   1040 <remove@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_jnx_dir>:
sub    $0x18,%rsp
movb   $0x0,0xc(%rsp)
movl   $0x706d742f,0x8(%rsp)
70
lea    0x8(%rsp),%rdi
lea    0x10(%rsp),%rsi
call   1060 <jnx_file_mktempdir@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1050 <assert@plt>
mov    0x10(%rsp),%rdi
call   1040 <remove@plt>
mov    0x10(%rsp),%rdi
call   1030 <free@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.test_jnx_dir.l = [5 x i8] c"/tmp\00"
define void @test_jnx_dir() {
%1 = alloca i8*
%2 = alloca [5 x i8]
%3 = alloca i32
%4 = bitcast [5 x i8]* %2 to i8*
%5 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
%6 = call i32 @jnx_file_mktempdir(i8* %5, i8** %1)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = icmp eq i32 %7, 0
%9 = zext i1 %8 to i32
%10 = call i32 @assert(i32 %9)
%11 = load i8*, i8** %1
%12 = call i32 @remove(i8* %11)
%13 = load i8*, i8** %1
%14 = call i32 @free(i8* %13)
ret void
}

LLVM IR (-O2):
@__const.test_jnx_dir.l = [5 x i8] c"/tmp\00"
define void @test_jnx_dir() {
%1 = alloca i8*
%2 = alloca [5 x i8]
%3 = bitcast i8** %1 to i8*
%4 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
%5 = call i32 @jnx_file_mktempdir(i8* %4, i8** %1)
%6 = icmp eq i32 %5, 0
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
%9 = load i8*, i8** %1
%10 = call i32 @remove(i8* %9)
%11 = load i8*, i8** %1
%12 = call i32 @free(i8* %11)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ eindent();
scalar_t__ is_verbose();
void eindentv(void) {
  if (is_verbose())
    eindent();
}


x86 assembly (clang, -O0):
<eindentv>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <is_verbose@plt>
cmp    $0x0,%rax
je     113c <eindentv+0x1c>
mov    $0x0,%al
call   1040 <eindent@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<eindentv>:
push   %rax
xor    %eax,%eax
call   1030 <is_verbose@plt>
test   %rax,%rax
je     1135 <eindentv+0x15>
xor    %eax,%eax
pop    %rcx
jmp    1040 <eindent@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @eindentv() {
%1 = call i64 (...) @is_verbose()
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 (...) @eindent()
br label %5
5: ; preds = %3, %0
ret void
}

LLVM IR (-O2):
define void @eindentv() {
%1 = tail call i64 (...) @is_verbose()
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @eindent()
br label %5
5: ; preds = %3, %0
ret void
}
void matrix_free(char **matrix, int rows) {
  int i;
  for (i = 0; i < rows; i++) {
    free(matrix[i]);
  }
  free(matrix);
}


x86 assembly (clang, -O0):
<matrix_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1151 <matrix_free+0x41>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <matrix_free+0x16>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<matrix_free>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
test   %esi,%esi
jle    1142 <matrix_free+0x32>
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <matrix_free+0x20>
mov    %r14,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @matrix_free(i8** nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %12
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %10, %6 ]
%8 = getelementptr inbounds i8*, i8** %0, i64 %7
%9 = load i8*, i8** %8
tail call void @free(i8* %9)
%10 = add nuw nsw i64 %7, 1
%11 = icmp eq i64 %10, %5
br i1 %11, label %12, label %6
12: ; preds = %6, %2
%13 = bitcast i8** %0 to i8*
tail call void @free(i8* %13)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ HplMsp430GeneralIOP__17__IO__selectIOFunc();
void HplMsp430Usart0P__SIMO__selectIOFunc(void) {
  HplMsp430GeneralIOP__17__IO__selectIOFunc();
}


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

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

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

LLVM IR (-O2):
define void @HplMsp430Usart0P__SIMO__selectIOFunc() {
%1 = tail call i32 (...) @HplMsp430GeneralIOP__17__IO__selectIOFunc()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int EINVAL;
__attribute__((visibility("default"))) int
sd_event_source_get_priority(void *s, int64_t *priority) {
  return -EINVAL;
}


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

x86 assembly (clang, -O2):
<sd_event_source_get_priority>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @sd_event_source_get_priority(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
store i8* %0, i8** %3
store i32* %1, i32** %4
%5 = load i32, i32* @EINVAL
%6 = sub nsw i32 0, %5
ret i32 %6
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sd_event_source_get_priority(i8* nocapture readnone %0, i32* nocapture readnone %1) {
%3 = load i32, i32* @EINVAL
%4 = sub nsw i32 0, %3
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ wint_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fgetwc(int /*<<< orphan*/ *);
wint_t getwc(FILE *fp) { return fgetwc(fp); }


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

x86 assembly (clang, -O2):
<getwc>:
jmp    1030 <fgetwc@plt>

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

LLVM IR (-O2):
define i32 @getwc(i32* %0) {
%2 = tail call i32 @fgetwc(i32* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void _printUsage(const char *appName) {
  printf("Usage:\n");
  printf("\t%s FILE      Start server with bin file\n", appName);
  printf("\t%s -h        Print this usage.\n", appName);
}


x86 assembly (clang, -O0):
<_printUsage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xed3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xeeb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_printUsage>:
push   %rbx
mov    %rdi,%rbx
lea    0xf20(%rip),%rdi
call   1030 <puts@plt>
lea    0xec9(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xee2(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
pop    %rbx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"Usage:\0A\00"
@.str.1 = [42 x i8] c"\09%s FILE Start server with bin file\0A\00"
@.str.2 = [33 x i8] c"\09%s -h Print this usage.\0A\00"
define void @_printUsage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%6 = load i8*, i8** %2
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0), i8* %6)
ret void
}

LLVM IR (-O2):
@.str.1 = [42 x i8] c"\09%s FILE Start server with bin file\0A\00"
@.str.2 = [33 x i8] c"\09%s -h Print this usage.\0A\00"
@str = [7 x i8] c"Usage:\00"
define void @_printUsage(i8* %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0), i8* %0)
ret void
}