xunge/DecIR huggingface dataset:
void ws_trim(char *str) {
  int i = 0;
  while (str[i] != '\0')
    i++;
  i--;
  while (str[i] == ' ') {
    str[i] = '\0';
    i--;
  }
}


x86 assembly (clang, -O0):
<ws_trim>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1132 <ws_trim+0x32>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <ws_trim+0xf>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x20,%eax
jne    116a <ws_trim+0x6a>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    113b <ws_trim+0x3b>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ws_trim>:
movabs $0xfffffffe00000000,%rax
ff ff ff
movabs $0x100000000,%rcx
mov    %rdi,%rdx
nopw   0x0(%rax,%rax,1)
add    %rcx,%rax
cmpb   $0x0,(%rdx)
lea    0x1(%rdx),%rdx
jne    1120 <ws_trim+0x20>
sar    $0x20,%rax
cmpb   $0x20,(%rdi,%rax,1)
jne    114d <ws_trim+0x4d>
add    %rax,%rdi
nopl   0x0(%rax)
movb   $0x0,(%rdi)
cmpb   $0x20,-0x1(%rdi)
lea    -0x1(%rdi),%rdi
je     1140 <ws_trim+0x40>
ret

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

LLVM IR (-O2):
define void @ws_trim(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add nuw i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = shl i64 %3, 32
%10 = add i64 %9, -4294967296
%11 = ashr exact i64 %10, 32
%12 = getelementptr inbounds i8, i8* %0, i64 %11
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 32
br i1 %14, label %15, label %22
15: ; preds = %8, %15
%16 = phi i64 [ %18, %15 ], [ %11, %8 ]
%17 = phi i8* [ %19, %15 ], [ %12, %8 ]
store i8 0, i8* %17
%18 = add i64 %16, -1
%19 = getelementptr inbounds i8, i8* %0, i64 %18
%20 = load i8, i8* %19
%21 = icmp eq i8 %20, 32
br i1 %21, label %15, label %22
22: ; preds = %15, %8
ret void
}
void cpu_set_switches(unsigned long w1, unsigned long w2) {}


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

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

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

LLVM IR (-O2):
define void @cpu_set_switches(i64 %0, i64 %1) {
ret void
}
void cli_placeholder(void) {}


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

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

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

LLVM IR (-O2):
define void @cli_placeholder() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ b();
int main() {
  b();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @b()
ret i32 0
}
/* Type definitions */
struct node {
  int dummy;
};

/* Variables and functions */
struct node *clear(struct node *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ the_menu(struct node *, struct node *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main() {
  srand(time(NULL));
  struct node *head = NULL;
  struct node *tail = NULL;
  the_menu(head, tail);
  if (head != NULL) {
    head = clear(head);
  }
  printf("\nThank you for using the program\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1050 <time@plt>
mov    %eax,%edi
call   1040 <srand@plt>
movq   $0x0,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1060 <the_menu@plt>
cmpq   $0x0,-0x10(%rbp)
je     11a4 <main+0x54>
mov    -0x10(%rbp),%rdi
call   1070 <clear@plt>
mov    %rax,-0x10(%rbp)
lea    0xe55(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1050 <time@plt>
mov    %eax,%edi
call   1040 <srand@plt>
xor    %edi,%edi
xor    %esi,%esi
call   1060 <the_menu@plt>
lea    0xea1(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.node = type { i32 }
@.str = [34 x i8] c"\0AThank you for using the program\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.node*
%3 = alloca %struct.node*
store i32 0, i32* %1
%4 = call i32 @time(i32* null)
%5 = call i32 @srand(i32 %4)
store %struct.node* null, %struct.node** %2
store %struct.node* null, %struct.node** %3
%6 = load %struct.node*, %struct.node** %2
%7 = load %struct.node*, %struct.node** %3
%8 = call i32 @the_menu(%struct.node* %6, %struct.node* %7)
%9 = load %struct.node*, %struct.node** %2
%10 = icmp ne %struct.node* %9, null
br i1 %10, label %11, label %14
11: ; preds = %0
%12 = load %struct.node*, %struct.node** %2
%13 = call %struct.node* @clear(%struct.node* %12)
store %struct.node* %13, %struct.node** %2
br label %14
14: ; preds = %11, %0
%15 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%16 = load i32, i32* %1
ret i32 %16
}

LLVM IR (-O2):
%struct.node = type { i32 }
@str = [33 x i8] c"\0AThank you for using the program\00"
define i32 @main() {
%1 = tail call i32 @time(i32* null)
%2 = tail call i32 @srand(i32 %1)
%3 = tail call i32 @the_menu(%struct.node* null, %struct.node* null)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0))
ret i32 0
}
const char *def(int val) { return val ? "enabled" : "disabled"; }


x86 assembly (clang, -O0):
<def>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
lea    0xef7(%rip),%rax
lea    0xee8(%rip),%rcx
cmp    $0x0,%edx
cmovne %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<def>:
test   %edi,%edi
lea    0xeff(%rip),%rcx
lea    0xef0(%rip),%rax
cmove  %rcx,%rax
ret

LLVM IR (-O0):
@.str = [8 x i8] c"enabled\00"
@.str.1 = [9 x i8] c"disabled\00"
define i8* @def(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
%5 = zext i1 %4 to i64
%6 = select i1 %4, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0)
ret i8* %6
}

LLVM IR (-O2):
@.str = [8 x i8] c"enabled\00"
@.str.1 = [9 x i8] c"disabled\00"
define i8* @def(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = select i1 %2, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ free(void *);
int /*<<< orphan*/ perror(char *);
void cfree(void *p) {
  if (p == NULL) {
    perror("Attempt to free NULL pointer");
    exit(1);
  }
  free(p);
}


x86 assembly (clang, -O0):
<cfree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    115d <cfree+0x2d>
lea    0xeb2(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cfree>:
test   %rdi,%rdi
je     113a <cfree+0xa>
jmp    1030 <free@plt>
push   %rax
lea    0xebe(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

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

LLVM IR (-O2):
@.str = [29 x i8] c"Attempt to free NULL pointer\00"
define void @cfree(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = tail call i32 @perror(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @exit(i32 1)
unreachable
6: ; preds = %1
%7 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
void *malloc(int);
void *convolve_h_alloc(int len) { return malloc(len * 2 * sizeof(float)); }


x86 assembly (clang, -O0):
<convolve_h_alloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
cltq
shl    $0x2,%rax
mov    %eax,%edi
call   1030 <malloc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<convolve_h_alloc>:
shl    $0x3,%edi
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define i8* @convolve_h_alloc(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul nsw i32 %3, 2
%5 = sext i32 %4 to i64
%6 = mul i64 %5, 4
%7 = trunc i64 %6 to i32
%8 = call i8* @malloc(i32 %7)
ret i8* %8
}

LLVM IR (-O2):
define noalias i8* @convolve_h_alloc(i32 %0) {
%2 = shl i32 %0, 3
%3 = tail call i8* @malloc(i32 %2)
ret i8* %3
}
int isascii(int c) { return c >= 0 && c < 128; }


x86 assembly (clang, -O0):
<isascii>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1123 <isascii+0x23>
cmpl   $0x80,-0x4(%rbp)
setl   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isascii>:
xor    %eax,%eax
cmp    $0x80,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @isascii(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 128
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @isascii(i32 %0) {
%2 = icmp ult i32 %0, 128
%3 = zext i1 %2 to i32
ret i32 %3
}
void av_hwdevice_ctx_alloc() {}


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

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

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

LLVM IR (-O2):
define void @av_hwdevice_ctx_alloc() {
ret void
}
/* Variables and functions */
float fabs(float);
float getBuddyBoxSampleMagnitude(float sample) { return fabs(sample); }


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

x86 assembly (clang, -O2):
<getBuddyBoxSampleMagnitude>:
andps  0xef9(%rip),%xmm0
ret

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

LLVM IR (-O2):
define float @getBuddyBoxSampleMagnitude(float %0) {
%2 = tail call float @llvm.fabs.f32(float %0)
ret float %2
}
double dfoo() {
  static double table[] = {20.4, 69.96, 4.4, 202.202};
  static int idx;
  return table[idx++];
}


x86 assembly (clang, -O0):
<dfoo>:
push   %rbp
mov    %rsp,%rbp
mov    0x2f4a(%rip),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,0x2f3f(%rip)
movslq %eax,%rcx
lea    0x2f11(%rip),%rax
movsd  (%rax,%rcx,8),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<dfoo>:
movslq 0x2f1d(%rip),%rax
lea    0x1(%rax),%ecx
mov    %ecx,0x2f14(%rip)
lea    0xee9(%rip),%rcx
movsd  (%rcx,%rax,8),%xmm0
ret

LLVM IR (-O0):
@dfoo.table = internal global [4 x double] [double 2.040000e+01, double 6.996000e+01, double 4.400000e+00, double 2.022020e+02]
@dfoo.idx = internal global i32 0
define double @dfoo() {
%1 = load i32, i32* @dfoo.idx
%2 = add nsw i32 %1, 1
store i32 %2, i32* @dfoo.idx
%3 = sext i32 %1 to i64
%4 = getelementptr inbounds [4 x double], [4 x double]* @dfoo.table, i64 0, i64 %3
%5 = load double, double* %4
ret double %5
}

LLVM IR (-O2):
@dfoo.table = internal unnamed_addr constant [4 x double] [double 2.040000e+01, double 6.996000e+01, double 4.400000e+00, double 2.022020e+02]
@dfoo.idx = internal unnamed_addr global i32 0
define double @dfoo() {
%1 = load i32, i32* @dfoo.idx
%2 = add nsw i32 %1, 1
store i32 %2, i32* @dfoo.idx
%3 = sext i32 %1 to i64
%4 = getelementptr inbounds [4 x double], [4 x double]* @dfoo.table, i64 0, i64 %3
%5 = load double, double* %4
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ NDFC_WRITE_REG_INT(int /*<<< orphan*/);
void NFC_RbIntDisable(void) { NDFC_WRITE_REG_INT(0); }


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

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

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

LLVM IR (-O2):
define void @NFC_RbIntDisable() {
%1 = tail call i32 @NDFC_WRITE_REG_INT(i32 0)
ret void
}
unsigned int premul(unsigned int val, unsigned char alpha) {
  if (alpha == 0xFF)
    return val;
  else if (alpha == 0x00)
    return 0;
  else
    return ((((val & 0x00FF00FF) * alpha) >> 8) & 0x00FF00FF) |
           ((((val & 0xFF00FF00) >> 8) * alpha) & 0xFF00FF00);
}


x86 assembly (clang, -O0):
<premul>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %edi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
movzbl -0x9(%rbp),%eax
cmp    $0xff,%eax
jne    1127 <premul+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1175 <premul+0x75>
movzbl -0x9(%rbp),%eax
cmp    $0x0,%eax
jne    1140 <premul+0x40>
movl   $0x0,-0x4(%rbp)
jmp    1175 <premul+0x75>
mov    -0x8(%rbp),%eax
and    $0xff00ff,%eax
movzbl -0x9(%rbp),%ecx
imul   %ecx,%eax
shr    $0x8,%eax
and    $0xff00ff,%eax
mov    -0x8(%rbp),%ecx
and    $0xff00ff00,%ecx
shr    $0x8,%ecx
movzbl -0x9(%rbp),%edx
imul   %edx,%ecx
and    $0xff00ff00,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<premul>:
mov    %edi,%eax
cmp    $0xff,%sil
je     1136 <premul+0x36>
test   %sil,%sil
jne    1110 <premul+0x10>
xor    %eax,%eax
ret
mov    %eax,%ecx
and    $0xff00ff,%ecx
imul   %esi,%ecx
shr    $0x8,%ecx
and    $0xff00ff,%ecx
shr    $0x8,%eax
and    $0xff00ff,%eax
imul   %esi,%eax
and    $0xff00ff00,%eax
or     %ecx,%eax
ret

LLVM IR (-O0):
define i32 @premul(i32 %0, i8 zeroext %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8
store i32 %0, i32* %4
store i8 %1, i8* %5
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = icmp eq i32 %7, 255
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load i32, i32* %4
store i32 %10, i32* %3
br label %32
11: ; preds = %2
%12 = load i8, i8* %5
%13 = zext i8 %12 to i32
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %11
store i32 0, i32* %3
br label %32
16: ; preds = %11
%17 = load i32, i32* %4
%18 = and i32 %17, 16711935
%19 = load i8, i8* %5
%20 = zext i8 %19 to i32
%21 = mul i32 %18, %20
%22 = lshr i32 %21, 8
%23 = and i32 %22, 16711935
%24 = load i32, i32* %4
%25 = and i32 %24, -16711936
%26 = lshr i32 %25, 8
%27 = load i8, i8* %5
%28 = zext i8 %27 to i32
%29 = mul i32 %26, %28
%30 = and i32 %29, -16711936
%31 = or i32 %23, %30
store i32 %31, i32* %3
br label %32
32: ; preds = %16, %15, %9
%33 = load i32, i32* %3
ret i32 %33
}

LLVM IR (-O2):
define i32 @premul(i32 %0, i8 zeroext %1) {
%3 = zext i8 %1 to i32
switch i8 %1, label %5 [
i8 -1, label %15
i8 0, label %4
]
4: ; preds = %2
br label %15
5: ; preds = %2
%6 = and i32 %0, 16711935
%7 = mul nuw i32 %6, %3
%8 = lshr i32 %7, 8
%9 = and i32 %8, 16711935
%10 = lshr i32 %0, 8
%11 = and i32 %10, 16711935
%12 = mul nuw i32 %11, %3
%13 = and i32 %12, -16711936
%14 = or i32 %9, %13
br label %15
15: ; preds = %2, %5, %4
%16 = phi i32 [ 0, %4 ], [ %14, %5 ], [ %0, %2 ]
ret i32 %16
}
int SemInit(int sem_count) {
  int sid;
  asm("movl %1, %%eax; int $51; movl %%ebx, %0"
      : "=g"(sid)
      : "g"(sem_count)
      : "eax", "ebx");
  return sid;
}


x86 assembly (clang, -O0):
<SemInit>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
int    $0x33
mov    %ebx,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<SemInit>:
push   %rbx
mov    %edi,-0x8(%rsp)
mov    -0x8(%rsp),%eax
int    $0x33
mov    %ebx,-0x4(%rsp)
mov    -0x4(%rsp),%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @SemInit(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = load i32, i32* %2
ret i32 %4
}
/* Variables and functions */
int printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n, s = 0;
  for (scanf("%d", &n); n <= 100; n++)
    s += n;
  return 0 * printf("%d\n", s);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
lea    0xec3(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x64,-0x8(%rbp)
jg     1167 <main+0x47>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1146 <main+0x26>
mov    -0xc(%rbp),%esi
lea    0xe92(%rip),%rdi
call   1030 <printf@plt>
imul   $0x0,%eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
xor    %esi,%esi
cmp    $0x64,%eax
jg     1164 <main+0x44>
mov    $0x64,%ecx
sub    %eax,%ecx
lea    0x1(%rax),%esi
imul   %ecx,%esi
mov    $0x63,%edx
sub    %eax,%edx
imul   %rcx,%rdx
shr    %rdx
add    %eax,%esi
add    %edx,%esi
movl   $0x65,0x4(%rsp)
lea    0xe98(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = icmp slt i32 %4, 101
br i1 %5, label %6, label %18
6: ; preds = %0
%7 = sub i32 100, %4
%8 = add nsw i32 %4, 1
%9 = mul i32 %7, %8
%10 = zext i32 %7 to i33
%11 = sub i32 99, %4
%12 = zext i32 %11 to i33
%13 = mul i33 %10, %12
%14 = lshr i33 %13, 1
%15 = trunc i33 %14 to i32
%16 = add i32 %4, %9
%17 = add i32 %16, %15
store i32 101, i32* %1
br label %18
18: ; preds = %6, %0
%19 = phi i32 [ %17, %6 ], [ 0, %0 ]
%20 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %19)
ret i32 0
}
void i2d_CRL_DIST_POINTS(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ GPIODirModeSet(int /*<<< orphan*/, int /*<<< orphan*/, int);
int /*<<< orphan*/ GPIOPadConfigSet(int /*<<< orphan*/, int /*<<< orphan*/, int,
                                    int);
void GPIOPinTypeKBRow(uint32_t ui32Port, uint8_t ui8Pins) {
  ;
  GPIODirModeSet(ui32Port, ui8Pins, 0x00000002);
  GPIOPadConfigSet(ui32Port, ui8Pins, 0x00000001, 0x00000008);
}


x86 assembly (clang, -O0):
<GPIOPinTypeKBRow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    $0x2,%edx
call   1040 <GPIODirModeSet@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    $0x1,%edx
mov    $0x8,%ecx
call   1030 <GPIOPadConfigSet@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GPIOPinTypeKBRow>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    $0x2,%edx
call   1040 <GPIODirModeSet@plt>
mov    %ebp,%edi
mov    %ebx,%esi
mov    $0x1,%edx
mov    $0x8,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <GPIOPadConfigSet@plt>

LLVM IR (-O0):
define void @GPIOPinTypeKBRow(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 @GPIODirModeSet(i32 %5, i32 %6, i32 2)
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = call i32 @GPIOPadConfigSet(i32 %8, i32 %9, i32 1, i32 8)
ret void
}

LLVM IR (-O2):
define void @GPIOPinTypeKBRow(i32 %0, i32 %1) {
%3 = tail call i32 @GPIODirModeSet(i32 %0, i32 %1, i32 2)
%4 = tail call i32 @GPIOPadConfigSet(i32 %0, i32 %1, i32 1, i32 8)
ret void
}
/* Type definitions */
struct oscap_stringlist_iterator {
  int dummy;
};
struct oscap_iterator {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ oscap_iterator_detach(struct oscap_iterator *);
int /*<<< orphan*/ oscap_stringlist_free(int /*<<< orphan*/);
void oscap_stringlist_iterator_remove(struct oscap_stringlist_iterator *it) {
  oscap_stringlist_free(oscap_iterator_detach(((struct oscap_iterator *)(it))));
}


x86 assembly (clang, -O0):
<oscap_stringlist_iterator_remove>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <oscap_iterator_detach@plt>
mov    %eax,%edi
call   1040 <oscap_stringlist_free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<oscap_stringlist_iterator_remove>:
push   %rax
call   1030 <oscap_iterator_detach@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <oscap_stringlist_free@plt>

LLVM IR (-O0):
%struct.oscap_stringlist_iterator = type { i32 }
%struct.oscap_iterator = type { i32 }
define void @oscap_stringlist_iterator_remove(%struct.oscap_stringlist_iterator* %0) {
%2 = alloca %struct.oscap_stringlist_iterator*
store %struct.oscap_stringlist_iterator* %0, %struct.oscap_stringlist_iterator** %2
%3 = load %struct.oscap_stringlist_iterator*, %struct.oscap_stringlist_iterator** %2
%4 = bitcast %struct.oscap_stringlist_iterator* %3 to %struct.oscap_iterator*
%5 = call i32 @oscap_iterator_detach(%struct.oscap_iterator* %4)
%6 = call i32 @oscap_stringlist_free(i32 %5)
ret void
}

LLVM IR (-O2):
%struct.oscap_stringlist_iterator = type { i32 }
%struct.oscap_iterator = type { i32 }
define void @oscap_stringlist_iterator_remove(%struct.oscap_stringlist_iterator* %0) {
%2 = bitcast %struct.oscap_stringlist_iterator* %0 to %struct.oscap_iterator*
%3 = tail call i32 @oscap_iterator_detach(%struct.oscap_iterator* %2)
%4 = tail call i32 @oscap_stringlist_free(i32 %3)
ret void
}
void XtCreateWindow() {}


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

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

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

LLVM IR (-O2):
define void @XtCreateWindow() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ LD_A_I();
int /*<<< orphan*/ T_WAIT_UNTIL(int);
void op_ED_0x57(void) {
  LD_A_I();
  T_WAIT_UNTIL(5);
  return;
}


x86 assembly (clang, -O0):
<op_ED_0x57>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <LD_A_I@plt>
mov    $0x5,%edi
call   1040 <T_WAIT_UNTIL@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<op_ED_0x57>:
push   %rax
xor    %eax,%eax
call   1030 <LD_A_I@plt>
mov    $0x5,%edi
pop    %rax
jmp    1040 <T_WAIT_UNTIL@plt>

LLVM IR (-O0):
define void @op_ED_0x57() {
%1 = call i32 (...) @LD_A_I()
%2 = call i32 @T_WAIT_UNTIL(i32 5)
ret void
}

LLVM IR (-O2):
define void @op_ED_0x57() {
%1 = tail call i32 (...) @LD_A_I()
%2 = tail call i32 @T_WAIT_UNTIL(i32 5)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
int __wcslen(int /*<<< orphan*/ const *);
void *malloc(size_t);
scalar_t__ memcpy(void *, void *, size_t);
wchar_t *wcsdup(const wchar_t *s) {
  size_t len = (__wcslen(s) + 1) * sizeof(wchar_t);
  void *new = malloc(len);
  if (new == NULL)
    return NULL;
  return (wchar_t *)memcpy(new, (void *)s, len);
}


x86 assembly (clang, -O0):
<wcsdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <__wcslen@plt>
add    $0x1,%eax
cltq
shl    $0x2,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1177 <wcsdup+0x47>
movq   $0x0,-0x8(%rbp)
jmp    118c <wcsdup+0x5c>
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <memcpy@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wcsdup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1050 <__wcslen@plt>
cltq
lea    0x4(,%rax,4),%rbx
mov    %rbx,%rdi
call   1040 <malloc@plt>
test   %rax,%rax
je     1163 <wcsdup+0x33>
mov    %rax,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1030 <memcpy@plt>
jmp    1165 <wcsdup+0x35>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32* @wcsdup(i32* %0) {
%2 = alloca i32*
%3 = alloca i32*
%4 = alloca i64
%5 = alloca i8*
store i32* %0, i32** %3
%6 = load i32*, i32** %3
%7 = call i32 @__wcslen(i32* %6)
%8 = add nsw i32 %7, 1
%9 = sext i32 %8 to i64
%10 = mul i64 %9, 4
store i64 %10, i64* %4
%11 = load i64, i64* %4
%12 = call i8* @malloc(i64 %11)
store i8* %12, i8** %5
%13 = load i8*, i8** %5
%14 = icmp eq i8* %13, null
br i1 %14, label %15, label %16
15: ; preds = %1
store i32* null, i32** %2
br label %23
16: ; preds = %1
%17 = load i8*, i8** %5
%18 = load i32*, i32** %3
%19 = bitcast i32* %18 to i8*
%20 = load i64, i64* %4
%21 = call i64 @memcpy(i8* %17, i8* %19, i64 %20)
%22 = inttoptr i64 %21 to i32*
store i32* %22, i32** %2
br label %23
23: ; preds = %16, %15
%24 = load i32*, i32** %2
ret i32* %24
}

LLVM IR (-O2):
define i32* @wcsdup(i32* %0) {
%2 = tail call i32 @__wcslen(i32* %0)
%3 = add nsw i32 %2, 1
%4 = sext i32 %3 to i64
%5 = shl nsw i64 %4, 2
%6 = tail call i8* @malloc(i64 %5)
%7 = icmp eq i8* %6, null
br i1 %7, label %12, label %8
8: ; preds = %1
%9 = bitcast i32* %0 to i8*
%10 = tail call i64 @memcpy(i8* %6, i8* %9, i64 %5)
%11 = inttoptr i64 %10 to i32*
br label %12
12: ; preds = %1, %8
%13 = phi i32* [ %11, %8 ], [ null, %1 ]
ret i32* %13
}
/* Variables and functions */
int md5_file(char const *, unsigned char *);
int /*<<< orphan*/ write_hex(unsigned char *, char *);
int md5_file_hex(const char *path, char *output) {
  unsigned char out[16];
  int rtn;
  rtn = md5_file(path, out);
  if (rtn)
    return rtn;
  write_hex(out, output);
  return rtn;
}


x86 assembly (clang, -O0):
<md5_file_hex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x30(%rbp),%rsi
call   1030 <md5_file@plt>
mov    %eax,-0x34(%rbp)
cmpl   $0x0,-0x34(%rbp)
je     1155 <md5_file_hex+0x35>
mov    -0x34(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1168 <md5_file_hex+0x48>
lea    -0x30(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <write_hex@plt>
mov    -0x34(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<md5_file_hex>:
push   %rbp
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%rbx
mov    %rsp,%rsi
call   1030 <md5_file@plt>
mov    %eax,%ebp
test   %eax,%eax
jne    1142 <md5_file_hex+0x22>
mov    %rsp,%rdi
mov    %rbx,%rsi
call   1040 <write_hex@plt>
mov    %ebp,%eax
add    $0x18,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @md5_file_hex(i8* %0, i8* %1) {
%3 = alloca [16 x i8]
%4 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%5 = call i32 @md5_file(i8* %0, i8* %4)
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = call i32 @write_hex(i8* %4, i8* %1)
br label %9
9: ; preds = %2, %7
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0xc5() {
  Assert_real((isspace(197) == 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_isspace.c",
              990, ("isspace should be 0 for 0xc5"));
}


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

x86 assembly (clang, -O2):
<t_isspace_0xc5>:
push   %rax
mov    $0xc5,%edi
call   1030 <isspace@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x3de,%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_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0xc5\00"
define void @t_isspace_0xc5() {
%1 = call i64 @isspace(i32 197)
%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 990, 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_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0xc5\00"
define void @t_isspace_0xc5() {
%1 = tail call i64 @isspace(i32 197)
%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 990, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void ft_ultimate_div_mod(int *a, int *b) {
  int temp;
  temp = *a / *b;
  *b = *a % *b;
  *a = temp;
}


x86 assembly (clang, -O0):
<ft_ultimate_div_mod>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    -0x10(%rbp),%rcx
cltd
idivl  (%rcx)
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    -0x10(%rbp),%rcx
cltd
idivl  (%rcx)
mov    -0x10(%rbp),%rax
mov    %edx,(%rax)
mov    -0x14(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_ultimate_div_mod>:
mov    (%rdi),%eax
cltd
idivl  (%rsi)
mov    %edx,(%rsi)
mov    %eax,(%rdi)
ret

LLVM IR (-O0):
define void @ft_ultimate_div_mod(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
%6 = load i32*, i32** %3
%7 = load i32, i32* %6
%8 = load i32*, i32** %4
%9 = load i32, i32* %8
%10 = sdiv i32 %7, %9
store i32 %10, i32* %5
%11 = load i32*, i32** %3
%12 = load i32, i32* %11
%13 = load i32*, i32** %4
%14 = load i32, i32* %13
%15 = srem i32 %12, %14
%16 = load i32*, i32** %4
store i32 %15, i32* %16
%17 = load i32, i32* %5
%18 = load i32*, i32** %3
store i32 %17, i32* %18
ret void
}

LLVM IR (-O2):
define void @ft_ultimate_div_mod(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
%5 = sdiv i32 %3, %4
%6 = srem i32 %3, %4
store i32 %6, i32* %1
store i32 %5, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __CRAB_assert(int);
int /*<<< orphan*/ f(int volatile *, int volatile *);
int main() {
  volatile int x;
  volatile int y;
  f(&x, &y);
  __CRAB_assert(x == 1);
  __CRAB_assert(y == 2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   1030 <f@plt>
mov    -0x8(%rbp),%eax
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <__CRAB_assert@plt>
mov    -0xc(%rbp),%eax
cmp    $0x2,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <__CRAB_assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0x4(%rsp),%rdi
mov    %rsp,%rsi
call   1030 <f@plt>
mov    0x4(%rsp),%eax
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
call   1040 <__CRAB_assert@plt>
mov    (%rsp),%eax
xor    %edi,%edi
cmp    $0x2,%eax
sete   %dil
call   1040 <__CRAB_assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 @f(i32* %2, i32* %3)
%5 = load volatile i32, i32* %2
%6 = icmp eq i32 %5, 1
%7 = zext i1 %6 to i32
%8 = call i32 @__CRAB_assert(i32 %7)
%9 = load volatile i32, i32* %3
%10 = icmp eq i32 %9, 2
%11 = zext i1 %10 to i32
%12 = call i32 @__CRAB_assert(i32 %11)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @f(i32* %1, i32* %2)
%6 = load volatile i32, i32* %1
%7 = icmp eq i32 %6, 1
%8 = zext i1 %7 to i32
%9 = call i32 @__CRAB_assert(i32 %8)
%10 = load volatile i32, i32* %2
%11 = icmp eq i32 %10, 2
%12 = zext i1 %11 to i32
%13 = call i32 @__CRAB_assert(i32 %12)
ret i32 0
}
void copy(void) {
  int i = 0;
  extern char line[], longest[];
  while ((longest[i] = line[i]) != '\0')
    ++i;
}


x86 assembly (clang, -O0):
<copy>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movslq -0x4(%rbp),%rcx
mov    0x2ed2(%rip),%rax
mov    (%rax,%rcx,1),%al
movslq -0x4(%rbp),%rdx
mov    0x2eb4(%rip),%rcx
mov    %al,(%rcx,%rdx,1)
movsbl %al,%eax
cmp    $0x0,%eax
je     1141 <copy+0x41>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110b <copy+0xb>
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy>:
xor    %eax,%eax
mov    0x2edf(%rip),%rsi
mov    0x2ec8(%rip),%rdx
movzbl (%rsi,%rax,1),%ecx
mov    %cl,(%rdx,%rax,1)
add    $0x1,%rax
test   %cl,%cl
jne    1110 <copy+0x10>
ret

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

LLVM IR (-O2):
@line = external global [0 x i8]
@longest = external global [0 x i8]
define void @copy() {
br label %1
1: ; preds = %1, %0
%2 = phi i64 [ %7, %1 ], [ 0, %0 ]
%3 = getelementptr inbounds [0 x i8], [0 x i8]* @line, i64 0, i64 %2
%4 = load i8, i8* %3
%5 = getelementptr inbounds [0 x i8], [0 x i8]* @longest, i64 0, i64 %2
store i8 %4, i8* %5
%6 = icmp eq i8 %4, 0
%7 = add nuw i64 %2, 1
br i1 %6, label %8, label %1
8: ; preds = %1
ret void
}
unsigned int get_slice_psize(struct mm_struct *mm, unsigned long addr) {
  return 0;
}


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

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

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

LLVM IR (-O2):
%struct.mm_struct = type opaque
define i32 @get_slice_psize(%struct.mm_struct* nocapture readnone %0, i64 %1) {
ret i32 0
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int ck(int, int, int);
uint64_t check(uint64_t z) {
  uint64_t ck1 = ck(3, 2, z);
  uint64_t ck2 = ck(3, 2, z << 24);
  ck1 &= 0x00000000FFFFFF000000;
  ck2 &= 0x00000000FFFFFF000000;
  return ck1 | ck2 >> 24;
}


x86 assembly (clang, -O0):
<check>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
mov    $0x3,%edi
mov    $0x2,%esi
call   1030 <ck@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edx
shl    $0x18,%edx
mov    $0x3,%edi
mov    $0x2,%esi
call   1030 <ck@plt>
mov    %eax,-0xc(%rbp)
movslq -0x8(%rbp),%rax
movabs $0xffffff000000,%rcx
and    %rcx,%rax
mov    %eax,-0x8(%rbp)
movslq -0xc(%rbp),%rax
movabs $0xffffff000000,%rcx
and    %rcx,%rax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
sar    $0x18,%ecx
or     %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
mov    $0x3,%edi
mov    $0x2,%esi
mov    %ebx,%edx
call   1030 <ck@plt>
mov    %eax,%ebp
shl    $0x18,%ebx
mov    $0x3,%edi
mov    $0x2,%esi
mov    %ebx,%edx
call   1030 <ck@plt>
and    $0xff000000,%ebp
sar    $0x18,%eax
or     %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @check(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = call i32 @ck(i32 3, i32 2, i32 %5)
store i32 %6, i32* %3
%7 = load i32, i32* %2
%8 = shl i32 %7, 24
%9 = call i32 @ck(i32 3, i32 2, i32 %8)
store i32 %9, i32* %4
%10 = load i32, i32* %3
%11 = sext i32 %10 to i64
%12 = and i64 %11, 281474959933440
%13 = trunc i64 %12 to i32
store i32 %13, i32* %3
%14 = load i32, i32* %4
%15 = sext i32 %14 to i64
%16 = and i64 %15, 281474959933440
%17 = trunc i64 %16 to i32
store i32 %17, i32* %4
%18 = load i32, i32* %3
%19 = load i32, i32* %4
%20 = ashr i32 %19, 24
%21 = or i32 %18, %20
ret i32 %21
}

LLVM IR (-O2):
define i32 @check(i32 %0) {
%2 = tail call i32 @ck(i32 3, i32 2, i32 %0)
%3 = shl i32 %0, 24
%4 = tail call i32 @ck(i32 3, i32 2, i32 %3)
%5 = and i32 %2, -16777216
%6 = ashr i32 %4, 24
%7 = or i32 %6, %5
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char const *);
int strlen(char const *);
size_t lirc_getsocketname(const char *filename, char *buf, size_t size) {
  if (strlen(filename) + 2 <= size) {
    strcpy(buf, filename);
    strcat(buf, "d");
  }
  return strlen(filename) + 2;
}


x86 assembly (clang, -O0):
<lirc_getsocketname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
add    $0x2,%eax
cltq
cmp    -0x18(%rbp),%rax
ja     1179 <lirc_getsocketname+0x49>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rdi
lea    0xe8c(%rip),%rsi
call   1050 <strcat@plt>
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
add    $0x2,%eax
cltq
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lirc_getsocketname>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r15
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <strlen@plt>
add    $0x2,%eax
cltq
cmp    %r15,%rax
ja     1167 <lirc_getsocketname+0x37>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <strcpy@plt>
lea    0xea1(%rip),%rsi
mov    %r14,%rdi
call   1050 <strcat@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
add    $0x2,%eax
cltq
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c"d\00"
define i64 @lirc_getsocketname(i8* %0, i8* %1, i64 %2) {
%4 = tail call i32 @strlen(i8* %0)
%5 = add nsw i32 %4, 2
%6 = sext i32 %5 to i64
%7 = icmp ugt i64 %6, %2
br i1 %7, label %11, label %8
8: ; preds = %3
%9 = tail call i32 @strcpy(i8* %1, i8* %0)
%10 = tail call i32 @strcat(i8* %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %8, %3
%12 = tail call i32 @strlen(i8* %0)
%13 = add nsw i32 %12, 2
%14 = sext i32 %13 to i64
ret i64 %14
}
/* Variables and functions */
int /*<<< orphan*/ find_combinations(int *, int, int);
int main(int argc, char *argv[]) {
  int arr[5];
  int i = 0;
  for (; i < 5; i++)
    arr[i] = i + 1;
  find_combinations(arr, 5, 3);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x34(%rbp)
cmpl   $0x5,-0x34(%rbp)
jge    1153 <main+0x43>
mov    -0x34(%rbp),%ecx
add    $0x1,%ecx
movslq -0x34(%rbp),%rax
mov    %ecx,-0x30(%rbp,%rax,4)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    112d <main+0x1d>
lea    -0x30(%rbp),%rdi
mov    $0x5,%esi
mov    $0x3,%edx
call   1030 <find_combinations@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movaps 0xee5(%rip),%xmm0
movaps %xmm0,(%rsp)
movl   $0x5,0x10(%rsp)
mov    %rsp,%rdi
mov    $0x5,%esi
mov    $0x3,%edx
call   1030 <find_combinations@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [5 x i32]
%4 = bitcast [5 x i32]* %3 to i8*
%5 = getelementptr inbounds [5 x i32], [5 x i32]* %3, i64 0, i64 0
%6 = bitcast [5 x i32]* %3 to <4 x i32>*
store <4 x i32> <i32 1, i32 2, i32 3, i32 4>, <4 x i32>* %6
%7 = getelementptr inbounds [5 x i32], [5 x i32]* %3, i64 0, i64 4
store i32 5, i32* %7
%8 = call i32 @find_combinations(i32* %5, i32 5, i32 3)
ret i32 0
}
double relugrad(double y) { return y > 0; }


x86 assembly (clang, -O0):
<relugrad>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
cvtsi2sd %eax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<relugrad>:
xorpd  %xmm1,%xmm1
cmpltsd %xmm0,%xmm1
movsd  0xeef(%rip),%xmm0
andpd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @relugrad(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp ogt double %3, 0.000000e+00
%5 = zext i1 %4 to i32
%6 = sitofp i32 %5 to double
ret double %6
}

LLVM IR (-O2):
define double @relugrad(double %0) {
%2 = fcmp ogt double %0, 0.000000e+00
%3 = uitofp i1 %2 to double
ret double %3
}
void gtk_image_get_icon_set() {}


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

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

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

LLVM IR (-O2):
define void @gtk_image_get_icon_set() {
ret void
}
/* Variables and functions */
void *realloc(void *, size_t);
void *__xrealloc(void *ptr, size_t size, char *file, int line) {
  return realloc(ptr, size);
}


x86 assembly (clang, -O0):
<__xrealloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <realloc@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__xrealloc>:
jmp    1030 <realloc@plt>

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

LLVM IR (-O2):
define noalias i8* @__xrealloc(i8* nocapture %0, i64 %1, i8* nocapture readnone %2, i32 %3) {
%5 = tail call i8* @realloc(i8* %0, i64 %1)
ret i8* %5
}