xunge/DecIR huggingface dataset:
void rdar9612060(void) { printf("%s", 2); }


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

x86 assembly (clang, -O2):
<rdar9612060>:
lea    0xee9(%rip),%rdi
mov    $0x2,%esi
xor    %eax,%eax
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @rdar9612060() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 2)
ret void
}
int test_imm_3Duint16_reg(unsigned short val) {
  return ((val) & (-0x3D << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_3Duint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edx
and    $0xffffffc3,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_3Duint16_reg>:
test   $0xffc3,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_3Duint16_reg(i16 zeroext %0) {
%2 = and i16 %0, -61
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int test_imm_45uint32_mem(unsigned int *val) {
  return ((*val) & (0x45 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_45uint32_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edx
and    $0x45,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_45uint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 69
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int is_zipcode_name(char *name) {
  if (name[0] >= '1' && name[0] <= '4' && name[1] == '!')
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<is_zipcode_name>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x31,%eax
jl     1145 <is_zipcode_name+0x45>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x34,%eax
jg     1145 <is_zipcode_name+0x45>
mov    -0x10(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x21,%eax
jne    1145 <is_zipcode_name+0x45>
movl   $0x1,-0x4(%rbp)
jmp    114c <is_zipcode_name+0x4c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_zipcode_name>:
mov    (%rdi),%al
add    $0xcf,%al
cmp    $0x3,%al
ja     1113 <is_zipcode_name+0x13>
mov    $0x1,%eax
cmpb   $0x21,0x1(%rdi)
je     1115 <is_zipcode_name+0x15>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @is_zipcode_name(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = add i8 %2, -49
%4 = icmp ult i8 %3, 4
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = getelementptr inbounds i8, i8* %0, i64 1
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 33
br i1 %8, label %10, label %9
9: ; preds = %5, %1
br label %10
10: ; preds = %5, %9
%11 = phi i32 [ 0, %9 ], [ 1, %5 ]
ret i32 %11
}
void dummy_sse() {}


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

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

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

LLVM IR (-O2):
define void @dummy_sse() {
ret void
}
/* Variables and functions */
int yas_bma250_read_reg(unsigned char, unsigned char *, int);
int yas_bma250_read_reg_byte(unsigned char adr) {
  unsigned char buf = 0xff;
  int err;
  err = yas_bma250_read_reg(adr, &buf, 1);
  if (err == 0) {
    return buf;
  }
  return 0;
}


x86 assembly (clang, -O0):
<yas_bma250_read_reg_byte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movb   $0xff,-0x6(%rbp)
lea    -0x6(%rbp),%rsi
mov    $0x1,%edx
movzbl -0x5(%rbp),%edi
call   1030 <yas_bma250_read_reg@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    114d <yas_bma250_read_reg_byte+0x3d>
movzbl -0x6(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1154 <yas_bma250_read_reg_byte+0x44>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yas_bma250_read_reg_byte>:
push   %rax
movb   $0xff,0x7(%rsp)
lea    0x7(%rsp),%rsi
mov    $0x1,%edx
call   1030 <yas_bma250_read_reg@plt>
xor    %ecx,%ecx
test   %eax,%eax
movzbl 0x7(%rsp),%eax
cmovne %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @yas_bma250_read_reg_byte(i8 zeroext %0) {
%2 = alloca i8
store i8 -1, i8* %2
%3 = call i32 @yas_bma250_read_reg(i8 zeroext %0, i8* %2, i32 1)
%4 = icmp eq i32 %3, 0
%5 = load i8, i8* %2
%6 = zext i8 %5 to i32
%7 = select i1 %4, i32 %6, i32 0
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ const uint8_t;

/* Variables and functions */
uint8_t
hfp_subevent_sudirriber_number_information_get_bnip_type(const uint8_t *event) {
  return event[4];
}


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

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

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

LLVM IR (-O2):
define i32 @hfp_subevent_sudirriber_number_information_get_bnip_type(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 4
%3 = load i32, i32* %2
ret i32 %3
}
int xmlUCSIsTags(int code) {
  return (((code >= 0xE0000) && (code <= 0xE007F)));
}


x86 assembly (clang, -O0):
<xmlUCSIsTags>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0xe0000,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1126 <xmlUCSIsTags+0x26>
cmpl   $0xe007f,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmlUCSIsTags>:
and    $0xffffff80,%edi
xor    %eax,%eax
cmp    $0xe0000,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @xmlUCSIsTags(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 917504
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 917631
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 @xmlUCSIsTags(i32 %0) {
%2 = and i32 %0, -128
%3 = icmp eq i32 %2, 917504
%4 = zext i1 %3 to i32
ret i32 %4
}
int updateLoadAvg(void) { return (0); }


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

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

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

LLVM IR (-O2):
define i32 @updateLoadAvg() {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ wctrans_t;
typedef int /*<<< orphan*/ locale_t;

/* Variables and functions */
int /*<<< orphan*/ wctrans(char const *);
wctrans_t wctrans_l(const char *s, locale_t l) { return wctrans(s); }


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

x86 assembly (clang, -O2):
<wctrans_l>:
jmp    1030 <wctrans@plt>

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

LLVM IR (-O2):
define i32 @wctrans_l(i8* %0, i32 %1) {
%3 = tail call i32 @wctrans(i8* %0)
ret i32 %3
}
/* Variables and functions */
char *message();
int /*<<< orphan*/ printf(char *, char *);
int main(void) {
  printf("%s\n", message());
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = tail call i8* (...) @message()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %1)
ret i32 0
}
double gpei(x, y, p)
double x, y;
double *p;
{ return ((p[6] * x * y) - (p[5] * y)); }


x86 assembly (clang, -O0):
<gpei>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    %rdi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x30(%rax),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
mov    -0x18(%rbp),%rax
movsd  0x28(%rax),%xmm1
mulsd  -0x10(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<gpei>:
mulsd  0x30(%rdi),%xmm0
movsd  0x28(%rdi),%xmm2
mulsd  %xmm1,%xmm2
mulsd  %xmm1,%xmm0
subsd  %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @gpei(double %0, double %1, double* %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double*
store double %0, double* %4
store double %1, double* %5
store double* %2, double** %6
%7 = load double*, double** %6
%8 = getelementptr inbounds double, double* %7, i64 6
%9 = load double, double* %8
%10 = load double, double* %4
%11 = fmul double %9, %10
%12 = load double, double* %5
%13 = load double*, double** %6
%14 = getelementptr inbounds double, double* %13, i64 5
%15 = load double, double* %14
%16 = load double, double* %5
%17 = fmul double %15, %16
%18 = fneg double %17
%19 = call double @llvm.fmuladd.f64(double %11, double %12, double %18)
ret double %19
}

LLVM IR (-O2):
define double @gpei(double %0, double %1, double* nocapture %2) {
%4 = getelementptr inbounds double, double* %2, i64 6
%5 = load double, double* %4
%6 = fmul double %5, %0
%7 = getelementptr inbounds double, double* %2, i64 5
%8 = load double, double* %7
%9 = fneg double %8
%10 = fmul double %9, %1
%11 = tail call double @llvm.fmuladd.f64(double %6, double %1, double %10)
ret double %11
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void *malloc(int);
void *my_malloc(int bytes) {
  void *p;
  if (p = malloc(bytes))
    return p;
  else
    exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<my_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
je     114b <my_malloc+0x2b>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret
mov    0x2e8e(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<my_malloc>:
push   %rax
call   1030 <malloc@plt>
test   %rax,%rax
je     112d <my_malloc+0xd>
pop    %rcx
ret
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
define i8* @my_malloc(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i8* @malloc(i32 %4)
store i8* %5, i8** %3
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = load i8*, i8** %3
ret i8* %8
9: ; preds = %1
%10 = load i32, i32* @EXIT_FAILURE
%11 = call i32 @exit(i32 %10)
unreachable
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
define noalias i8* @my_malloc(i32 %0) {
%2 = tail call i8* @malloc(i32 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %5, label %4
4: ; preds = %1
ret i8* %2
5: ; preds = %1
%6 = load i32, i32* @EXIT_FAILURE
%7 = tail call i32 @exit(i32 %6)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ getch();
int /*<<< orphan*/ mvprintw(int, int, char *);
int /*<<< orphan*/ refresh();
void AnyKey() {
  mvprintw(23, 24, "<< Press Any Key To Continue >>");
  refresh();
  getch();
}


x86 assembly (clang, -O0):
<AnyKey>:
push   %rbp
mov    %rsp,%rbp
mov    $0x17,%edi
mov    $0x18,%esi
lea    0xebb(%rip),%rdx
call   1050 <mvprintw@plt>
mov    $0x0,%al
call   1030 <refresh@plt>
mov    $0x0,%al
call   1040 <getch@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<AnyKey>:
push   %rax
lea    0xec8(%rip),%rdx
mov    $0x17,%edi
mov    $0x18,%esi
call   1050 <mvprintw@plt>
xor    %eax,%eax
call   1030 <refresh@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <getch@plt>

LLVM IR (-O0):
@.str = [32 x i8] c"<< Press Any Key To Continue >>\00"
define void @AnyKey() {
%1 = call i32 @mvprintw(i32 23, i32 24, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @refresh()
%3 = call i32 (...) @getch()
ret void
}

LLVM IR (-O2):
@.str = [32 x i8] c"<< Press Any Key To Continue >>\00"
define void @AnyKey() {
%1 = tail call i32 @mvprintw(i32 23, i32 24, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @refresh()
%3 = tail call i32 (...) @getch()
ret void
}
void kml_read(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *);
void print_version(FILE *hFile) {
  char *str = "The Sleuth Kit";
  fprintf(hFile, "%s\n", str);
  return;
}


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

x86 assembly (clang, -O2):
<print_version>:
lea    0xef8(%rip),%rsi
lea    0xee2(%rip),%rdx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"The Sleuth Kit\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define void @print_version(i32* %0) {
%2 = alloca i32*
%3 = alloca i8*
store i32* %0, i32** %2
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8** %3
%4 = load i32*, i32** %2
%5 = load i8*, i8** %3
%6 = call i32 @fprintf(i32* %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %5)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"The Sleuth Kit\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define void @print_version(i32* nocapture %0) {
%2 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}
double pathconN_nm10_twice(double x) { return x + x; }


x86 assembly (clang, -O0):
<pathconN_nm10_twice>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
addsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<pathconN_nm10_twice>:
addsd  %xmm0,%xmm0
ret

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

LLVM IR (-O2):
define double @pathconN_nm10_twice(double %0) {
%2 = fadd double %0, %0
ret double %2
}
char const *statefs_provider_accessor() { return "statefs_provider_get"; }


x86 assembly (clang, -O0):
<statefs_provider_accessor>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<statefs_provider_accessor>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [21 x i8] c"statefs_provider_get\00"
define i8* @statefs_provider_accessor() {
ret i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [21 x i8] c"statefs_provider_get\00"
define i8* @statefs_provider_accessor() {
ret i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0)
}
void foo16() {}


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

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

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

LLVM IR (-O2):
define void @foo16() {
ret void
}
/* Type definitions */
struct notify_node {
  int dummy;
};

/* Variables and functions */
int init_notify_list(struct notify_node **n) {
  (*n) = NULL;
  return 0;
}


x86 assembly (clang, -O0):
<init_notify_list>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_notify_list>:
movq   $0x0,(%rdi)
xor    %eax,%eax
ret

LLVM IR (-O0):
%struct.notify_node = type { i32 }
define i32 @init_notify_list(%struct.notify_node** %0) {
%2 = alloca %struct.notify_node**
store %struct.notify_node** %0, %struct.notify_node*** %2
%3 = load %struct.notify_node**, %struct.notify_node*** %2
store %struct.notify_node* null, %struct.notify_node** %3
ret i32 0
}

LLVM IR (-O2):
%struct.notify_node = type { i32 }
define i32 @init_notify_list(%struct.notify_node** nocapture writeonly %0) {
store %struct.notify_node* null, %struct.notify_node** %0
ret i32 0
}
/* Type definitions */
struct list_head_t {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ INIT_LIST_HEAD(struct list_head_t *);
int /*<<< orphan*/ list_replace(struct list_head_t *, struct list_head_t *);
void list_replace_init(struct list_head_t *old, struct list_head_t *new) {
  list_replace(old, new);
  INIT_LIST_HEAD(old);
}


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

x86 assembly (clang, -O2):
<list_replace_init>:
push   %rbx
mov    %rdi,%rbx
call   1040 <list_replace@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <INIT_LIST_HEAD@plt>

LLVM IR (-O0):
%struct.list_head_t = type { i32 }
define void @list_replace_init(%struct.list_head_t* %0, %struct.list_head_t* %1) {
%3 = alloca %struct.list_head_t*
%4 = alloca %struct.list_head_t*
store %struct.list_head_t* %0, %struct.list_head_t** %3
store %struct.list_head_t* %1, %struct.list_head_t** %4
%5 = load %struct.list_head_t*, %struct.list_head_t** %3
%6 = load %struct.list_head_t*, %struct.list_head_t** %4
%7 = call i32 @list_replace(%struct.list_head_t* %5, %struct.list_head_t* %6)
%8 = load %struct.list_head_t*, %struct.list_head_t** %3
%9 = call i32 @INIT_LIST_HEAD(%struct.list_head_t* %8)
ret void
}

LLVM IR (-O2):
%struct.list_head_t = type { i32 }
define void @list_replace_init(%struct.list_head_t* %0, %struct.list_head_t* %1) {
%3 = tail call i32 @list_replace(%struct.list_head_t* %0, %struct.list_head_t* %1)
%4 = tail call i32 @INIT_LIST_HEAD(%struct.list_head_t* %0)
ret void
}
void chaz_ConfWriterRuby_add_global_def(const char *sym, const char *value) {
  (void)sym;
  (void)value;
}


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

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

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

LLVM IR (-O2):
define void @chaz_ConfWriterRuby_add_global_def(i8* nocapture %0, i8* nocapture %1) {
ret void
}
void __attribute__((no, noclone)) foo(int *p) { *p = 1; }


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

x86 assembly (clang, -O2):
<foo>:
movl   $0x1,(%rdi)
ret

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

LLVM IR (-O2):
define void @foo(i32* nocapture writeonly %0) {
store i32 1, i32* %0
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ wint_t;
struct _Locale_ctype {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ towlower(int /*<<< orphan*/);
wint_t _WLocale_tolower(struct _Locale_ctype *lctype
                        __attribute__((__unused__)),
                        wint_t wc) {
  return towlower(wc);
}


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

x86 assembly (clang, -O2):
<_WLocale_tolower>:
mov    %esi,%edi
jmp    1030 <towlower@plt>

LLVM IR (-O0):
%struct._Locale_ctype = type { i32 }
define i32 @_WLocale_tolower(%struct._Locale_ctype* %0, i32 %1) {
%3 = alloca %struct._Locale_ctype*
%4 = alloca i32
store %struct._Locale_ctype* %0, %struct._Locale_ctype** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = call i32 @towlower(i32 %5)
ret i32 %6
}

LLVM IR (-O2):
%struct._Locale_ctype = type { i32 }
define i32 @_WLocale_tolower(%struct._Locale_ctype* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @towlower(i32 %1)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ X509_ALGOR;
typedef int /*<<< orphan*/ EVP_CIPHER;

/* Variables and functions */
int /*<<< orphan*/ *PKCS5_pbe2_set_iv(int /*<<< orphan*/ const *, int,
                                      unsigned char *, int,
                                      int /*<<< orphan*/ *, int);
X509_ALGOR *PKCS5_pbe2_set(const EVP_CIPHER *cipher, int iter,
                           unsigned char *salt, int saltlen) {
  return PKCS5_pbe2_set_iv(cipher, iter, salt, saltlen, NULL, -1);
}


x86 assembly (clang, -O0):
<PKCS5_pbe2_set>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
xor    %eax,%eax
mov    %eax,%r8d
mov    $0xffffffff,%r9d
call   1030 <PKCS5_pbe2_set_iv@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PKCS5_pbe2_set>:
xor    %r8d,%r8d
mov    $0xffffffff,%r9d
jmp    1030 <PKCS5_pbe2_set_iv@plt>

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

LLVM IR (-O2):
define i32* @PKCS5_pbe2_set(i32* %0, i32 %1, i8* %2, i32 %3) {
%5 = tail call i32* @PKCS5_pbe2_set_iv(i32* %0, i32 %1, i8* %2, i32 %3, i32* null, i32 -1)
ret i32* %5
}
delay_loop(unsigned char u8delay) {
  volatile unsigned char ii, jj;
  for (jj = 0; jj < u8delay; jj++)
    for (ii = 0; ii < 200; ii++)
      ;
}


x86 assembly (clang, -O0):
<delay_loop>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movb   $0x0,-0x7(%rbp)
mov    -0x7(%rbp),%al
movzbl %al,%eax
movzbl -0x5(%rbp),%ecx
cmp    %ecx,%eax
jge    1159 <delay_loop+0x59>
movb   $0x0,-0x6(%rbp)
mov    -0x6(%rbp),%al
movzbl %al,%eax
cmp    $0xc8,%eax
jge    1147 <delay_loop+0x47>
jmp    113a <delay_loop+0x3a>
mov    -0x6(%rbp),%al
add    $0x1,%al
mov    %al,-0x6(%rbp)
jmp    1124 <delay_loop+0x24>
jmp    114c <delay_loop+0x4c>
mov    -0x7(%rbp),%al
add    $0x1,%al
mov    %al,-0x7(%rbp)
jmp    110e <delay_loop+0xe>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<delay_loop>:
movb   $0x0,-0x2(%rsp)
jmp    1115 <delay_loop+0x15>
nopw   0x0(%rax,%rax,1)
addb   $0x1,-0x2(%rsp)
mov    -0x2(%rsp),%al
cmp    %dil,%al
jae    1140 <delay_loop+0x40>
movb   $0x0,-0x1(%rsp)
mov    -0x1(%rsp),%al
cmp    $0xc7,%al
ja     1110 <delay_loop+0x10>
nopl   0x0(%rax,%rax,1)
addb   $0x1,-0x1(%rsp)
movzbl -0x1(%rsp),%eax
cmp    $0xc8,%al
jb     1130 <delay_loop+0x30>
jmp    1110 <delay_loop+0x10>
ret

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

LLVM IR (-O2):
define i32 @delay_loop(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca i8
store volatile i8 0, i8* %3
%4 = load volatile i8, i8* %3
%5 = icmp ult i8 %4, %0
br i1 %5, label %6, label %19
6: ; preds = %1, %14
store volatile i8 0, i8* %2
%7 = load volatile i8, i8* %2
%8 = icmp ult i8 %7, -56
br i1 %8, label %9, label %14
9: ; preds = %6, %9
%10 = load volatile i8, i8* %2
%11 = add i8 %10, 1
store volatile i8 %11, i8* %2
%12 = load volatile i8, i8* %2
%13 = icmp ult i8 %12, -56
br i1 %13, label %9, label %14
14: ; preds = %9, %6
%15 = load volatile i8, i8* %3
%16 = add i8 %15, 1
store volatile i8 %16, i8* %3
%17 = load volatile i8, i8* %3
%18 = icmp ult i8 %17, %0
br i1 %18, label %6, label %19
19: ; preds = %14, %1
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0xe3() {
  Assert_real((ispunct(227) == 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_ispunct.c",
              1140, ("ispunct should be 0 for 0xe3"));
}


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

x86 assembly (clang, -O2):
<t_ispunct_0xe3>:
push   %rax
mov    $0xe3,%edi
call   1030 <ispunct@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x474,%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_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0xe3\00"
define void @t_ispunct_0xe3() {
%1 = call i64 @ispunct(i32 227)
%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 1140, 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_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0xe3\00"
define void @t_ispunct_0xe3() {
%1 = tail call i64 @ispunct(i32 227)
%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 1140, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void SceneManager_resume() {}


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

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

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

LLVM IR (-O2):
define void @SceneManager_resume() {
ret void
}
int main(void) {
  int *t = (int *)__builtin_malloc(sizeof(int) * 10);
  int(*a)[1] = (int(*)[1])t;
  (*a)[2] = 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x28,%edi
call   1030 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x1,0x8(%rax)
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32*
%2 = alloca [1 x i32]*
%3 = call i8* @malloc(i64 40)
%4 = bitcast i8* %3 to i32*
store i32* %4, i32** %1
%5 = load i32*, i32** %1
%6 = bitcast i32* %5 to [1 x i32]*
store [1 x i32]* %6, [1 x i32]** %2
%7 = load [1 x i32]*, [1 x i32]** %2
%8 = getelementptr inbounds [1 x i32], [1 x i32]* %7, i64 0, i64 2
store i32 1, i32* %8
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
int atoi(char st[]) {
  int i, n;
  n = 0;
  for (i = 0; st[i] >= '0' && st[i] <= '9'; ++i)
    n = 10 * n + (st[i] - '0');
  return n;
}


x86 assembly (clang, -O0):
<atoi>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
xor    %eax,%eax
cmp    $0x30,%ecx
mov    %al,-0x11(%rbp)
jl     1145 <atoi+0x45>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x39,%eax
setle  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1155 <atoi+0x55>
jmp    117b <atoi+0x7b>
imul   $0xa,-0x10(%rbp),%eax
mov    -0x8(%rbp),%rcx
movslq -0xc(%rbp),%rdx
movsbl (%rcx,%rdx,1),%ecx
sub    $0x30,%ecx
add    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1116 <atoi+0x16>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<atoi>:
mov    (%rdi),%cl
lea    -0x30(%rcx),%edx
xor    %eax,%eax
cmp    $0x9,%dl
ja     113b <atoi+0x3b>
add    $0x1,%rdi
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl %cl,%ecx
lea    (%rax,%rax,4),%eax
lea    (%rcx,%rax,2),%eax
add    $0xffffffd0,%eax
movzbl (%rdi),%ecx
lea    -0x30(%rcx),%edx
add    $0x1,%rdi
cmp    $0xa,%dl
jb     1120 <atoi+0x20>
ret

LLVM IR (-O0):
define i32 @atoi(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %4
store i32 0, i32* %3
br label %5
5: ; preds = %34, %1
%6 = load i8*, i8** %2
%7 = load i32, i32* %3
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %6, i64 %8
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp sge i32 %11, 48
br i1 %12, label %13, label %21
13: ; preds = %5
%14 = load i8*, i8** %2
%15 = load i32, i32* %3
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i8, i8* %14, i64 %16
%18 = load i8, i8* %17
%19 = sext i8 %18 to i32
%20 = icmp sle i32 %19, 57
br label %21
21: ; preds = %13, %5
%22 = phi i1 [ false, %5 ], [ %20, %13 ]
br i1 %22, label %23, label %37
23: ; preds = %21
%24 = load i32, i32* %4
%25 = mul nsw i32 10, %24
%26 = load i8*, i8** %2
%27 = load i32, i32* %3
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds i8, i8* %26, i64 %28
%30 = load i8, i8* %29
%31 = sext i8 %30 to i32
%32 = sub nsw i32 %31, 48
%33 = add nsw i32 %25, %32
store i32 %33, i32* %4
br label %34
34: ; preds = %23
%35 = load i32, i32* %3
%36 = add nsw i32 %35, 1
store i32 %36, i32* %3
br label %5
37: ; preds = %21
%38 = load i32, i32* %4
ret i32 %38
}

LLVM IR (-O2):
define i32 @atoi(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = add i8 %2, -48
%4 = icmp ult i8 %3, 10
br i1 %4, label %5, label %18
5: ; preds = %1, %5
%6 = phi i64 [ %13, %5 ], [ 0, %1 ]
%7 = phi i8 [ %15, %5 ], [ %2, %1 ]
%8 = phi i32 [ %12, %5 ], [ 0, %1 ]
%9 = zext i8 %7 to i32
%10 = mul nsw i32 %8, 10
%11 = add i32 %10, -48
%12 = add i32 %11, %9
%13 = add nuw nsw i64 %6, 1
%14 = getelementptr inbounds i8, i8* %0, i64 %13
%15 = load i8, i8* %14
%16 = add i8 %15, -48
%17 = icmp ult i8 %16, 10
br i1 %17, label %5, label %18
18: ; preds = %5, %1
%19 = phi i32 [ 0, %1 ], [ %12, %5 ]
ret i32 %19
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
void free_uint64_t(uint64_t _val) { return; }


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

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

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

LLVM IR (-O2):
define void @free_uint64_t(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ COLOR_PAIR(int);
int /*<<< orphan*/ attroff(int /*<<< orphan*/);
int /*<<< orphan*/ attron(int /*<<< orphan*/);
int /*<<< orphan*/ mvprintw(int, int, char *);
int /*<<< orphan*/ refresh();
void print_game_title() {
  attron(COLOR_PAIR(5));
  mvprintw(1, 6, "       THE GAME OF REVERSI       ");
  attroff(COLOR_PAIR(5));
  refresh();
}


x86 assembly (clang, -O0):
<print_game_title>:
push   %rbp
mov    %rsp,%rbp
mov    $0x5,%edi
call   1050 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1040 <attron@plt>
mov    $0x1,%edi
mov    $0x6,%esi
lea    0xe8a(%rip),%rdx
call   1070 <mvprintw@plt>
mov    $0x5,%edi
call   1050 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1030 <attroff@plt>
mov    $0x0,%al
call   1060 <refresh@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_game_title>:
push   %rax
mov    $0x5,%edi
call   1050 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1040 <attron@plt>
lea    0xe97(%rip),%rdx
mov    $0x1,%edi
mov    $0x6,%esi
call   1070 <mvprintw@plt>
mov    $0x5,%edi
call   1050 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1030 <attroff@plt>
xor    %eax,%eax
pop    %rcx
jmp    1060 <refresh@plt>

LLVM IR (-O0):
@.str = [34 x i8] c" THE GAME OF REVERSI \00"
define void @print_game_title() {
%1 = call i32 @COLOR_PAIR(i32 5)
%2 = call i32 @attron(i32 %1)
%3 = call i32 @mvprintw(i32 1, i32 6, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @COLOR_PAIR(i32 5)
%5 = call i32 @attroff(i32 %4)
%6 = call i32 (...) @refresh()
ret void
}

LLVM IR (-O2):
@.str = [34 x i8] c" THE GAME OF REVERSI \00"
define void @print_game_title() {
%1 = tail call i32 @COLOR_PAIR(i32 5)
%2 = tail call i32 @attron(i32 %1)
%3 = tail call i32 @mvprintw(i32 1, i32 6, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @COLOR_PAIR(i32 5)
%5 = tail call i32 @attroff(i32 %4)
%6 = tail call i32 (...) @refresh()
ret void
}
int main(int argc, char **argv, char **envp) { return 0; }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1, i8** nocapture readnone %2) {
ret i32 0
}
char **(wcheck_char_ptr_ptr)(char **to_check) { return to_check; }


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

x86 assembly (clang, -O2):
<wcheck_char_ptr_ptr>:
mov    %rdi,%rax
ret

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

LLVM IR (-O2):
define i8** @wcheck_char_ptr_ptr(i8** readnone returned %0) {
ret i8** %0
}
int cmp_le(long arg1, long arg2) { return arg1 > arg2; }


x86 assembly (clang, -O0):
<cmp_le>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
setg   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp_le>:
xor    %eax,%eax
cmp    %rsi,%rdi
setg   %al
ret

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

LLVM IR (-O2):
define i32 @cmp_le(i64 %0, i64 %1) {
%3 = icmp sgt i64 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ RETN(int, int);
int /*<<< orphan*/ T_WAIT_UNTIL(int);
void op_ED_0x65(void) {
  RETN(4, 7);
  T_WAIT_UNTIL(10);
  return;
}


x86 assembly (clang, -O0):
<op_ED_0x65>:
push   %rbp
mov    %rsp,%rbp
mov    $0x4,%edi
mov    $0x7,%esi
call   1030 <RETN@plt>
mov    $0xa,%edi
call   1040 <T_WAIT_UNTIL@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<op_ED_0x65>:
push   %rax
mov    $0x4,%edi
mov    $0x7,%esi
call   1030 <RETN@plt>
mov    $0xa,%edi
pop    %rax
jmp    1040 <T_WAIT_UNTIL@plt>

LLVM IR (-O0):
define void @op_ED_0x65() {
%1 = call i32 @RETN(i32 4, i32 7)
%2 = call i32 @T_WAIT_UNTIL(i32 10)
ret void
}

LLVM IR (-O2):
define void @op_ED_0x65() {
%1 = tail call i32 @RETN(i32 4, i32 7)
%2 = tail call i32 @T_WAIT_UNTIL(i32 10)
ret void
}
void gamma_dummy_free(void *state) {}


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

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

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

LLVM IR (-O2):
define void @gamma_dummy_free(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strncpy(char *, char const *, int);
void dump_string(char *output, int maxlen, void *value, int len) {
  maxlen--;
  if (maxlen > len)
    maxlen = len;
  strncpy(output, (const char *)value, maxlen);
  output[maxlen] = '\0';
}


x86 assembly (clang, -O0):
<dump_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jle    1141 <dump_string+0x31>
mov    -0x1c(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <strncpy@plt>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dump_string>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
add    $0xffffffff,%ebx
cmp    %ecx,%ebx
cmovg  %ecx,%ebx
mov    %rdx,%rsi
mov    %ebx,%edx
call   1030 <strncpy@plt>
movslq %ebx,%rax
movb   $0x0,(%r14,%rax,1)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @dump_string(i8* %0, i32 %1, i8* %2, i32 %3) {
%5 = add nsw i32 %1, -1
%6 = icmp sgt i32 %5, %3
%7 = select i1 %6, i32 %3, i32 %5
%8 = tail call i32 @strncpy(i8* %0, i8* %2, i32 %7)
%9 = sext i32 %7 to i64
%10 = getelementptr inbounds i8, i8* %0, i64 %9
store i8 0, i8* %10
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ x_root;
};
typedef TYPE_1__ XKeyReleasedEvent;

/* Variables and functions */
int get_XKeyReleasedEvent_x_root(void *_p) {
  return (int)((XKeyReleasedEvent *)_p)->x_root;
}


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

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

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

LLVM IR (-O2):
define i32 @get_XKeyReleasedEvent_x_root(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
char *fn3() {
  static char *pc[5] = {"C001", "C002", "C003", "C004"};
  return pc[2];
}


x86 assembly (clang, -O0):
<fn3>:
push   %rbp
mov    %rsp,%rbp
mov    0x2f35(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn3>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@fn3.pc = internal global [5 x i8*] [i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i32 0, i32 0), i8* null]
@.str = [5 x i8] c"C001\00"
@.str.1 = [5 x i8] c"C002\00"
@.str.2 = [5 x i8] c"C003\00"
@.str.3 = [5 x i8] c"C004\00"
define i8* @fn3() {
%1 = load i8*, i8** getelementptr inbounds ([5 x i8*], [5 x i8*]* @fn3.pc, i64 0, i64 2)
ret i8* %1
}

LLVM IR (-O2):
@.str.2 = [5 x i8] c"C003\00"
define i8* @fn3() {
ret i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ LBA_REG_WRITE(void *, int, int);
int gemini_util_start(void *phys_addr) {
  LBA_REG_WRITE(phys_addr, 0x0500, 0x3);
  return 0;
}


x86 assembly (clang, -O0):
<gemini_util_start>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x500,%esi
mov    $0x3,%edx
call   1030 <LBA_REG_WRITE@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gemini_util_start>:
push   %rax
mov    $0x500,%esi
mov    $0x3,%edx
call   1030 <LBA_REG_WRITE@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @gemini_util_start(i8* %0) {
%2 = tail call i32 @LBA_REG_WRITE(i8* %0, i32 1280, i32 3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ DoInt();
int /*<<< orphan*/ SetupSigHandler();
int main() {
  SetupSigHandler();
  DoInt();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @SetupSigHandler()
%2 = tail call i32 (...) @DoInt()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ bar(int, int, int, int, int);
void foo(int a, int b, int c, int d, int e) { bar(a, b, c, d, e); }


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x14(%rbp),%r8d
call   1030 <bar@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
jmp    1030 <bar@plt>

LLVM IR (-O0):
define void @foo(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load i32, i32* %6
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = load i32, i32* %9
%15 = load i32, i32* %10
%16 = call i32 @bar(i32 %11, i32 %12, i32 %13, i32 %14, i32 %15)
ret void
}

LLVM IR (-O2):
define void @foo(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = tail call i32 @bar(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4)
ret void
}