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

/* Variables and functions */
void zero_arr(uint32_t str[], size_t size) {
  int i;
  for (i = 0; i < size; i++) {
    str[i] = 0;
  }
}


x86 assembly (clang, -O0):
<zero_arr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movslq -0x14(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    113f <zero_arr+0x3f>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movq   $0x0,(%rax,%rcx,8)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <zero_arr+0x13>
pop    %rbp
ret

x86 assembly (clang, -O2):
<zero_arr>:
test   %rsi,%rsi
je     1128 <zero_arr+0x18>
push   %rax
mov    %rsi,%rdx
shl    $0x3,%rdx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define void @zero_arr(i64* nocapture writeonly %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = bitcast i64* %0 to i8*
%6 = shl nuw i64 %1, 3
br label %7
7: ; preds = %4, %2
ret void
}
void __attribute__((no)) lazy_rest_c_apiDatInit(void) {}


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

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

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

LLVM IR (-O2):
define void @lazy_rest_c_apiDatInit() {
ret void
}
/* Variables and functions */
int backup_senser_sync_msg(int, int /*<<< orphan*/, void *, size_t *, int, int);
int backup_senser_cmd_preset_data_read(int from_memory, void *data,
                                       size_t *len) {
  return backup_senser_sync_msg(5, 0, data, len, 1, from_memory);
}


x86 assembly (clang, -O0):
<backup_senser_cmd_preset_data_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x4(%rbp),%r9d
mov    $0x5,%edi
xor    %esi,%esi
mov    $0x1,%r8d
call   1030 <backup_senser_sync_msg@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<backup_senser_cmd_preset_data_read>:
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %edi,%r9d
mov    $0x5,%edi
xor    %esi,%esi
mov    $0x1,%r8d
jmp    1030 <backup_senser_sync_msg@plt>

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

LLVM IR (-O2):
define i32 @backup_senser_cmd_preset_data_read(i32 %0, i8* %1, i64* %2) {
%4 = tail call i32 @backup_senser_sync_msg(i32 5, i32 0, i8* %1, i64* %2, i32 1, i32 %0)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ initialize(char *, int, char *);
int /*<<< orphan*/ printf(char *);
void sim(char *instr_hex, char *pc_values_hex) {
  printf("RISC-V Simulator\n\n");
  initialize(instr_hex, 1, pc_values_hex);
}


x86 assembly (clang, -O0):
<sim>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    $0x1,%esi
call   1040 <initialize@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sim>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xecf(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <initialize@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"RISC-V Simulator\0A\0A\00"
define void @sim(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
%8 = call i32 @initialize(i8* %6, i32 1, i8* %7)
ret void
}

LLVM IR (-O2):
@str = [18 x i8] c"RISC-V Simulator\0A\00"
define void @sim(i8* %0, i8* %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @initialize(i8* %0, i32 1, i8* %1)
ret void
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int lis(int *, int);
int main() {
  int *a;
  int N = __VERIFIER_nondet_int();
  return lis(a, N);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <lis@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <__VERIFIER_nondet_int@plt>
mov    %eax,%esi
pop    %rax
jmp    1030 <lis@plt>

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 @lis(i32* undef, i32 %1)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "usage: getvab filename\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [24 x i8] c"usage: getvab filename\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [24 x i8] c"usage: getvab filename\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ symbol_delete(void *);
void symbol_cleanup_hash_syms_cb(void *p_void) { symbol_delete(p_void); }


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

x86 assembly (clang, -O2):
<symbol_cleanup_hash_syms_cb>:
jmp    1030 <symbol_delete@plt>

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

LLVM IR (-O2):
define void @symbol_cleanup_hash_syms_cb(i8* %0) {
%2 = tail call i32 @symbol_delete(i8* %0)
ret void
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
void USBPHYPowerOn(uint32_t ui32Base) {
  (*((volatile unsigned char *)(ui32Base + 0x00000001))) &= ~0x00000001;
}


x86 assembly (clang, -O0):
<USBPHYPowerOn>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x1(%rax),%cl
movzbl %cl,%ecx
and    $0xfffffffe,%ecx
mov    %cl,0x1(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<USBPHYPowerOn>:
andb   $0xfe,0x1(%rdi)
ret

LLVM IR (-O0):
define void @USBPHYPowerOn(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add nsw i64 %3, 1
%5 = inttoptr i64 %4 to i8*
%6 = load volatile i8, i8* %5
%7 = zext i8 %6 to i32
%8 = and i32 %7, -2
%9 = trunc i32 %8 to i8
store volatile i8 %9, i8* %5
ret void
}

LLVM IR (-O2):
define void @USBPHYPowerOn(i64 %0) {
%2 = add nsw i64 %0, 1
%3 = inttoptr i64 %2 to i8*
%4 = load volatile i8, i8* %3
%5 = and i8 %4, -2
store volatile i8 %5, i8* %3
ret void
}
unsigned int hexrev(unsigned int x) {
  unsigned int a = x;
  unsigned int a1, a2, a3, a4, ans;
  a1 = a % 0x100;
  a = a / 0x100;
  a2 = a % 0x100;
  a = a / 0x100;
  a3 = a % 0x100;
  a = a / 0x100;
  a4 = a % 0x100;
  ans = a4 + a3 * 0x100 + a2 * 0x10000 + a1 * 0x1000000;
  return ans;
}


x86 assembly (clang, -O0):
<hexrev>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0xff,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
shr    $0x8,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0xff,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
shr    $0x8,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0xff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
shr    $0x8,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0xff,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    -0x14(%rbp),%ecx
shl    $0x8,%ecx
add    %ecx,%eax
mov    -0x10(%rbp),%ecx
shl    $0x10,%ecx
add    %ecx,%eax
mov    -0xc(%rbp),%ecx
shl    $0x18,%ecx
add    %ecx,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hexrev>:
mov    %edi,%eax
bswap  %eax
ret

LLVM IR (-O0):
define i32 @hexrev(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %2
%9 = load i32, i32* %2
store i32 %9, i32* %3
%10 = load i32, i32* %3
%11 = urem i32 %10, 256
store i32 %11, i32* %4
%12 = load i32, i32* %3
%13 = udiv i32 %12, 256
store i32 %13, i32* %3
%14 = load i32, i32* %3
%15 = urem i32 %14, 256
store i32 %15, i32* %5
%16 = load i32, i32* %3
%17 = udiv i32 %16, 256
store i32 %17, i32* %3
%18 = load i32, i32* %3
%19 = urem i32 %18, 256
store i32 %19, i32* %6
%20 = load i32, i32* %3
%21 = udiv i32 %20, 256
store i32 %21, i32* %3
%22 = load i32, i32* %3
%23 = urem i32 %22, 256
store i32 %23, i32* %7
%24 = load i32, i32* %7
%25 = load i32, i32* %6
%26 = mul i32 %25, 256
%27 = add i32 %24, %26
%28 = load i32, i32* %5
%29 = mul i32 %28, 65536
%30 = add i32 %27, %29
%31 = load i32, i32* %4
%32 = mul i32 %31, 16777216
%33 = add i32 %30, %32
store i32 %33, i32* %8
%34 = load i32, i32* %8
ret i32 %34
}

LLVM IR (-O2):
define i32 @hexrev(i32 %0) {
%2 = tail call i32 @llvm.bswap.i32(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ m68ki_get_ea_pcdi();
int /*<<< orphan*/ m68ki_jump(int /*<<< orphan*/);
void m68k_op_jmp_32_pcdi(void) { m68ki_jump(m68ki_get_ea_pcdi()); }


x86 assembly (clang, -O0):
<m68k_op_jmp_32_pcdi>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <m68ki_get_ea_pcdi@plt>
mov    %eax,%edi
call   1030 <m68ki_jump@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<m68k_op_jmp_32_pcdi>:
push   %rax
xor    %eax,%eax
call   1040 <m68ki_get_ea_pcdi@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <m68ki_jump@plt>

LLVM IR (-O0):
define void @m68k_op_jmp_32_pcdi() {
%1 = call i32 (...) @m68ki_get_ea_pcdi()
%2 = call i32 @m68ki_jump(i32 %1)
ret void
}

LLVM IR (-O2):
define void @m68k_op_jmp_32_pcdi() {
%1 = tail call i32 (...) @m68ki_get_ea_pcdi()
%2 = tail call i32 @m68ki_jump(i32 %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ ASN1_VALUE;
typedef int /*<<< orphan*/ ASN1_ITEM;

/* Variables and functions */
int /*<<< orphan*/ asn1_item_embed_free(int /*<<< orphan*/ **,
                                        int /*<<< orphan*/ const *,
                                        int /*<<< orphan*/);
void ASN1_item_ex_free(ASN1_VALUE **pval, const ASN1_ITEM *it) {
  asn1_item_embed_free(pval, it, 0);
}


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

x86 assembly (clang, -O2):
<ASN1_item_ex_free>:
xor    %edx,%edx
jmp    1030 <asn1_item_embed_free@plt>

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

LLVM IR (-O2):
define void @ASN1_item_ex_free(i32** %0, i32* %1) {
%3 = tail call i32 @asn1_item_embed_free(i32** %0, i32* %1, i32 0)
ret void
}
/* Variables and functions */
void *malloc(size_t);
void *la_malloc(size_t size) { return malloc(size); }


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

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

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

LLVM IR (-O2):
define noalias i8* @la_malloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
ret i8* %2
}
/* Type definitions */
struct sockaddr {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
int recvfrom(int, void *, size_t, int, struct sockaddr *, int *);
int i_recvfrom(int fd, void *buf, size_t len, int flags, struct sockaddr *addr,
               int *size) {
  if (-1 == recvfrom(fd, buf, len, flags, addr, size)) {
    perror("i_recvfrom error:");
    exit(1);
  }
  return (0);
}


x86 assembly (clang, -O0):
<i_recvfrom>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%r9
call   1030 <recvfrom@plt>
mov    %eax,%ecx
mov    $0xffffffff,%eax
cmp    %ecx,%eax
jne    118e <i_recvfrom+0x5e>
lea    0xe81(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i_recvfrom>:
push   %rax
call   1030 <recvfrom@plt>
cmp    $0xffffffff,%eax
je     113f <i_recvfrom+0xf>
xor    %eax,%eax
pop    %rcx
ret
lea    0xeba(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
%struct.sockaddr = type { i32 }
@.str = [18 x i8] c"i_recvfrom error:\00"
define i32 @i_recvfrom(i32 %0, i8* %1, i64 %2, i32 %3, %struct.sockaddr* %4, i32* %5) {
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i64
%10 = alloca i32
%11 = alloca %struct.sockaddr*
%12 = alloca i32*
store i32 %0, i32* %7
store i8* %1, i8** %8
store i64 %2, i64* %9
store i32 %3, i32* %10
store %struct.sockaddr* %4, %struct.sockaddr** %11
store i32* %5, i32** %12
%13 = load i32, i32* %7
%14 = load i8*, i8** %8
%15 = load i64, i64* %9
%16 = load i32, i32* %10
%17 = load %struct.sockaddr*, %struct.sockaddr** %11
%18 = load i32*, i32** %12
%19 = call i32 @recvfrom(i32 %13, i8* %14, i64 %15, i32 %16, %struct.sockaddr* %17, i32* %18)
%20 = icmp eq i32 -1, %19
br i1 %20, label %21, label %24
21: ; preds = %6
%22 = call i32 @perror(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%23 = call i32 @exit(i32 1)
unreachable
24: ; preds = %6
ret i32 0
}

LLVM IR (-O2):
%struct.sockaddr = type { i32 }
@.str = [18 x i8] c"i_recvfrom error:\00"
define i32 @i_recvfrom(i32 %0, i8* %1, i64 %2, i32 %3, %struct.sockaddr* %4, i32* %5) {
%7 = tail call i32 @recvfrom(i32 %0, i8* %1, i64 %2, i32 %3, %struct.sockaddr* %4, i32* %5)
%8 = icmp eq i32 %7, -1
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = tail call i32 @perror(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%11 = tail call i32 @exit(i32 1)
unreachable
12: ; preds = %6
ret i32 0
}
int string_fun(void) {
  char *c = "Hello";
  char *d = "WorldLonger";
  int i, j;
  for (i = 0, j = 0; i < 3; ++i)
    if (c[i] == d[i])
      ++j;
  return j;
}


x86 assembly (clang, -O0):
<string_fun>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    0xef0(%rip),%rax
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
cmpl   $0x3,-0x14(%rbp)
jge    116e <string_fun+0x6e>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
mov    -0x10(%rbp),%rcx
movslq -0x14(%rbp),%rdx
movsbl (%rcx,%rdx,1),%ecx
cmp    %ecx,%eax
jne    115b <string_fun+0x5b>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1160 <string_fun+0x60>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1128 <string_fun+0x28>
mov    -0x18(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [6 x i8] c"Hello\00"
@.str.1 = [12 x i8] c"WorldLonger\00"
define i32 @string_fun() {
%1 = alloca i8*
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8** %1
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8** %2
store i32 0, i32* %3
store i32 0, i32* %4
br label %5
5: ; preds = %26, %0
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 3
br i1 %7, label %8, label %29
8: ; preds = %5
%9 = load i8*, i8** %1
%10 = load i32, i32* %3
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i8, i8* %9, i64 %11
%13 = load i8, i8* %12
%14 = sext i8 %13 to i32
%15 = load i8*, i8** %2
%16 = load i32, i32* %3
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i8, i8* %15, i64 %17
%19 = load i8, i8* %18
%20 = sext i8 %19 to i32
%21 = icmp eq i32 %14, %20
br i1 %21, label %22, label %25
22: ; preds = %8
%23 = load i32, i32* %4
%24 = add nsw i32 %23, 1
store i32 %24, i32* %4
br label %25
25: ; preds = %22, %8
br label %26
26: ; preds = %25
%27 = load i32, i32* %3
%28 = add nsw i32 %27, 1
store i32 %28, i32* %3
br label %5
29: ; preds = %5
%30 = load i32, i32* %4
ret i32 %30
}

LLVM IR (-O2):
define i32 @string_fun() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ CapSense_1_SsTrimIdacsSourcing();
void CapSense_1_SsTrimIdacs(void) { CapSense_1_SsTrimIdacsSourcing(); }


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

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

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

LLVM IR (-O2):
define void @CapSense_1_SsTrimIdacs() {
%1 = tail call i32 (...) @CapSense_1_SsTrimIdacsSourcing()
ret void
}
int leading_one(int val) { return sizeof(int) * 8 - 1 - __builtin_clz(val); }


x86 assembly (clang, -O0):
<leading_one>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
bsr    %eax,%eax
xor    $0x1f,%eax
movslq %eax,%rcx
mov    $0x1f,%eax
sub    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<leading_one>:
bsr    %edi,%eax
ret

LLVM IR (-O0):
define i32 @leading_one(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @llvm.ctlz.i32(i32 %3, i1 true)
%5 = sext i32 %4 to i64
%6 = sub i64 31, %5
%7 = trunc i64 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @leading_one(i32 %0) {
%2 = tail call i32 @llvm.ctlz.i32(i32 %0, i1 true)
%3 = xor i32 %2, 31
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ read_formats(char *, int *, int /*<<< orphan*/);
void read_local_formats(int *numformatsp) {
  read_formats("sumlines.fmt", numformatsp, 0);
}


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

x86 assembly (clang, -O2):
<read_local_formats>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
xor    %edx,%edx
jmp    1030 <read_formats@plt>

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

LLVM IR (-O2):
@.str = [13 x i8] c"sumlines.fmt\00"
define void @read_local_formats(i32* %0) {
%2 = tail call i32 @read_formats(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32* %0, i32 0)
ret void
}
int rcstokmap_SCANCMP_ALL(struct rcstokpair *rcstokpair, void *data) {
  return (0);
}


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

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

LLVM IR (-O0):
%struct.rcstokpair = type opaque
define i32 @rcstokmap_SCANCMP_ALL(%struct.rcstokpair* %0, i8* %1) {
%3 = alloca %struct.rcstokpair*
%4 = alloca i8*
store %struct.rcstokpair* %0, %struct.rcstokpair** %3
store i8* %1, i8** %4
ret i32 0
}

LLVM IR (-O2):
%struct.rcstokpair = type opaque
define i32 @rcstokmap_SCANCMP_ALL(%struct.rcstokpair* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 0
}
/* Type definitions */
struct node {
  int dummy;
};
typedef int /*<<< orphan*/ mpq_t;

/* Variables and functions */
int /*<<< orphan*/ _solve(int /*<<< orphan*/, struct node *);
int /*<<< orphan*/ mpf_set_default_prec(int);
char *mpq2str(int /*<<< orphan*/);
int /*<<< orphan*/ mpq_clear(int /*<<< orphan*/);
int /*<<< orphan*/ mpq_init(int /*<<< orphan*/);
char *solve(struct node *node) {
  mpq_t result;
  char *str;
  mpf_set_default_prec(128);
  mpq_init(result);
  _solve(result, node);
  str = mpq2str(result);
  mpq_clear(result);
  return str;
}


x86 assembly (clang, -O0):
<solve>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x80,%edi
call   1070 <mpf_set_default_prec@plt>
mov    -0xc(%rbp),%edi
call   1060 <mpq_init@plt>
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%rsi
call   1050 <_solve@plt>
mov    -0xc(%rbp),%edi
call   1030 <mpq2str@plt>
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%edi
call   1040 <mpq_clear@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solve>:
push   %rbx
mov    %rdi,%rbx
mov    $0x80,%edi
call   1070 <mpf_set_default_prec@plt>
call   1060 <mpq_init@plt>
mov    %rbx,%rsi
call   1050 <_solve@plt>
call   1030 <mpq2str@plt>
mov    %rax,%rbx
call   1040 <mpq_clear@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.node = type { i32 }
define i8* @solve(%struct.node* %0) {
%2 = alloca %struct.node*
%3 = alloca i32
%4 = alloca i8*
store %struct.node* %0, %struct.node** %2
%5 = call i32 @mpf_set_default_prec(i32 128)
%6 = load i32, i32* %3
%7 = call i32 @mpq_init(i32 %6)
%8 = load i32, i32* %3
%9 = load %struct.node*, %struct.node** %2
%10 = call i32 @_solve(i32 %8, %struct.node* %9)
%11 = load i32, i32* %3
%12 = call i8* @mpq2str(i32 %11)
store i8* %12, i8** %4
%13 = load i32, i32* %3
%14 = call i32 @mpq_clear(i32 %13)
%15 = load i8*, i8** %4
ret i8* %15
}

LLVM IR (-O2):
%struct.node = type { i32 }
define i8* @solve(%struct.node* %0) {
%2 = tail call i32 @mpf_set_default_prec(i32 128)
%3 = tail call i32 @mpq_init(i32 undef)
%4 = tail call i32 @_solve(i32 undef, %struct.node* %0)
%5 = tail call i8* @mpq2str(i32 undef)
%6 = tail call i32 @mpq_clear(i32 undef)
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ SerialWriteChar(int);
void iRobot_MaxClean() { SerialWriteChar(136); }


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

x86 assembly (clang, -O2):
<iRobot_MaxClean>:
mov    $0x88,%edi
jmp    1030 <SerialWriteChar@plt>

LLVM IR (-O0):
define void @iRobot_MaxClean() {
%1 = call i32 @SerialWriteChar(i32 136)
ret void
}

LLVM IR (-O2):
define void @iRobot_MaxClean() {
%1 = tail call i32 @SerialWriteChar(i32 136)
ret void
}
/* Variables and functions */
scalar_t__ fdim(double, double);
int /*<<< orphan*/ link_failure_fdim();
void test_fdim(double d1, double d2) {
  if (fdim(d1, d2) != fdim(d1, d2))
    link_failure_fdim();
}


x86 assembly (clang, -O0):
<test_fdim>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <fdim@plt>
mov    %rax,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <fdim@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
cmp    %rcx,%rax
je     116b <test_fdim+0x4b>
mov    $0x0,%al
call   1040 <link_failure_fdim@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_fdim>:
push   %rbx
sub    $0x10,%rsp
movsd  %xmm1,0x8(%rsp)
movsd  %xmm0,(%rsp)
call   1030 <fdim@plt>
mov    %rax,%rbx
movsd  (%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
call   1030 <fdim@plt>
cmp    %rax,%rbx
jne    1153 <test_fdim+0x33>
add    $0x10,%rsp
pop    %rbx
ret
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
jmp    1040 <link_failure_fdim@plt>

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

LLVM IR (-O2):
define void @test_fdim(double %0, double %1) {
%3 = tail call i64 @fdim(double %0, double %1)
%4 = tail call i64 @fdim(double %0, double %1)
%5 = icmp eq i64 %3, %4
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 (...) @link_failure_fdim()
br label %8
8: ; preds = %6, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
int main() {
  char a = 'A';
  char b = 66;
  printf("Promenliva 1: %c\n", a);
  printf("Promenliva 2: %c\n", b);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [18 x i8] c"Promenliva 1: %c\0A\00"
@.str.1 = [18 x i8] c"Promenliva 2: %c\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i8
store i32 0, i32* %1
store i8 65, i8* %2
store i8 66, i8* %3
%4 = load i8, i8* %2
%5 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8 signext %4)
%6 = load i8, i8* %3
%7 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i8 signext %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [18 x i8] c"Promenliva 1: %c\0A\00"
@.str.1 = [18 x i8] c"Promenliva 2: %c\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8 signext 65)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i8 signext 66)
ret i32 0
}
int rand(n) {
  unsigned char x[2];
  RAND_pseudo_bytes(x, 2);
  return (x[0] + 2 * x[1]);
}


x86 assembly (clang, -O0):
<rand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x6(%rbp),%rdi
mov    $0x2,%esi
mov    $0x0,%al
call   1030 <RAND_pseudo_bytes@plt>
movzbl -0x6(%rbp),%eax
movzbl -0x5(%rbp),%ecx
shl    $0x1,%ecx
add    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rand>:
push   %rax
lea    0x6(%rsp),%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1030 <RAND_pseudo_bytes@plt>
movzbl 0x6(%rsp),%eax
movzbl 0x7(%rsp),%ecx
lea    (%rax,%rcx,2),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @rand(i32 %0) {
%2 = alloca i32
%3 = alloca [2 x i8]
store i32 %0, i32* %2
%4 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 0
%5 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @RAND_pseudo_bytes to i32 (i8*, i32, ...)*)(i8* %4, i32 2)
%6 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 0
%7 = load i8, i8* %6
%8 = zext i8 %7 to i32
%9 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 1
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = mul nsw i32 2, %11
%13 = add nsw i32 %8, %12
ret i32 %13
}

LLVM IR (-O2):
define i32 @rand(i32 %0) {
%2 = alloca [2 x i8]
%3 = getelementptr inbounds [2 x i8], [2 x i8]* %2, i64 0, i64 0
%4 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @RAND_pseudo_bytes to i32 (i8*, i32, ...)*)(i8* %3, i32 2)
%5 = load i8, i8* %3
%6 = zext i8 %5 to i32
%7 = getelementptr inbounds [2 x i8], [2 x i8]* %2, i64 0, i64 1
%8 = load i8, i8* %7
%9 = zext i8 %8 to i32
%10 = shl nuw nsw i32 %9, 1
%11 = add nuw nsw i32 %10, %6
ret i32 %11
}
/* Variables and functions */
scalar_t__ pthread_create;
int /*<<< orphan*/ puts(char *);
int main() {
  if (pthread_create) {
    puts("This is multi-threaded version.");
  } else {
    puts("This is single-threaded version.");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2ec2(%rip),%rax
cmpq   $0x0,(%rax)
je     1141 <main+0x31>
lea    0xec9(%rip),%rdi
call   1030 <puts@plt>
jmp    114d <main+0x3d>
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ed0(%rip),%rax
cmpq   $0x0,(%rax)
lea    0xefd(%rip),%rax
lea    0xed6(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@pthread_create = global i64 0
@.str = [32 x i8] c"This is multi-threaded version.\00"
@.str.1 = [33 x i8] c"This is single-threaded version.\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i64, i64* @pthread_create
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @puts(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
br label %8
6: ; preds = %0
%7 = call i32 @puts(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
br label %8
8: ; preds = %6, %4
ret i32 0
}

LLVM IR (-O2):
@pthread_create = global i64 0
@.str = [32 x i8] c"This is multi-threaded version.\00"
@.str.1 = [33 x i8] c"This is single-threaded version.\00"
define i32 @main() {
%1 = load i64, i64* @pthread_create
%2 = icmp eq i64 %1, 0
%3 = select i1 %2, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0)
%4 = tail call i32 @puts(i8* dereferenceable(1) %3)
ret i32 0
}
/* Type definitions */
struct arg_int {
  int dummy;
};

/* Variables and functions */
struct arg_int *arg_intn(char const *, char const *, char const *,
                         int /*<<< orphan*/, int, char const *);
struct arg_int *arg_int0(const char *shortopts, const char *longopts,
                         const char *datatype, const char *glossary) {
  return arg_intn(shortopts, longopts, datatype, 0, 1, glossary);
}


x86 assembly (clang, -O0):
<arg_int0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%r9
xor    %ecx,%ecx
mov    $0x1,%r8d
call   1030 <arg_intn@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<arg_int0>:
mov    %rcx,%r9
xor    %ecx,%ecx
mov    $0x1,%r8d
jmp    1030 <arg_intn@plt>

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

LLVM IR (-O2):
%struct.arg_int = type { i32 }
define %struct.arg_int* @arg_int0(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = tail call %struct.arg_int* @arg_intn(i8* %0, i8* %1, i8* %2, i32 0, i32 1, i8* %3)
ret %struct.arg_int* %5
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isgraph(int);
void t_isgraph_0xbe() {
  Assert_real((isgraph(190) == 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",
              955, ("isgraph should be 0 for 0xbe"));
}


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

x86 assembly (clang, -O2):
<t_isgraph_0xbe>:
push   %rax
mov    $0xbe,%edi
call   1040 <isgraph@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x3bb,%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 0xbe\00"
define void @t_isgraph_0xbe() {
%1 = call i64 @isgraph(i32 190)
%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 955, 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 0xbe\00"
define void @t_isgraph_0xbe() {
%1 = tail call i64 @isgraph(i32 190)
%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 955, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int main() {
  printf("%d\n", 5 * 2 + 3);
  const char *state = "hahaha";
  do {
    printf("%s\n", state);
    int state = 1;
    if (state > 0) {
      printf("log(%d): %s\n", state, state);
    }
  } while (0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
mov    $0xd,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecb(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xecc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jle    1174 <main+0x64>
mov    -0x14(%rbp),%esi
mov    -0x14(%rbp),%edx
lea    0xe9e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1179 <main+0x69>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
mov    $0xd,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xec9(%rip),%rdi
call   1030 <puts@plt>
lea    0xec4(%rip),%rdi
mov    $0x1,%esi
mov    $0x1,%edx
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [7 x i8] c"hahaha\00"
@.str.3 = [13 x i8] c"log(%d): %s\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 13)
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i32 1, i32 1)
ret i32 0
}
__attribute__((always_)) void outb(unsigned char value, int port) {
  asm volatile("out"
               "b"
               " %"
               "b"
               "0, %w1"
               :
               : "a"(value), "Nd"(port));
}


x86 assembly (clang, -O0):
<outb>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x1(%rbp),%al
mov    -0x8(%rbp),%edx
out    %al,(%dx)
pop    %rbp
ret

x86 assembly (clang, -O2):
<outb>:
mov    %esi,%edx
mov    %edi,%eax
out    %al,(%dx)
ret

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

LLVM IR (-O2):
define void @outb(i8 zeroext %0, i32 %1) {
tail call void asm sideeffect "outb ${0:b}, ${1:w}", "{ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i8 %0, i32 %1)
ret void
}
int ft_str_is_uppercase(char *str) {
  int it;
  it = 0;
  while (str[it]) {
    if (str[it] < 'A' || str[it] > 'Z')
      return (0);
    it++;
  }
  return (1);
}


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

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

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

LLVM IR (-O2):
define i32 @ft_str_is_uppercase(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %8
4: ; preds = %8
%5 = getelementptr inbounds i8, i8* %0, i64 %13
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
br i1 %7, label %14, label %8
8: ; preds = %1, %4
%9 = phi i64 [ %13, %4 ], [ 0, %1 ]
%10 = phi i8 [ %6, %4 ], [ %2, %1 ]
%11 = add i8 %10, -91
%12 = icmp ult i8 %11, -26
%13 = add nuw i64 %9, 1
br i1 %12, label %14, label %4
14: ; preds = %8, %4, %1
%15 = phi i32 [ 1, %1 ], [ 1, %4 ], [ 0, %8 ]
ret i32 %15
}
int nearest_odd(int x) {
  if (x % 2 == 0)
    return x + 1;
  else
    return x;
}


x86 assembly (clang, -O0):
<nearest_odd>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1129 <nearest_odd+0x29>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    112f <nearest_odd+0x2f>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nearest_odd>:
mov    %edi,%eax
not    %eax
and    $0x1,%eax
add    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @nearest_odd(i32 %0) {
%2 = and i32 %0, 1
%3 = xor i32 %2, 1
%4 = add nsw i32 %3, %0
ret i32 %4
}
int test_imm_6Fuint64_midword_mem(unsigned long long *val) {
  return ((*val >> 16) & (0x6F << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_6Fuint64_midword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
shr    $0x10,%rdx
and    $0x6f,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_6Fuint64_midword_mem>:
testb  $0x6f,0x2(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_6Fuint64_midword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = lshr i64 %4, 16
%6 = and i64 %5, 111
%7 = icmp ne i64 %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_6Fuint64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 7274496
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
char *emalloc(int);
char *char_toString(char x) {
  char *s = emalloc(2);
  s[0] = x;
  s[1] = '\0';
  return s;
}


x86 assembly (clang, -O0):
<char_toString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x2,%edi
call   1030 <emalloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x1(%rbp),%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
movb   $0x0,0x1(%rax)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<char_toString>:
push   %rbx
mov    %edi,%ebx
mov    $0x2,%edi
call   1030 <emalloc@plt>
mov    %bl,(%rax)
movb   $0x0,0x1(%rax)
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @char_toString(i8 signext %0) {
%2 = tail call i8* @emalloc(i32 2)
store i8 %0, i8* %2
%3 = getelementptr inbounds i8, i8* %2, i64 1
store i8 0, i8* %3
ret i8* %2
}
void test1(int x) {
  char p[40];
  int i;
  for (i = 0; i < 40; i++)
    p[i] = x;
}


x86 assembly (clang, -O0):
<test1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x34(%rbp)
cmpl   $0x28,-0x34(%rbp)
jge    1133 <test1+0x33>
mov    -0x4(%rbp),%eax
mov    %al,%cl
movslq -0x34(%rbp),%rax
mov    %cl,-0x30(%rbp,%rax,1)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    110e <test1+0xe>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @test1(i32 %0) {
ret void
}
int pldummy_tkwin() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @pldummy_tkwin() {
ret i32 0
}
void handle_IO(sig) int sig;
{}


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

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

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

LLVM IR (-O2):
define void @handle_IO(i32 %0) {
ret void
}
/* Variables and functions */
scalar_t__ malloc(int);
void *osc_note_on() {
  double *res = (double *)malloc(sizeof(double));
  *res = 0.0;
  return (void *)res;
}


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

x86 assembly (clang, -O2):
<osc_note_on>:
push   %rax
mov    $0x8,%edi
call   1030 <malloc@plt>
movq   $0x0,(%rax)
pop    %rcx
ret

LLVM IR (-O0):
define i8* @osc_note_on() {
%1 = alloca double*
%2 = call i64 @malloc(i32 8)
%3 = inttoptr i64 %2 to double*
store double* %3, double** %1
%4 = load double*, double** %1
store double 0.000000e+00, double* %4
%5 = load double*, double** %1
%6 = bitcast double* %5 to i8*
ret i8* %6
}

LLVM IR (-O2):
define i8* @osc_note_on() {
%1 = tail call i64 @malloc(i32 8)
%2 = inttoptr i64 %1 to double*
store double 0.000000e+00, double* %2
%3 = inttoptr i64 %1 to i8*
ret i8* %3
}