xunge/DecIR huggingface dataset:
int f5(unsigned int a) {
  int v1 = (a <= 31);
  int v2 = (a >= 64 && a <= 95);
  return v1 || v2;
}


x86 assembly (clang, -O0):
<f5>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x1f,-0x4(%rbp)
setbe  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x8(%rbp)
xor    %eax,%eax
cmpl   $0x40,-0x4(%rbp)
mov    %al,-0xd(%rbp)
jb     112f <f5+0x2f>
cmpl   $0x5f,-0x4(%rbp)
setbe  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0xc(%rbp)
mov    $0x1,%al
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0xe(%rbp)
jne    1153 <f5+0x53>
cmpl   $0x0,-0xc(%rbp)
setne  %al
mov    %al,-0xe(%rbp)
mov    -0xe(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f5>:
cmp    $0x20,%edi
setb   %al
and    $0xffffffe0,%edi
cmp    $0x40,%edi
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @f5(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = icmp ule i32 %5, 31
%7 = zext i1 %6 to i32
store i32 %7, i32* %3
%8 = load i32, i32* %2
%9 = icmp uge i32 %8, 64
br i1 %9, label %10, label %13
10: ; preds = %1
%11 = load i32, i32* %2
%12 = icmp ule i32 %11, 95
br label %13
13: ; preds = %10, %1
%14 = phi i1 [ false, %1 ], [ %12, %10 ]
%15 = zext i1 %14 to i32
store i32 %15, i32* %4
%16 = load i32, i32* %3
%17 = icmp ne i32 %16, 0
br i1 %17, label %21, label %18
18: ; preds = %13
%19 = load i32, i32* %4
%20 = icmp ne i32 %19, 0
br label %21
21: ; preds = %18, %13
%22 = phi i1 [ true, %13 ], [ %20, %18 ]
%23 = zext i1 %22 to i32
ret i32 %23
}

LLVM IR (-O2):
define i32 @f5(i32 %0) {
%2 = icmp ult i32 %0, 32
%3 = and i32 %0, -32
%4 = icmp eq i32 %3, 64
%5 = or i1 %2, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
__attribute__((always_)) void
debug_object_deactivate(void *addr, struct debug_obj_descr *descr) {}


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

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

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

LLVM IR (-O2):
%struct.debug_obj_descr = type opaque
define void @debug_object_deactivate(i8* nocapture %0, %struct.debug_obj_descr* nocapture %1) {
ret void
}
/* Type definitions */
struct ArrowSchema {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ release_nested_internal(struct ArrowSchema *, int);
void release_nested_dynamic(struct ArrowSchema *schema) {
  release_nested_internal(schema, 1);
}


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

x86 assembly (clang, -O2):
<release_nested_dynamic>:
mov    $0x1,%esi
jmp    1030 <release_nested_internal@plt>

LLVM IR (-O0):
%struct.ArrowSchema = type { i32 }
define void @release_nested_dynamic(%struct.ArrowSchema* %0) {
%2 = alloca %struct.ArrowSchema*
store %struct.ArrowSchema* %0, %struct.ArrowSchema** %2
%3 = load %struct.ArrowSchema*, %struct.ArrowSchema** %2
%4 = call i32 @release_nested_internal(%struct.ArrowSchema* %3, i32 1)
ret void
}

LLVM IR (-O2):
%struct.ArrowSchema = type { i32 }
define void @release_nested_dynamic(%struct.ArrowSchema* %0) {
%2 = tail call i32 @release_nested_internal(%struct.ArrowSchema* %0, i32 1)
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int FindAdressByte(uint32_t address) {
  int a, result, resultAux;
  a = address;
  resultAux = (a % 4);
  return resultAux;
}


x86 assembly (clang, -O0):
<FindAdressByte>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<FindAdressByte>:
mov    %edi,%eax
lea    0x3(%rax),%ecx
test   %edi,%edi
cmovns %edi,%ecx
and    $0xfffffffc,%ecx
sub    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @FindAdressByte(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %2
%6 = load i32, i32* %2
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = srem i32 %7, 4
store i32 %8, i32* %5
%9 = load i32, i32* %5
ret i32 %9
}

LLVM IR (-O2):
define i32 @FindAdressByte(i32 %0) {
%2 = srem i32 %0, 4
ret i32 %2
}
/* Type definitions */
struct tipc_msg {
  int dummy;
};

/* Variables and functions */
int msg_bits(struct tipc_msg *, int /*<<< orphan*/, int, int);
int msg_is_keepalive(struct tipc_msg *m) { return msg_bits(m, 0, 19, 1); }


x86 assembly (clang, -O0):
<msg_is_keepalive>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x13,%edx
mov    $0x1,%ecx
call   1030 <msg_bits@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<msg_is_keepalive>:
xor    %esi,%esi
mov    $0x13,%edx
mov    $0x1,%ecx
jmp    1030 <msg_bits@plt>

LLVM IR (-O0):
%struct.tipc_msg = type { i32 }
define i32 @msg_is_keepalive(%struct.tipc_msg* %0) {
%2 = alloca %struct.tipc_msg*
store %struct.tipc_msg* %0, %struct.tipc_msg** %2
%3 = load %struct.tipc_msg*, %struct.tipc_msg** %2
%4 = call i32 @msg_bits(%struct.tipc_msg* %3, i32 0, i32 19, i32 1)
ret i32 %4
}

LLVM IR (-O2):
%struct.tipc_msg = type { i32 }
define i32 @msg_is_keepalive(%struct.tipc_msg* %0) {
%2 = tail call i32 @msg_bits(%struct.tipc_msg* %0, i32 0, i32 19, i32 1)
ret i32 %2
}
void *get_addr_so_lib_f(name)
char *name;
{ return 0; }


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

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

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

LLVM IR (-O2):
define noalias i8* @get_addr_so_lib_f(i8* nocapture readnone %0) {
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void print_usage() {
  puts("Usage: pica-node [-f config-file]\n\nOptions:\n	-f 	configuration "
       "file\n	-h	show this text\n	-v	verbose\n	"
       "-V	print version info\n");
}


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

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

LLVM IR (-O0):
@.str = [123 x i8] c"Usage: pica-node [-f config-file]\0A\0AOptions:\0A\09-f \09configuration file\0A\09-h\09show this text\0A\09-v\09verbose\0A\09-V\09print version info\0A\00"
define void @print_usage() {
%1 = call i32 @puts(i8* getelementptr inbounds ([123 x i8], [123 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [123 x i8] c"Usage: pica-node [-f config-file]\0A\0AOptions:\0A\09-f \09configuration file\0A\09-h\09show this text\0A\09-v\09verbose\0A\09-V\09print version info\0A\00"
define void @print_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([123 x i8], [123 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ outp(int, int);
void PIC_init(void) {
  outp(0x020, 0x11);
  outp(0x021, 0x040);
  outp(0x021, 0x04);
  outp(0x021, 0x01);
  outp(0x021, 0xFF);
  outp(0x0A0, 0x11);
  outp(0x0A1, 0x070);
  outp(0x0A1, 0x02);
  outp(0x0A1, 0x01);
  outp(0x0A1, 0xFF);
}


x86 assembly (clang, -O0):
<PIC_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x20,%edi
mov    $0x11,%esi
call   1030 <outp@plt>
mov    $0x21,%edi
mov    $0x40,%esi
call   1030 <outp@plt>
mov    $0x21,%edi
mov    $0x4,%esi
call   1030 <outp@plt>
mov    $0x21,%edi
mov    $0x1,%esi
call   1030 <outp@plt>
mov    $0x21,%edi
mov    $0xff,%esi
call   1030 <outp@plt>
mov    $0xa0,%edi
mov    $0x11,%esi
call   1030 <outp@plt>
mov    $0xa1,%edi
mov    $0x70,%esi
call   1030 <outp@plt>
mov    $0xa1,%edi
mov    $0x2,%esi
call   1030 <outp@plt>
mov    $0xa1,%edi
mov    $0x1,%esi
call   1030 <outp@plt>
mov    $0xa1,%edi
mov    $0xff,%esi
call   1030 <outp@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<PIC_init>:
push   %rax
mov    $0x20,%edi
mov    $0x11,%esi
call   1030 <outp@plt>
mov    $0x21,%edi
mov    $0x40,%esi
call   1030 <outp@plt>
mov    $0x21,%edi
mov    $0x4,%esi
call   1030 <outp@plt>
mov    $0x21,%edi
mov    $0x1,%esi
call   1030 <outp@plt>
mov    $0x21,%edi
mov    $0xff,%esi
call   1030 <outp@plt>
mov    $0xa0,%edi
mov    $0x11,%esi
call   1030 <outp@plt>
mov    $0xa1,%edi
mov    $0x70,%esi
call   1030 <outp@plt>
mov    $0xa1,%edi
mov    $0x2,%esi
call   1030 <outp@plt>
mov    $0xa1,%edi
mov    $0x1,%esi
call   1030 <outp@plt>
mov    $0xa1,%edi
mov    $0xff,%esi
pop    %rax
jmp    1030 <outp@plt>

LLVM IR (-O0):
define void @PIC_init() {
%1 = call i32 @outp(i32 32, i32 17)
%2 = call i32 @outp(i32 33, i32 64)
%3 = call i32 @outp(i32 33, i32 4)
%4 = call i32 @outp(i32 33, i32 1)
%5 = call i32 @outp(i32 33, i32 255)
%6 = call i32 @outp(i32 160, i32 17)
%7 = call i32 @outp(i32 161, i32 112)
%8 = call i32 @outp(i32 161, i32 2)
%9 = call i32 @outp(i32 161, i32 1)
%10 = call i32 @outp(i32 161, i32 255)
ret void
}

LLVM IR (-O2):
define void @PIC_init() {
%1 = tail call i32 @outp(i32 32, i32 17)
%2 = tail call i32 @outp(i32 33, i32 64)
%3 = tail call i32 @outp(i32 33, i32 4)
%4 = tail call i32 @outp(i32 33, i32 1)
%5 = tail call i32 @outp(i32 33, i32 255)
%6 = tail call i32 @outp(i32 160, i32 17)
%7 = tail call i32 @outp(i32 161, i32 112)
%8 = tail call i32 @outp(i32 161, i32 2)
%9 = tail call i32 @outp(i32 161, i32 1)
%10 = tail call i32 @outp(i32 161, i32 255)
ret void
}
void yy_1_ExternalLinkTransient(char *yytext, int yyleng) {
  ;
  ;
}


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

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

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

LLVM IR (-O2):
define void @yy_1_ExternalLinkTransient(i8* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
void *realloc(void *, size_t);
void *xrealloc(void *p, size_t size) {
  p = realloc(p, size);
  if (p == NULL) {
    perror("realloc() failed");
    exit(1);
  }
  return p;
}


x86 assembly (clang, -O0):
<xrealloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <realloc@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1172 <xrealloc+0x42>
lea    0xe9d(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [17 x i8] c"realloc() failed\00"
define noalias i8* @xrealloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = tail call i32 @perror(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %2
ret i8* %3
}
int main(void) {
  int ten = 10, twenty = 20, thirty = 30;
  return (ten <= twenty) + (twenty <= twenty) + (thirty <= twenty);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
movl   $0x14,-0xc(%rbp)
movl   $0x1e,-0x10(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
setle  %al
and    $0x1,%al
movzbl %al,%eax
mov    -0xc(%rbp),%ecx
cmp    -0xc(%rbp),%ecx
setle  %cl
and    $0x1,%cl
movzbl %cl,%ecx
add    %ecx,%eax
mov    -0x10(%rbp),%ecx
cmp    -0xc(%rbp),%ecx
setle  %cl
and    $0x1,%cl
movzbl %cl,%ecx
add    %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 10, i32* %2
store i32 20, i32* %3
store i32 30, i32* %4
%5 = load i32, i32* %2
%6 = load i32, i32* %3
%7 = icmp sle i32 %5, %6
%8 = zext i1 %7 to i32
%9 = load i32, i32* %3
%10 = load i32, i32* %3
%11 = icmp sle i32 %9, %10
%12 = zext i1 %11 to i32
%13 = add nsw i32 %8, %12
%14 = load i32, i32* %4
%15 = load i32, i32* %3
%16 = icmp sle i32 %14, %15
%17 = zext i1 %16 to i32
%18 = add nsw i32 %13, %17
ret i32 %18
}

LLVM IR (-O2):
define i32 @main() {
ret i32 2
}
/* Variables and functions */
int _toascii(int);
int toascii(int c) { return _toascii(c); }


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

x86 assembly (clang, -O2):
<toascii>:
jmp    1030 <_toascii@plt>

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

LLVM IR (-O2):
define i32 @toascii(i32 %0) {
%2 = tail call i32 @_toascii(i32 %0)
ret i32 %2
}
int MAX(int x, int y) { return (((x) > (y)) ? (x) : (y)); }


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

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

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

LLVM IR (-O2):
define i32 @MAX(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
void circle(double radius, double *area, double *circumference) {
  *area = 3.1415926536 * radius * radius;
  *circumference = 2 * 3.1415926536 * radius;
}


x86 assembly (clang, -O0):
<circle>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movsd  0xeef(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  0xecd(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<circle>:
movsd  0xef8(%rip),%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%rdi)
mulsd  0xeec(%rip),%xmm0
movsd  %xmm0,(%rsi)
ret

LLVM IR (-O0):
define void @circle(double %0, double* %1, double* %2) {
%4 = alloca double
%5 = alloca double*
%6 = alloca double*
store double %0, double* %4
store double* %1, double** %5
store double* %2, double** %6
%7 = load double, double* %4
%8 = fmul double 0x400921FB544486E0, %7
%9 = load double, double* %4
%10 = fmul double %8, %9
%11 = load double*, double** %5
store double %10, double* %11
%12 = load double, double* %4
%13 = fmul double 0x401921FB544486E0, %12
%14 = load double*, double** %6
store double %13, double* %14
ret void
}

LLVM IR (-O2):
define void @circle(double %0, double* nocapture writeonly %1, double* nocapture writeonly %2) {
%4 = fmul double %0, 0x400921FB544486E0
%5 = fmul double %4, %0
store double %5, double* %1
%6 = fmul double %0, 0x401921FB544486E0
store double %6, double* %2
ret void
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *, int /*<<< orphan*/);
int write_multprec_target_system(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(492, a, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<write_multprec_target_system>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x1ec,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_multprec_target_system>:
mov    $0x1ec,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc@plt>

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

LLVM IR (-O2):
define i32 @write_multprec_target_system() {
%1 = tail call i32 @_ada_use_c2phc(i32 492, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
int comp(const void *fst, const void *snd) {
  int *i = (int *)fst, *j = (int *)snd;
  if (*i > *j)
    return 1;
  if (*i < *j)
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<comp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%eax
mov    -0x28(%rbp),%rcx
cmp    (%rcx),%eax
jle    113a <comp+0x3a>
movl   $0x1,-0x4(%rbp)
jmp    115f <comp+0x5f>
mov    -0x20(%rbp),%rax
mov    (%rax),%eax
mov    -0x28(%rbp),%rcx
cmp    (%rcx),%eax
jge    1158 <comp+0x58>
movl   $0xffffffff,-0x4(%rbp)
jmp    115f <comp+0x5f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<comp>:
mov    (%rdi),%eax
mov    (%rsi),%ecx
xor    %edx,%edx
cmp    %ecx,%eax
setl   %dl
neg    %edx
cmp    %ecx,%eax
mov    $0x1,%eax
cmovle %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @comp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = bitcast i8* %1 to i32*
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = icmp sgt i32 %5, %6
%8 = icmp slt i32 %5, %6
%9 = sext i1 %8 to i32
%10 = select i1 %7, i32 1, i32 %9
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ error_issue(int, char *, char const *);
void error_fatal(const char *message) { error_issue(1, "FATAL", message); }


x86 assembly (clang, -O0):
<error_fatal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
mov    $0x1,%edi
lea    0xed4(%rip),%rsi
call   1030 <error_issue@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<error_fatal>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rsi
mov    $0x1,%edi
jmp    1030 <error_issue@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"FATAL\00"
define void @error_fatal(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @error_issue(i32 1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"FATAL\00"
define void @error_fatal(i8* %0) {
%2 = tail call i32 @error_issue(i32 1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
bool nrf52_errata_225(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf52_errata_225() {
ret i32 0
}
/* Variables and functions */
int round_up_binary(size_t);
int size_to_page_number(size_t);
size_t internal_size(size_t size) {
  size += (sizeof(size_t));
  if (size >= (1 << 12))
    return size_to_page_number(size) * (1 << 12);
  if (size < (1 << 5))
    size = (1 << 5);
  size = 1 << round_up_binary(size);
  return size;
}


x86 assembly (clang, -O0):
<internal_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
cmpq   $0x1000,-0x10(%rbp)
jb     115d <internal_size+0x3d>
mov    -0x10(%rbp),%rdi
call   1040 <size_to_page_number@plt>
shl    $0xc,%eax
cltq
mov    %rax,-0x8(%rbp)
jmp    1190 <internal_size+0x70>
cmpq   $0x20,-0x10(%rbp)
jae    1170 <internal_size+0x50>
movq   $0x20,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <round_up_binary@plt>
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
cltq
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<internal_size>:
push   %rax
add    $0x8,%rdi
cmp    $0x1000,%rdi
jb     1138 <internal_size+0x18>
call   1040 <size_to_page_number@plt>
shl    $0xc,%eax
jmp    1156 <internal_size+0x36>
cmp    $0x21,%rdi
mov    $0x20,%eax
cmovae %rdi,%rax
mov    %rax,%rdi
call   1030 <round_up_binary@plt>
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
cltq
pop    %rcx
ret

LLVM IR (-O0):
define i64 @internal_size(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i64, i64* %3
%5 = add i64 %4, 8
store i64 %5, i64* %3
%6 = load i64, i64* %3
%7 = icmp uge i64 %6, 4096
br i1 %7, label %8, label %13
8: ; preds = %1
%9 = load i64, i64* %3
%10 = call i32 @size_to_page_number(i64 %9)
%11 = mul nsw i32 %10, 4096
%12 = sext i32 %11 to i64
store i64 %12, i64* %2
br label %23
13: ; preds = %1
%14 = load i64, i64* %3
%15 = icmp ult i64 %14, 32
br i1 %15, label %16, label %17
16: ; preds = %13
store i64 32, i64* %3
br label %17
17: ; preds = %16, %13
%18 = load i64, i64* %3
%19 = call i32 @round_up_binary(i64 %18)
%20 = shl i32 1, %19
%21 = sext i32 %20 to i64
store i64 %21, i64* %3
%22 = load i64, i64* %3
store i64 %22, i64* %2
br label %23
23: ; preds = %17, %8
%24 = load i64, i64* %2
ret i64 %24
}

LLVM IR (-O2):
define i64 @internal_size(i64 %0) {
%2 = add i64 %0, 8
%3 = icmp ugt i64 %2, 4095
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 @size_to_page_number(i64 %2)
%6 = shl nsw i32 %5, 12
br label %12
7: ; preds = %1
%8 = icmp ugt i64 %2, 32
%9 = select i1 %8, i64 %2, i64 32
%10 = tail call i32 @round_up_binary(i64 %9)
%11 = shl nuw i32 1, %10
br label %12
12: ; preds = %7, %4
%13 = phi i32 [ %6, %4 ], [ %11, %7 ]
%14 = sext i32 %13 to i64
ret i64 %14
}
void ar_cnt_set(int my_cid, int cnt, int val) {}


x86 assembly (clang, -O0):
<ar_cnt_set>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @ar_cnt_set(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
ret void
}

LLVM IR (-O2):
define void @ar_cnt_set(i32 %0, i32 %1, i32 %2) {
ret void
}
void addvv(double *result, const double *s1, const double *s2) {
  result[0] = s1[0] + s2[0];
  result[1] = s1[1] + s2[1];
  result[2] = s1[2] + s2[2];
}


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

x86 assembly (clang, -O2):
<addvv>:
movsd  (%rsi),%xmm0
addsd  (%rdx),%xmm0
movsd  %xmm0,(%rdi)
movsd  0x8(%rsi),%xmm0
addsd  0x8(%rdx),%xmm0
movsd  %xmm0,0x8(%rdi)
movsd  0x10(%rsi),%xmm0
addsd  0x10(%rdx),%xmm0
movsd  %xmm0,0x10(%rdi)
ret

LLVM IR (-O0):
define void @addvv(double* %0, double* %1, double* %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca double*
store double* %0, double** %4
store double* %1, double** %5
store double* %2, double** %6
%7 = load double*, double** %5
%8 = getelementptr inbounds double, double* %7, i64 0
%9 = load double, double* %8
%10 = load double*, double** %6
%11 = getelementptr inbounds double, double* %10, i64 0
%12 = load double, double* %11
%13 = fadd double %9, %12
%14 = load double*, double** %4
%15 = getelementptr inbounds double, double* %14, i64 0
store double %13, double* %15
%16 = load double*, double** %5
%17 = getelementptr inbounds double, double* %16, i64 1
%18 = load double, double* %17
%19 = load double*, double** %6
%20 = getelementptr inbounds double, double* %19, i64 1
%21 = load double, double* %20
%22 = fadd double %18, %21
%23 = load double*, double** %4
%24 = getelementptr inbounds double, double* %23, i64 1
store double %22, double* %24
%25 = load double*, double** %5
%26 = getelementptr inbounds double, double* %25, i64 2
%27 = load double, double* %26
%28 = load double*, double** %6
%29 = getelementptr inbounds double, double* %28, i64 2
%30 = load double, double* %29
%31 = fadd double %27, %30
%32 = load double*, double** %4
%33 = getelementptr inbounds double, double* %32, i64 2
store double %31, double* %33
ret void
}

LLVM IR (-O2):
define void @addvv(double* nocapture writeonly %0, double* nocapture %1, double* nocapture %2) {
%4 = load double, double* %1
%5 = load double, double* %2
%6 = fadd double %4, %5
store double %6, double* %0
%7 = getelementptr inbounds double, double* %1, i64 1
%8 = load double, double* %7
%9 = getelementptr inbounds double, double* %2, i64 1
%10 = load double, double* %9
%11 = fadd double %8, %10
%12 = getelementptr inbounds double, double* %0, i64 1
store double %11, double* %12
%13 = getelementptr inbounds double, double* %1, i64 2
%14 = load double, double* %13
%15 = getelementptr inbounds double, double* %2, i64 2
%16 = load double, double* %15
%17 = fadd double %14, %16
%18 = getelementptr inbounds double, double* %0, i64 2
store double %17, double* %18
ret void
}
/* Variables and functions */
scalar_t__ dump_path(char *);
int main(int argc, char **argv) {
  if (dump_path("/sys") < 0)
    return 1;
  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)
lea    0xed3(%rip),%rdi
call   1030 <dump_path@plt>
cmp    $0x0,%rax
jge    1148 <main+0x38>
movl   $0x1,-0x4(%rbp)
jmp    114f <main+0x3f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <dump_path@plt>
shr    $0x3f,%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"/sys\00"
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 = call i64 @dump_path(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%7 = icmp slt i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %2
store i32 1, i32* %3
br label %10
9: ; preds = %2
store i32 0, i32* %3
br label %10
10: ; preds = %9, %8
%11 = load i32, i32* %3
ret i32 %11
}

LLVM IR (-O2):
@.str = [5 x i8] c"/sys\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 @dump_path(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%4 = lshr i64 %3, 63
%5 = trunc i64 %4 to i32
ret i32 %5
}
void XkbCopyKeyTypes() {}


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

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

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

LLVM IR (-O2):
define void @XkbCopyKeyTypes() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ errno;
scalar_t__ getcwd(char *, int);
int /*<<< orphan*/ runes_die(char *, int /*<<< orphan*/);
char *strdup(char *);
int /*<<< orphan*/ strerror(int /*<<< orphan*/);
char *runes_getcwd(void) {
  char buf[4096];
  if (getcwd(buf, 4096)) {
    return strdup(buf);
  } else {
    runes_die("getcwd: %s", strerror(errno));
    return NULL;
  }
}


x86 assembly (clang, -O0):
<runes_getcwd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1010,%rsp
lea    -0x1010(%rbp),%rdi
mov    $0x1000,%esi
call   1040 <getcwd@plt>
cmp    $0x0,%rax
je     117b <runes_getcwd+0x3b>
lea    -0x1010(%rbp),%rdi
call   1050 <strdup@plt>
mov    %rax,-0x8(%rbp)
jmp    119f <runes_getcwd+0x5f>
mov    0x2e5e(%rip),%rax
mov    (%rax),%edi
call   1060 <strerror@plt>
mov    %eax,%esi
lea    0xe6e(%rip),%rdi
call   1030 <runes_die@plt>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1010,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<runes_getcwd>:
sub    $0x1008,%rsp
mov    %rsp,%rdi
mov    $0x1000,%esi
call   1040 <getcwd@plt>
test   %rax,%rax
je     1169 <runes_getcwd+0x29>
mov    %rsp,%rdi
call   1050 <strdup@plt>
add    $0x1008,%rsp
ret
mov    0x2e70(%rip),%rax
mov    (%rax),%edi
call   1060 <strerror@plt>
lea    0xe82(%rip),%rdi
mov    %eax,%esi
call   1030 <runes_die@plt>
xor    %eax,%eax
add    $0x1008,%rsp
ret

LLVM IR (-O0):
@.str = [11 x i8] c"getcwd: %s\00"
@errno = global i32 0
define i8* @runes_getcwd() {
%1 = alloca i8*
%2 = alloca [4096 x i8]
%3 = getelementptr inbounds [4096 x i8], [4096 x i8]* %2, i64 0, i64 0
%4 = call i64 @getcwd(i8* %3, i32 4096)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = getelementptr inbounds [4096 x i8], [4096 x i8]* %2, i64 0, i64 0
%8 = call i8* @strdup(i8* %7)
store i8* %8, i8** %1
br label %13
9: ; preds = %0
%10 = load i32, i32* @errno
%11 = call i32 @strerror(i32 %10)
%12 = call i32 @runes_die(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %11)
store i8* null, i8** %1
br label %13
13: ; preds = %9, %6
%14 = load i8*, i8** %1
ret i8* %14
}

LLVM IR (-O2):
@.str = [11 x i8] c"getcwd: %s\00"
@errno = global i32 0
define noalias i8* @runes_getcwd() {
%1 = alloca [4096 x i8]
%2 = getelementptr inbounds [4096 x i8], [4096 x i8]* %1, i64 0, i64 0
%3 = call i64 @getcwd(i8* %2, i32 4096)
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %0
%6 = call i8* @strdup(i8* %2)
br label %11
7: ; preds = %0
%8 = load i32, i32* @errno
%9 = call i32 @strerror(i32 %8)
%10 = call i32 @runes_die(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %9)
br label %11
11: ; preds = %7, %5
%12 = phi i8* [ %6, %5 ], [ null, %7 ]
ret i8* %12
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int i, t[4] = {1, 2, 4, 8};
  for (i = 0; i < 2; i++)
    t[i] = t[3 - i];
  printf("%d", t[2]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeda(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xed7(%rip),%rax
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    116a <main+0x5a>
mov    $0x3,%eax
sub    -0x8(%rbp),%eax
cltq
mov    -0x20(%rbp,%rax,4),%ecx
movslq -0x8(%rbp),%rax
mov    %ecx,-0x20(%rbp,%rax,4)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    113c <main+0x2c>
mov    -0x18(%rbp),%esi
lea    0xe9c(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 4)
ret i32 0
}
unsigned ulog2(unsigned n) {
  unsigned i = 0;
  while (1) {
    if ((1 << i) > n)
      return i;
    ++i;
  }
}


x86 assembly (clang, -O0):
<ulog2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
cmp    -0x4(%rbp),%eax
jbe    1126 <ulog2+0x26>
mov    -0x8(%rbp),%eax
pop    %rbp
ret
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <ulog2+0xe>

x86 assembly (clang, -O2):
<ulog2>:
mov    $0xffffffff,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%ecx
mov    %edi,%eax
shr    %cl,%eax
test   %eax,%eax
jne    1110 <ulog2+0x10>
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @ulog2(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ 0, %1 ], [ %6, %2 ]
%4 = lshr i32 %0, %3
%5 = icmp eq i32 %4, 0
%6 = add i32 %3, 1
br i1 %5, label %7, label %2
7: ; preds = %2
ret i32 %3
}
unsigned int count_nbr(long n) {
  unsigned int count;
  unsigned int i;
  count = 1;
  i = 0;
  if (n < 0) {
    n *= -1;
    i++;
  }
  while (n / 10 > 0) {
    n /= 10;
    count++;
  }
  if (i > 0)
    return (count + 1);
  return (count);
}


x86 assembly (clang, -O0):
<count_nbr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jge    1133 <count_nbr+0x33>
imul   $0xffffffffffffffff,-0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1138 <count_nbr+0x38>
mov    -0x10(%rbp),%rax
mov    $0xa,%ecx
cqto
idiv   %rcx
cmp    $0x0,%rax
jle    1170 <count_nbr+0x70>
mov    -0x10(%rbp),%rax
mov    $0xa,%ecx
cqto
idiv   %rcx
mov    %rax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1138 <count_nbr+0x38>
cmpl   $0x0,-0x18(%rbp)
jbe    1188 <count_nbr+0x88>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    118e <count_nbr+0x8e>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<count_nbr>:
mov    %rdi,%r8
mov    %rdi,%rcx
neg    %rcx
cmovs  %rdi,%rcx
mov    $0x1,%esi
cmp    $0xa,%rcx
jb     1146 <count_nbr+0x46>
mov    $0x1,%esi
movabs $0xcccccccccccccccd,%rdi
cc cc cc
nopw   0x0(%rax,%rax,1)
mov    %rcx,%rax
mul    %rdi
shr    $0x3,%rdx
add    $0x1,%esi
cmp    $0x63,%rcx
mov    %rdx,%rcx
ja     1130 <count_nbr+0x30>
shr    $0x3f,%r8
add    %esi,%r8d
mov    %r8d,%eax
ret

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

LLVM IR (-O2):
define i32 @count_nbr(i64 %0) {
%2 = tail call i64 @llvm.abs.i64(i64 %0, i1 true)
%3 = icmp ugt i64 %2, 9
br i1 %3, label %4, label %10
4: ; preds = %1, %4
%5 = phi i32 [ %8, %4 ], [ 1, %1 ]
%6 = phi i64 [ %7, %4 ], [ %2, %1 ]
%7 = udiv i64 %6, 10
%8 = add i32 %5, 1
%9 = icmp ugt i64 %6, 99
br i1 %9, label %4, label %10
10: ; preds = %4, %1
%11 = phi i32 [ 1, %1 ], [ %8, %4 ]
%12 = lshr i64 %0, 63
%13 = trunc i64 %12 to i32
%14 = add i32 %11, %13
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ cpu_set_edx();
int /*<<< orphan*/ softresetx86();
void port_92_pulse(void *priv) {
  softresetx86();
  cpu_set_edx();
}


x86 assembly (clang, -O0):
<port_92_pulse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1040 <softresetx86@plt>
mov    $0x0,%al
call   1030 <cpu_set_edx@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @port_92_pulse(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @softresetx86()
%4 = call i32 (...) @cpu_set_edx()
ret void
}

LLVM IR (-O2):
define void @port_92_pulse(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @softresetx86()
%3 = tail call i32 (...) @cpu_set_edx()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int8_t;

/* Variables and functions */
int nru(int8_t **page_table, int num_pages, int prev_page, int fifo_frm,
        int num_frames, int clock) {
  return -1;
}


x86 assembly (clang, -O0):
<nru>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    %r9d,-0x1c(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @nru(i32** nocapture readnone %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
ret i32 -1
}
/* Variables and functions */
scalar_t__ strcmp(char *, char *);
int IsLastNameIdentical(char *firstName, char *secondName) {
  return strcmp(firstName, secondName) == 0;
}


x86 assembly (clang, -O0):
<IsLastNameIdentical>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @IsLastNameIdentical(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i64 @strcmp(i8* %5, i8* %6)
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @IsLastNameIdentical(i8* %0, i8* %1) {
%3 = tail call i64 @strcmp(i8* %0, i8* %1)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ Menus_CloseByName(char *);
void CG_HideTeamMenu(void) {
  Menus_CloseByName("teamMenu");
  Menus_CloseByName("getMenu");
}


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

x86 assembly (clang, -O2):
<CG_HideTeamMenu>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <Menus_CloseByName@plt>
lea    0xee5(%rip),%rdi
pop    %rax
jmp    1030 <Menus_CloseByName@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"teamMenu\00"
@.str.1 = [8 x i8] c"getMenu\00"
define void @CG_HideTeamMenu() {
%1 = call i32 @Menus_CloseByName(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @Menus_CloseByName(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"teamMenu\00"
@.str.1 = [8 x i8] c"getMenu\00"
define void @CG_HideTeamMenu() {
%1 = tail call i32 @Menus_CloseByName(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @Menus_CloseByName(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalnum(int);
void t_isalnum_0xe5() {
  Assert_real((isalnum(229) == 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_isalnum.c",
              1150, ("isalnum should be 0 for 0xe5"));
}


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

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

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0xe5\00"
define void @t_isalnum_0xe5() {
%1 = call i64 @isalnum(i32 229)
%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 1150, 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_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0xe5\00"
define void @t_isalnum_0xe5() {
%1 = tail call i64 @isalnum(i32 229)
%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 1150, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ type;
};
struct TYPE_4__ {
  TYPE_1__ xbutton;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
int get_XEvent_xbutton_type(void *_p) {
  return (int)((XEvent *)_p)->xbutton.type;
}


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

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

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define i32 @get_XEvent_xbutton_type(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_4__*
%5 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %4, i32 0, i32 0
%6 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %5, i32 0, i32 0
%7 = load i64, i64* %6
%8 = trunc i64 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @get_XEvent_xbutton_type(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, const char **argv) {
  printf("Hello, World!\n");
  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)
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [15 x i8] c"Hello, World!\0A\00"
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 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

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