xunge/DecIR huggingface dataset:
unsigned char SetBit(unsigned char x, unsigned char k, unsigned char b) {
  return (b ? x | (0x01 << k) : x & ~(0x01 << k));
}


x86 assembly (clang, -O0):
<SetBit>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %dil,%dl
mov    %dl,-0x1(%rbp)
mov    %cl,-0x2(%rbp)
mov    %al,-0x3(%rbp)
movzbl -0x3(%rbp),%eax
cmp    $0x0,%eax
je     113d <SetBit+0x3d>
movzbl -0x1(%rbp),%eax
movzbl -0x2(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    %eax,-0x8(%rbp)
jmp    1156 <SetBit+0x56>
movzbl -0x1(%rbp),%eax
movzbl -0x2(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SetBit>:
mov    %edi,%eax
bts    %esi,%eax
btr    %esi,%edi
test   %edx,%edx
cmove  %edi,%eax
ret

LLVM IR (-O0):
define zeroext i8 @SetBit(i8 zeroext %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8
%5 = alloca i8
%6 = alloca i8
store i8 %0, i8* %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%7 = load i8, i8* %6
%8 = zext i8 %7 to i32
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %17
10: ; preds = %3
%11 = load i8, i8* %4
%12 = zext i8 %11 to i32
%13 = load i8, i8* %5
%14 = zext i8 %13 to i32
%15 = shl i32 1, %14
%16 = or i32 %12, %15
br label %25
17: ; preds = %3
%18 = load i8, i8* %4
%19 = zext i8 %18 to i32
%20 = load i8, i8* %5
%21 = zext i8 %20 to i32
%22 = shl i32 1, %21
%23 = xor i32 %22, -1
%24 = and i32 %19, %23
br label %25
25: ; preds = %17, %10
%26 = phi i32 [ %16, %10 ], [ %24, %17 ]
%27 = trunc i32 %26 to i8
ret i8 %27
}

LLVM IR (-O2):
define zeroext i8 @SetBit(i8 zeroext %0, i8 zeroext %1, i8 zeroext %2) {
%4 = icmp eq i8 %2, 0
%5 = zext i8 %0 to i32
%6 = zext i8 %1 to i32
%7 = shl nuw i32 1, %6
%8 = or i32 %7, %5
%9 = xor i32 %7, -1
%10 = and i32 %9, %5
%11 = select i1 %4, i32 %10, i32 %8
%12 = trunc i32 %11 to i8
ret i8 %12
}
signed char saturate(signed short val) {
  if (val > 127)
    return 127;
  else if (val < -128)
    return -128;
  else
    return val;
}


x86 assembly (clang, -O0):
<saturate>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x4(%rbp)
movswl -0x4(%rbp),%eax
cmp    $0x7f,%eax
jle    1121 <saturate+0x21>
movb   $0x7f,-0x1(%rbp)
jmp    113e <saturate+0x3e>
movswl -0x4(%rbp),%eax
cmp    $0xffffff80,%eax
jge    1137 <saturate+0x37>
movb   $0x80,-0x1(%rbp)
jmp    113e <saturate+0x3e>
mov    -0x4(%rbp),%ax
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<saturate>:
cmp    $0xff81,%di
mov    $0xff80,%ecx
cmovge %edi,%ecx
cmp    $0x7f,%cx
mov    $0x7f,%eax
cmovl  %ecx,%eax
ret

LLVM IR (-O0):
define signext i8 @saturate(i16 signext %0) {
%2 = alloca i8
%3 = alloca i16
store i16 %0, i16* %3
%4 = load i16, i16* %3
%5 = sext i16 %4 to i32
%6 = icmp sgt i32 %5, 127
br i1 %6, label %7, label %8
7: ; preds = %1
store i8 127, i8* %2
br label %16
8: ; preds = %1
%9 = load i16, i16* %3
%10 = sext i16 %9 to i32
%11 = icmp slt i32 %10, -128
br i1 %11, label %12, label %13
12: ; preds = %8
store i8 -128, i8* %2
br label %16
13: ; preds = %8
%14 = load i16, i16* %3
%15 = trunc i16 %14 to i8
store i8 %15, i8* %2
br label %16
16: ; preds = %13, %12, %7
%17 = load i8, i8* %2
ret i8 %17
}

LLVM IR (-O2):
define signext i8 @saturate(i16 signext %0) {
%2 = icmp sgt i16 %0, -128
%3 = select i1 %2, i16 %0, i16 -128
%4 = icmp slt i16 %3, 127
%5 = select i1 %4, i16 %3, i16 127
%6 = trunc i16 %5 to i8
ret i8 %6
}
float Max(float a, float b) { return (a > b) ? a : b; }


x86 assembly (clang, -O0):
<Max>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    112c <Max+0x2c>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    1136 <Max+0x36>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<Max>:
maxss  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define float @Max(float %0, float %1) {
%3 = fcmp ogt float %0, %1
%4 = select i1 %3, float %0, float %1
ret float %4
}
/* Type definitions */
struct sstream {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
int /*<<< orphan*/ sstream_push_cstr(struct sstream *, char *);
void sstream_push_int(struct sstream *ctx, int val) {
  char buffer[128] = {0};
  sprintf(buffer, "%i", val);
  sstream_push_cstr(ctx, buffer);
}


x86 assembly (clang, -O0):
<sstream_push_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    -0x90(%rbp),%rdi
xor    %esi,%esi
mov    $0x80,%edx
call   1030 <memset@plt>
lea    -0x90(%rbp),%rdi
mov    -0xc(%rbp),%edx
lea    0xe9a(%rip),%rsi
call   1040 <sprintf@plt>
mov    -0x8(%rbp),%rdi
lea    -0x90(%rbp),%rsi
call   1050 <sstream_push_cstr@plt>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sstream_push_int>:
push   %r14
push   %rbx
sub    $0x88,%rsp
mov    %esi,%edx
mov    %rdi,%rbx
xorps  %xmm0,%xmm0
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
lea    0xea0(%rip),%rsi
mov    %rsp,%r14
mov    %r14,%rdi
call   1030 <sprintf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <sstream_push_cstr@plt>
add    $0x88,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.sstream = type { i32 }
@.str = [3 x i8] c"%i\00"
define void @sstream_push_int(%struct.sstream* %0, i32 %1) {
%3 = alloca %struct.sstream*
%4 = alloca i32
%5 = alloca [128 x i8]
store %struct.sstream* %0, %struct.sstream** %3
store i32 %1, i32* %4
%6 = bitcast [128 x i8]* %5 to i8*
%7 = getelementptr inbounds [128 x i8], [128 x i8]* %5, i64 0, i64 0
%8 = load i32, i32* %4
%9 = call i32 @sprintf(i8* %7, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = load %struct.sstream*, %struct.sstream** %3
%11 = getelementptr inbounds [128 x i8], [128 x i8]* %5, i64 0, i64 0
%12 = call i32 @sstream_push_cstr(%struct.sstream* %10, i8* %11)
ret void
}

LLVM IR (-O2):
%struct.sstream = type { i32 }
@.str = [3 x i8] c"%i\00"
define void @sstream_push_int(%struct.sstream* %0, i32 %1) {
%3 = alloca [128 x i8]
%4 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%5 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1)
%6 = call i32 @sstream_push_cstr(%struct.sstream* %0, i8* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ can_rx(int /*<<< orphan*/);
void CAN1_RX0_IRQ_Handler(void) { can_rx(0); }


x86 assembly (clang, -O0):
<CAN1_RX0_IRQ_Handler>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <can_rx@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<CAN1_RX0_IRQ_Handler>:
xor    %edi,%edi
jmp    1030 <can_rx@plt>

LLVM IR (-O0):
define void @CAN1_RX0_IRQ_Handler() {
%1 = call i32 @can_rx(i32 0)
ret void
}

LLVM IR (-O2):
define void @CAN1_RX0_IRQ_Handler() {
%1 = tail call i32 @can_rx(i32 0)
ret void
}
void rop3_19_1_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = *D & T;
  stk1 = S | stk2;
  stk1 = ~stk1;
  *D = (stk1 & (~S) & (~T)) | (*D & S) | (*D & T);
}


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

x86 assembly (clang, -O2):
<rop3_19_1_1>:
mov    (%rdi),%al
mov    %eax,%ecx
and    %dl,%cl
or     %sil,%dl
not    %dl
and    %sil,%al
or     %dl,%al
or     %cl,%al
mov    %al,(%rdi)
ret

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

LLVM IR (-O2):
define void @rop3_19_1_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = and i8 %4, %2
%6 = or i8 %2, %1
%7 = xor i8 %6, -1
%8 = and i8 %4, %1
%9 = or i8 %8, %7
%10 = or i8 %9, %5
store i8 %10, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ isspace(char const);
bool line_is_empty(char const *in_line) {
  while (*in_line) {
    if (!isspace(*in_line))
      return false;
    in_line++;
  }
  return true;
}


x86 assembly (clang, -O0):
<line_is_empty>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     115b <line_is_empty+0x4b>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%eax
jne    114a <line_is_empty+0x3a>
movl   $0x0,-0x4(%rbp)
jmp    1162 <line_is_empty+0x52>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    111c <line_is_empty+0xc>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<line_is_empty>:
push   %rbp
push   %rbx
push   %rax
mov    (%rdi),%al
mov    $0x1,%ebp
test   %al,%al
je     114b <line_is_empty+0x3b>
mov    %rdi,%rbx
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
nop
movsbl %al,%edi
call   1030 <isspace@plt>
test   %eax,%eax
je     1149 <line_is_empty+0x39>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <line_is_empty+0x20>
jmp    114b <line_is_empty+0x3b>
xor    %ebp,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @line_is_empty(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %7
4: ; preds = %7
%5 = load i8, i8* %12
%6 = icmp eq i8 %5, 0
br i1 %6, label %13, label %7
7: ; preds = %1, %4
%8 = phi i8 [ %5, %4 ], [ %2, %1 ]
%9 = phi i8* [ %12, %4 ], [ %0, %1 ]
%10 = tail call i32 @isspace(i8 signext %8)
%11 = icmp eq i32 %10, 0
%12 = getelementptr inbounds i8, i8* %9, i64 1
br i1 %11, label %13, label %4
13: ; preds = %7, %4, %1
%14 = phi i32 [ 1, %1 ], [ 1, %4 ], [ 0, %7 ]
ret i32 %14
}
/* Type definitions */
struct hiena_frag {
  int dummy;
};

/* Variables and functions */
struct hiena_frag *frag_new();
struct hiena_frag *new_frag() {
  return frag_new();
}


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

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

LLVM IR (-O0):
%struct.hiena_frag = type { i32 }
define %struct.hiena_frag* @new_frag() {
%1 = call %struct.hiena_frag* (...) @frag_new()
ret %struct.hiena_frag* %1
}

LLVM IR (-O2):
%struct.hiena_frag = type { i32 }
define %struct.hiena_frag* @new_frag() {
%1 = tail call %struct.hiena_frag* (...) @frag_new()
ret %struct.hiena_frag* %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void rotr() {
  printf("c = srcb & 1;\n");
  printf("dst = srcb >> 1;\n");
  printf("if (c) dst|=0x80;\n");
}


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

x86 assembly (clang, -O2):
<rotr>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xeea(%rip),%rdi
call   1030 <puts@plt>
lea    0xeef(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"c = srcb & 1;\0A\00"
@.str.1 = [18 x i8] c"dst = srcb >> 1;\0A\00"
@.str.2 = [19 x i8] c"if (c) dst|=0x80;\0A\00"
define void @rotr() {
%1 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [14 x i8] c"c = srcb & 1;\00"
@str.3 = [17 x i8] c"dst = srcb >> 1;\00"
@str.4 = [18 x i8] c"if (c) dst|=0x80;\00"
define void @rotr() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.4, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int _uint_len(uint32_t num) {
  int n = 0;
  if (num == 0) {
    return 1;
  }
  while (num != 0) {
    n++;
    num /= 10;
  }
  return n;
}


x86 assembly (clang, -O0):
<_uint_len>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1124 <_uint_len+0x24>
movl   $0x1,-0x4(%rbp)
jmp    1155 <_uint_len+0x55>
jmp    1129 <_uint_len+0x29>
cmpl   $0x0,-0x8(%rbp)
je     114f <_uint_len+0x4f>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
jmp    1129 <_uint_len+0x29>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_uint_len>:
test   %edi,%edi
je     1133 <_uint_len+0x33>
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
add    $0x1,%eax
movslq %edi,%rcx
imul   $0x66666667,%rcx,%rdi
mov    %rdi,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rdi
add    %edx,%edi
add    $0x9,%ecx
cmp    $0x12,%ecx
ja     1110 <_uint_len+0x10>
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @_uint_len(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %10, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 0, %1 ]
%5 = phi i32 [ %7, %3 ], [ %0, %1 ]
%6 = add nuw nsw i32 %4, 1
%7 = sdiv i32 %5, 10
%8 = add i32 %5, 9
%9 = icmp ult i32 %8, 19
br i1 %9, label %10, label %3
10: ; preds = %3, %1
%11 = phi i32 [ 1, %1 ], [ %6, %3 ]
ret i32 %11
}
int f2(int x) { return 2 * x - 1; }


x86 assembly (clang, -O0):
<f2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
sub    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f2>:
lea    (%rdi,%rdi,1),%eax
add    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @f2(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul nsw i32 2, %3
%5 = sub nsw i32 %4, 1
ret i32 %5
}

LLVM IR (-O2):
define i32 @f2(i32 %0) {
%2 = shl nsw i32 %0, 1
%3 = add nsw i32 %2, -1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ sort(int *, int);
char *largest_number(int *A, int len) { sort(A, len); }


x86 assembly (clang, -O0):
<largest_number>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <sort@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<largest_number>:
jmp    1030 <sort@plt>

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

LLVM IR (-O2):
define noalias i8* @largest_number(i32* %0, i32 %1) {
%3 = tail call i32 @sort(i32* %0, i32 %1)
ret i8* undef
}
int ffsll(long long i) { return (__builtin_ffsll(i)); }


x86 assembly (clang, -O0):
<ffsll>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
bsf    %rdx,%rax
add    $0x1,%rax
xor    %ecx,%ecx
cmp    $0x0,%rdx
cmove  %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ffsll>:
bsf    %rdi,%rcx
add    $0x1,%ecx
xor    %eax,%eax
test   %rdi,%rdi
cmovne %ecx,%eax
ret

LLVM IR (-O0):
define i32 @ffsll(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i64 @llvm.cttz.i64(i64 %3, i1 true)
%5 = add i64 %4, 1
%6 = icmp eq i64 %3, 0
%7 = select i1 %6, i64 0, i64 %5
%8 = trunc i64 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @ffsll(i64 %0) {
%2 = tail call i64 @llvm.cttz.i64(i64 %0, i1 true)
%3 = icmp eq i64 %0, 0
%4 = trunc i64 %2 to i32
%5 = add nuw nsw i32 %4, 1
%6 = select i1 %3, i32 0, i32 %5
ret i32 %6
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
int32_t prv_equal_real_fn(double a, double b) { return a == b ? -1 : 0; }


x86 assembly (clang, -O0):
<prv_equal_real_fn>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
xor    %eax,%eax
mov    $0xffffffff,%ecx
ucomisd %xmm1,%xmm0
setnp  %sil
sete   %dl
test   %sil,%dl
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<prv_equal_real_fn>:
cmpeqsd %xmm1,%xmm0
movq   %xmm0,%rax
ret

LLVM IR (-O0):
define i32 @prv_equal_real_fn(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 = fcmp oeq double %5, %6
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -1, i32 0
ret i32 %9
}

LLVM IR (-O2):
define i32 @prv_equal_real_fn(double %0, double %1) {
%3 = fcmp oeq double %0, %1
%4 = sext i1 %3 to i32
ret i32 %4
}
char *pstrchr(s, c)
char *s;
int c;
{
  do {
    if ((int)*s == c)
      return s;
  } while (*s++);
  return 0;
}


x86 assembly (clang, -O0):
<pstrchr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    -0x14(%rbp),%eax
jne    1128 <pstrchr+0x28>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    114d <pstrchr+0x4d>
jmp    112d <pstrchr+0x2d>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
cmpb   $0x0,(%rax)
jne    110b <pstrchr+0xb>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pstrchr>:
mov    %rdi,%rax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsbl (%rax),%ecx
cmp    %esi,%ecx
je     1121 <pstrchr+0x21>
add    $0x1,%rax
test   %cl,%cl
jne    1110 <pstrchr+0x10>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i8* @pstrchr(i8* %0, i32 %1) {
br label %3
3: ; preds = %8, %2
%4 = phi i8* [ %0, %2 ], [ %9, %8 ]
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, %1
br i1 %7, label %11, label %8
8: ; preds = %3
%9 = getelementptr inbounds i8, i8* %4, i64 1
%10 = icmp eq i8 %5, 0
br i1 %10, label %11, label %3
11: ; preds = %8, %3
%12 = phi i8* [ %4, %3 ], [ null, %8 ]
ret i8* %12
}
int __os_get_errno(void) {
  { return (0); }
}


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

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

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

LLVM IR (-O2):
define i32 @__os_get_errno() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *, char const *);
void global(const char *var) { printf("\tglobal %s; vfix %s\n", var, var); }


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

x86 assembly (clang, -O2):
<global>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
mov    %rdx,%rsi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"\09global %s; vfix %s\0A\00"
define void @global(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %3, i8* %4)
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"\09global %s; vfix %s\0A\00"
define void @global(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %0)
ret void
}
/* Variables and functions */
unsigned long __builtin_wasm_tls_size();
long unsigned int tls_size() { return __builtin_wasm_tls_size(); }


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

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

LLVM IR (-O0):
define i64 @tls_size() {
%1 = call i64 (...) @__builtin_wasm_tls_size()
ret i64 %1
}

LLVM IR (-O2):
define i64 @tls_size() {
%1 = tail call i64 (...) @__builtin_wasm_tls_size()
ret i64 %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
void g_error(char *message) { printf("%s: %s\n", "rm", message); }


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

x86 assembly (clang, -O2):
<g_error>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
lea    0xee7(%rip),%rsi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [8 x i8] c"%s: %s\0A\00"
@.str.1 = [3 x i8] c"rm\00"
define void @g_error(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clear_board();
int /*<<< orphan*/ xor_srand(unsigned int);
void init_brown(unsigned int seed) {
  xor_srand(seed);
  clear_board();
}


x86 assembly (clang, -O0):
<init_brown>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <xor_srand@plt>
mov    $0x0,%al
call   1040 <clear_board@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @init_brown(i32 %0) {
%2 = tail call i32 @xor_srand(i32 %0)
%3 = tail call i32 (...) @clear_board()
ret void
}
void closepipe(pv) register int *pv;
{
  close(pv[0]);
  close(pv[1]);
}


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

x86 assembly (clang, -O2):
<closepipe>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%edi
xor    %eax,%eax
call   1030 <close@plt>
mov    0x4(%rbx),%edi
xor    %eax,%eax
pop    %rbx
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define void @closepipe(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 (i32, ...) bitcast (i32 (...)* @close to i32 (i32, ...)*)(i32 %2)
%4 = getelementptr inbounds i32, i32* %0, i64 1
%5 = load i32, i32* %4
%6 = tail call i32 (i32, ...) bitcast (i32 (...)* @close to i32 (i32, ...)*)(i32 %5)
ret void
}
void RTDbgAsRetain(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ getuid();
void test(void) {
  uid_t uid;
  uid = getuid();
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <getuid@plt>
mov    %eax,-0x4(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @test() {
%1 = alloca i32
%2 = call i32 (...) @getuid()
store i32 %2, i32* %1
ret void
}

LLVM IR (-O2):
define void @test() {
%1 = tail call i32 (...) @getuid()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int num, pos;
  scanf("%d %d", &pos, &num);
  if ((num & (1 << pos)) == 0)
    printf("0");
  else
    printf("1");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0xc(%rbp),%rsi
lea    -0x8(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
jne    116e <main+0x4e>
lea    0xea2(%rip),%rdi
call   1030 <printf@plt>
jmp    117a <main+0x5a>
lea    0xe93(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
mov    %rsp,%rsi
lea    0x4(%rsp),%rdx
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
mov    (%rsp),%ecx
bt     %ecx,%eax
mov    $0x31,%edi
adc    $0xffffffff,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"%d %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %1)
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = shl nuw i32 1, %7
%9 = and i32 %8, %6
%10 = icmp eq i32 %9, 0
%11 = select i1 %10, i32 48, i32 49
%12 = call i32 @putchar(i32 %11)
ret i32 0
}
/* Variables and functions */
float log10(float);
float call_log10f(float x) { return log10((float)x); }


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

x86 assembly (clang, -O2):
<call_log10f>:
jmp    1030 <log10@plt>

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

LLVM IR (-O2):
define float @call_log10f(float %0) {
%2 = tail call float @log10(float %0)
ret float %2
}
void printf_info(const char *fmt, ...) {}


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

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

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

LLVM IR (-O2):
define void @printf_info(i8* nocapture %0, ...) {
ret void
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int numbtrop_standard_clear(void) {
  int fail, *a, *b;
  double *c;
  fail = _ada_use_c2phc(726, a, b, c);
  return fail;
}


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

x86 assembly (clang, -O2):
<numbtrop_standard_clear>:
mov    $0x2d6,%edi
jmp    1030 <_ada_use_c2phc@plt>

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

LLVM IR (-O2):
define i32 @numbtrop_standard_clear() {
%1 = tail call i32 @_ada_use_c2phc(i32 726, i32* undef, i32* undef, double* undef)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void shared(void) { printf("shared_2!\n"); }


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

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

LLVM IR (-O0):
@.str = [11 x i8] c"shared_2!\0A\00"
define void @shared() {
%1 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [10 x i8] c"shared_2!\00"
define void @shared() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct conn_info_st {
  int dummy;
};

/* Variables and functions */
int cmds_after_pass(struct conn_info_st *);
scalar_t__ fw_set_pass(char const *, struct conn_info_st *);
int fw_pass(const char *args, struct conn_info_st *conn_info) {
  if (fw_set_pass(args, conn_info) != 0) {
    return (-2);
  }
  return cmds_after_pass(conn_info);
}


x86 assembly (clang, -O0):
<fw_pass>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <fw_set_pass@plt>
cmp    $0x0,%rax
je     1153 <fw_pass+0x33>
movl   $0xfffffffe,-0x4(%rbp)
jmp    115f <fw_pass+0x3f>
mov    -0x18(%rbp),%rdi
call   1030 <cmds_after_pass@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fw_pass>:
push   %rbx
mov    %rsi,%rbx
call   1040 <fw_set_pass@plt>
test   %rax,%rax
je     1135 <fw_pass+0x15>
mov    $0xfffffffe,%eax
pop    %rbx
ret
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <cmds_after_pass@plt>

LLVM IR (-O0):
%struct.conn_info_st = type { i32 }
define i32 @fw_pass(i8* %0, %struct.conn_info_st* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca %struct.conn_info_st*
store i8* %0, i8** %4
store %struct.conn_info_st* %1, %struct.conn_info_st** %5
%6 = load i8*, i8** %4
%7 = load %struct.conn_info_st*, %struct.conn_info_st** %5
%8 = call i64 @fw_set_pass(i8* %6, %struct.conn_info_st* %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %2
store i32 -2, i32* %3
br label %14
11: ; preds = %2
%12 = load %struct.conn_info_st*, %struct.conn_info_st** %5
%13 = call i32 @cmds_after_pass(%struct.conn_info_st* %12)
store i32 %13, i32* %3
br label %14
14: ; preds = %11, %10
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
%struct.conn_info_st = type { i32 }
define i32 @fw_pass(i8* %0, %struct.conn_info_st* %1) {
%3 = tail call i64 @fw_set_pass(i8* %0, %struct.conn_info_st* %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @cmds_after_pass(%struct.conn_info_st* %1)
br label %7
7: ; preds = %2, %5
%8 = phi i32 [ %6, %5 ], [ -2, %2 ]
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ slock;
typedef int /*<<< orphan*/ pthread_spinlock_t;
typedef int /*<<< orphan*/ pthread_mutex_t;
typedef int /*<<< orphan*/ mutex;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int, int);
int /*<<< orphan*/ stderr;
main() {
  pthread_mutex_t mutex;
  pthread_spinlock_t slock;
  fprintf(stderr, "mutex size = %d, spin lock size = %d\n", sizeof(mutex),
          sizeof(slock));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ec1(%rip),%rax
mov    (%rax),%edi
lea    0xed8(%rip),%rsi
mov    $0x4,%ecx
mov    %ecx,%edx
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
lea    0xedf(%rip),%rsi
mov    $0x4,%edx
mov    $0x4,%ecx
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [38 x i8] c"mutex size = %d, spin lock size = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i32 4, i32 4)
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [38 x i8] c"mutex size = %d, spin lock size = %d\0A\00"
define i32 @main() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i32 4, i32 4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Alltime_Up();
int main() {
  Alltime_Up();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @Alltime_Up()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @Alltime_Up()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ LedsP__Leds__led2Toggle();
void BlinkC__Leds__led2Toggle(void) { LedsP__Leds__led2Toggle(); }


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

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

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

LLVM IR (-O2):
define void @BlinkC__Leds__led2Toggle() {
%1 = tail call i32 (...) @LedsP__Leds__led2Toggle()
ret void
}
/* Type definitions */
typedef int uint64_t;
typedef scalar_t__ rax;

/* Variables and functions */
int /*<<< orphan*/ cpuid(int, int *, int *, int *, int *);
bool cpuid_therm_stat_enable_PowerLimitNotify(void) {
  uint64_t rax, rbx, rcx, rdx;
  int leaf = 6;
  cpuid(leaf, &rax, &rbx, &rcx, &rdx);
  if ((((uint64_t)(rax) &
        ((((uint64_t)1 << (((4)) - ((4)) + 1)) - 1) << ((4)))) >>
       (4)) == 1) {
    return true;
  } else {
    return false;
  }
}


x86 assembly (clang, -O0):
<cpuid_therm_stat_enable_PowerLimitNotify>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x6,-0x18(%rbp)
mov    -0x18(%rbp),%edi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
lea    -0x14(%rbp),%r8
call   1030 <cpuid@plt>
mov    -0x8(%rbp),%eax
and    $0x10,%eax
sar    $0x4,%eax
cmp    $0x1,%eax
jne    1155 <cpuid_therm_stat_enable_PowerLimitNotify+0x45>
movl   $0x1,-0x4(%rbp)
jmp    115c <cpuid_therm_stat_enable_PowerLimitNotify+0x4c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpuid_therm_stat_enable_PowerLimitNotify>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rsi
lea    0x14(%rsp),%rdx
lea    0x10(%rsp),%rcx
lea    0xc(%rsp),%r8
mov    $0x6,%edi
call   1030 <cpuid@plt>
mov    0x8(%rsp),%eax
shr    $0x4,%eax
and    $0x1,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @cpuid_therm_stat_enable_PowerLimitNotify() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 6, i32* %6
%7 = load i32, i32* %6
%8 = call i32 @cpuid(i32 %7, i32* %2, i32* %3, i32* %4, i32* %5)
%9 = load i32, i32* %2
%10 = and i32 %9, 16
%11 = ashr i32 %10, 4
%12 = icmp eq i32 %11, 1
br i1 %12, label %13, label %14
13: ; preds = %0
store i32 1, i32* %1
br label %15
14: ; preds = %0
store i32 0, i32* %1
br label %15
15: ; preds = %14, %13
%16 = load i32, i32* %1
ret i32 %16
}

LLVM IR (-O2):
define i32 @cpuid_therm_stat_enable_PowerLimitNotify() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %1 to i8*
%6 = bitcast i32* %2 to i8*
%7 = bitcast i32* %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = call i32 @cpuid(i32 6, i32* %1, i32* %2, i32* %3, i32* %4)
%10 = load i32, i32* %1
%11 = lshr i32 %10, 4
%12 = and i32 %11, 1
ret i32 %12
}
signed char foo() {
  signed char i = 0;
  while (i >= 0) {
    i = i + 1;
  }
  return i;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
movb   $0x0,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x0,%eax
jl     1124 <foo+0x24>
movsbl -0x1(%rbp),%eax
add    $0x1,%eax
mov    %al,-0x1(%rbp)
jmp    1108 <foo+0x8>
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
mov    $0x80,%al
ret

LLVM IR (-O0):
define signext i8 @foo() {
%1 = alloca i8
store i8 0, i8* %1
br label %2
2: ; preds = %6, %0
%3 = load i8, i8* %1
%4 = sext i8 %3 to i32
%5 = icmp sge i32 %4, 0
br i1 %5, label %6, label %11
6: ; preds = %2
%7 = load i8, i8* %1
%8 = sext i8 %7 to i32
%9 = add nsw i32 %8, 1
%10 = trunc i32 %9 to i8
store i8 %10, i8* %1
br label %2
11: ; preds = %2
%12 = load i8, i8* %1
ret i8 %12
}

LLVM IR (-O2):
define signext i8 @foo() {
ret i8 -128
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isupper(int);
void t_isupper_0xad() {
  Assert_real((isupper(173) == 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_isupper.c",
              870, ("isupper should be 0 for 0xad"));
}


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

x86 assembly (clang, -O2):
<t_isupper_0xad>:
push   %rax
mov    $0xad,%edi
call   1030 <isupper@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x366,%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_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0xad\00"
define void @t_isupper_0xad() {
%1 = call i64 @isupper(i32 173)
%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 870, 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_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0xad\00"
define void @t_isupper_0xad() {
%1 = tail call i64 @isupper(i32 173)
%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 870, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ stpcpy(char *, char *);
int strlen(char *);
void stpcpy_no_overflow(char *y) {
  char x[4];
  if (strlen(y) == 3)
    stpcpy(x, y);
}


x86 assembly (clang, -O0):
<stpcpy_no_overflow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
cmp    $0x3,%eax
jne    114b <stpcpy_no_overflow+0x2b>
lea    -0xc(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <stpcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stpcpy_no_overflow>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
call   1040 <strlen@plt>
cmp    $0x3,%eax
jne    113f <stpcpy_no_overflow+0x1f>
lea    0xc(%rsp),%rdi
mov    %rbx,%rsi
call   1030 <stpcpy@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @stpcpy_no_overflow(i8* %0) {
%2 = alloca i8*
%3 = alloca [4 x i8]
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
%6 = icmp eq i32 %5, 3
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
%9 = load i8*, i8** %2
%10 = call i32 @stpcpy(i8* %8, i8* %9)
br label %11
11: ; preds = %7, %1
ret void
}

LLVM IR (-O2):
define void @stpcpy_no_overflow(i8* %0) {
%2 = alloca [4 x i8]
%3 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 0
%4 = tail call i32 @strlen(i8* %0)
%5 = icmp eq i32 %4, 3
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @stpcpy(i8* %3, i8* %0)
br label %8
8: ; preds = %6, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strcmp(char const *, char *);
int msm_fb_detect_panel(const char *name) {
  int ret = -1;
  if ((0) || (0)) {
    if (!strcmp(name, "lcdc_gordon_vga"))
      ret = 0;
    else
      ret = -19;
  }
  return ret;
}


x86 assembly (clang, -O0):
<msm_fb_detect_panel>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0xffffffff,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @msm_fb_detect_panel(i8* nocapture readnone %0) {
ret i32 -1
}