xunge/DecIR huggingface dataset:
int get_led_2(void) {
  unsigned int mode = (*(volatile unsigned int *)(0x7F008824)) & 2;
  if (mode)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<get_led_2>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7f008824,%eax
mov    (%rax),%eax
and    $0x2,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1127 <get_led_2+0x27>
movl   $0x1,-0x4(%rbp)
jmp    112e <get_led_2+0x2e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_led_2>:
mov    0x7f008824,%eax
shr    %eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @get_led_2() {
%1 = alloca i32
%2 = alloca i32
%3 = load volatile i32, i32* inttoptr (i64 2130741284 to i32*)
%4 = and i32 %3, 2
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %0
store i32 1, i32* %1
br label %9
8: ; preds = %0
store i32 0, i32* %1
br label %9
9: ; preds = %8, %7
%10 = load i32, i32* %1
ret i32 %10
}

LLVM IR (-O2):
define i32 @get_led_2() {
%1 = load volatile i32, i32* inttoptr (i64 2130741284 to i32*)
%2 = lshr i32 %1, 1
%3 = and i32 %2, 1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_packet_new() {
  printf("NOT IMPLEMENTED:"
         "pa_packet_new"
         "\n");
}


x86 assembly (clang, -O0):
<pa_packet_new>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [31 x i8] c"NOT IMPLEMENTED:pa_packet_new\0A\00"
define i32 @pa_packet_new() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [30 x i8] c"NOT IMPLEMENTED:pa_packet_new\00"
define i32 @pa_packet_new() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ SuiteSparse_tic(double *);
double SuiteSparse_time(void) {
  double toc[2];
  SuiteSparse_tic(toc);
  return (toc[0] + 1e-9 * toc[1]);
}


x86 assembly (clang, -O0):
<SuiteSparse_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
call   1030 <SuiteSparse_tic@plt>
movsd  -0x10(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm0
movsd  0xecd(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SuiteSparse_time>:
sub    $0x18,%rsp
mov    %rsp,%rdi
call   1030 <SuiteSparse_tic@plt>
movsd  0x8(%rsp),%xmm0
mulsd  0xed6(%rip),%xmm0
addsd  (%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @SuiteSparse_time() {
%1 = alloca [2 x double]
%2 = getelementptr inbounds [2 x double], [2 x double]* %1, i64 0, i64 0
%3 = call i32 @SuiteSparse_tic(double* %2)
%4 = getelementptr inbounds [2 x double], [2 x double]* %1, i64 0, i64 0
%5 = load double, double* %4
%6 = getelementptr inbounds [2 x double], [2 x double]* %1, i64 0, i64 1
%7 = load double, double* %6
%8 = call double @llvm.fmuladd.f64(double 1.000000e-09, double %7, double %5)
ret double %8
}

LLVM IR (-O2):
define double @SuiteSparse_time() {
%1 = alloca [2 x double]
%2 = bitcast [2 x double]* %1 to i8*
%3 = getelementptr inbounds [2 x double], [2 x double]* %1, i64 0, i64 0
%4 = call i32 @SuiteSparse_tic(double* %3)
%5 = load double, double* %3
%6 = getelementptr inbounds [2 x double], [2 x double]* %1, i64 0, i64 1
%7 = load double, double* %6
%8 = call double @llvm.fmuladd.f64(double %7, double 1.000000e-09, double %5)
ret double %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ test_get_both_parts();
int /*<<< orphan*/ test_get_int_part();
int main(int argc, char *argv[]) {
  test_get_int_part();
  test_get_both_parts();
  printf("All tests passed\n");
}


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

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

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

LLVM IR (-O2):
@str = [17 x i8] c"All tests passed\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @test_get_int_part()
%4 = tail call i32 (...) @test_get_both_parts()
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
char *__wstr_dup(void const *);
int /*<<< orphan*/ assert(void const *);
char *wtypeStr_toString(const void *element) {
  assert(element);
  return __wstr_dup(element);
}


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

x86 assembly (clang, -O2):
<wtypeStr_toString>:
push   %rbx
mov    %rdi,%rbx
call   1030 <assert@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <__wstr_dup@plt>

LLVM IR (-O0):
define i8* @wtypeStr_toString(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @assert(i8* %3)
%5 = load i8*, i8** %2
%6 = call i8* @__wstr_dup(i8* %5)
ret i8* %6
}

LLVM IR (-O2):
define i8* @wtypeStr_toString(i8* %0) {
%2 = tail call i32 @assert(i8* %0)
%3 = tail call i8* @__wstr_dup(i8* %0)
ret i8* %3
}
/* Variables and functions */
short LittleShort(short l) { return l; }


x86 assembly (clang, -O0):
<LittleShort>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define signext i16 @LittleShort(i16 returned signext %0) {
ret i16 %0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ iscntrl(int);
void t_iscntrl_0xdf() {
  Assert_real((iscntrl(223) == 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_iscntrl.c",
              1120, ("iscntrl should be 0 for 0xdf"));
}


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

x86 assembly (clang, -O2):
<t_iscntrl_0xdf>:
push   %rax
mov    $0xdf,%edi
call   1030 <iscntrl@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x460,%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_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 0 for 0xdf\00"
define void @t_iscntrl_0xdf() {
%1 = call i64 @iscntrl(i32 223)
%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 1120, 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_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 0 for 0xdf\00"
define void @t_iscntrl_0xdf() {
%1 = tail call i64 @iscntrl(i32 223)
%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 1120, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
float cos(float);
float wscos_(float *x) { return cos(*x); }


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

x86 assembly (clang, -O2):
<wscos_>:
movss  (%rdi),%xmm0
jmp    1030 <cos@plt>

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

LLVM IR (-O2):
define float @wscos_(float* nocapture %0) {
%2 = load float, float* %0
%3 = tail call float @cos(float %2)
ret float %3
}
/* Variables and functions */
int SIGALRM;
int /*<<< orphan*/ printf(char *, ...);
void handler(int sig) {
  printf("sig = %d\n", sig);
  if (sig == SIGALRM) {
    printf("This is SIGALRM!\n");
  }
}


x86 assembly (clang, -O0):
<handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xedb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
mov    0x2eb2(%rip),%rcx
cmp    (%rcx),%eax
jne    114c <handler+0x3c>
lea    0xec5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handler>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2eae(%rip),%rax
cmp    %ebx,(%rax)
jne    114b <handler+0x2b>
lea    0xec5(%rip),%rdi
pop    %rbx
jmp    1030 <puts@plt>
pop    %rbx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"sig = %d\0A\00"
@SIGALRM = global i32 0
@.str.1 = [18 x i8] c"This is SIGALRM!\0A\00"
define void @handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = load i32, i32* %2
%6 = load i32, i32* @SIGALRM
%7 = icmp eq i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
br label %10
10: ; preds = %8, %1
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"sig = %d\0A\00"
@SIGALRM = global i32 0
@str = [17 x i8] c"This is SIGALRM!\00"
define void @handler(i32 %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = load i32, i32* @SIGALRM
%4 = icmp eq i32 %3, %0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
br label %7
7: ; preds = %5, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int x = 5 + 2;
  printf("x is= %d\n", x);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x7,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [10 x i8] c"x is= %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 7)
ret i32 0
}
void RGBAToUVRow_SSSE3() {}


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

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

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

LLVM IR (-O2):
define void @RGBAToUVRow_SSSE3() {
ret void
}
int find_age(int candles, int offset) {
  candles += offset;
  candles <<= 1;
  int x = 0;
  while (x * x + x - candles < 0)
    x++;
  return x * x + x - candles == 0 ? x : -1;
}


x86 assembly (clang, -O0):
<find_age>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
imul   -0xc(%rbp),%eax
add    -0xc(%rbp),%eax
sub    -0x4(%rbp),%eax
cmp    $0x0,%eax
jge    1147 <find_age+0x47>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <find_age+0x23>
mov    -0xc(%rbp),%eax
imul   -0xc(%rbp),%eax
add    -0xc(%rbp),%eax
sub    -0x4(%rbp),%eax
cmp    $0x0,%eax
jne    1168 <find_age+0x68>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1175 <find_age+0x75>
mov    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    1175 <find_age+0x75>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<find_age>:
add    %edi,%edi
lea    (%rdi,%rsi,2),%eax
neg    %eax
xor    %ecx,%ecx
nopl   0x0(%rax)
mov    %ecx,%edx
imul   %ecx,%edx
lea    (%rax,%rcx,1),%esi
add    $0x1,%ecx
add    %esi,%edx
js     1110 <find_age+0x10>
add    $0xffffffff,%ecx
neg    %edx
sbb    %eax,%eax
or     %ecx,%eax
ret

LLVM IR (-O0):
define i32 @find_age(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* %4
%7 = load i32, i32* %3
%8 = add nsw i32 %7, %6
store i32 %8, i32* %3
%9 = load i32, i32* %3
%10 = shl i32 %9, 1
store i32 %10, i32* %3
store i32 0, i32* %5
br label %11
11: ; preds = %20, %2
%12 = load i32, i32* %5
%13 = load i32, i32* %5
%14 = mul nsw i32 %12, %13
%15 = load i32, i32* %5
%16 = add nsw i32 %14, %15
%17 = load i32, i32* %3
%18 = sub nsw i32 %16, %17
%19 = icmp slt i32 %18, 0
br i1 %19, label %20, label %23
20: ; preds = %11
%21 = load i32, i32* %5
%22 = add nsw i32 %21, 1
store i32 %22, i32* %5
br label %11
23: ; preds = %11
%24 = load i32, i32* %5
%25 = load i32, i32* %5
%26 = mul nsw i32 %24, %25
%27 = load i32, i32* %5
%28 = add nsw i32 %26, %27
%29 = load i32, i32* %3
%30 = sub nsw i32 %28, %29
%31 = icmp eq i32 %30, 0
br i1 %31, label %32, label %34
32: ; preds = %23
%33 = load i32, i32* %5
br label %35
34: ; preds = %23
br label %35
35: ; preds = %34, %32
%36 = phi i32 [ %33, %32 ], [ -1, %34 ]
ret i32 %36
}

LLVM IR (-O2):
define i32 @find_age(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
%4 = mul i32 %3, -2
br label %5
5: ; preds = %5, %2
%6 = phi i32 [ 0, %2 ], [ %11, %5 ]
%7 = mul nsw i32 %6, %6
%8 = add i32 %6, %4
%9 = add i32 %8, %7
%10 = icmp slt i32 %9, 0
%11 = add nuw nsw i32 %6, 1
br i1 %10, label %5, label %12
12: ; preds = %5
%13 = icmp eq i32 %9, 0
%14 = select i1 %13, i32 %6, i32 -1
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ putc(int /*<<< orphan*/);
void puts(const char *s) {
  if (!s)
    return;
  while (*s) {
    putc(*s++);
  }
}


x86 assembly (clang, -O0):
<puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    112c <puts+0x1c>
jmp    115a <puts+0x4a>
jmp    1131 <puts+0x21>
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     115a <puts+0x4a>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
call   1030 <putc@plt>
jmp    1131 <puts+0x21>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<puts>:
push   %rbx
test   %rdi,%rdi
je     1143 <puts+0x33>
mov    %rdi,%rbx
mov    (%rdi),%al
test   %al,%al
je     1143 <puts+0x33>
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsbl %al,%edi
call   1030 <putc@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <puts+0x20>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @puts(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %14, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %14, label %6
6: ; preds = %3, %6
%7 = phi i8 [ %12, %6 ], [ %4, %3 ]
%8 = phi i8* [ %9, %6 ], [ %0, %3 ]
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = sext i8 %7 to i32
%11 = tail call i32 @putc(i32 %10)
%12 = load i8, i8* %9
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %6
14: ; preds = %6, %3, %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
uint16_t get_16(const unsigned char *p) { return *(uint16_t *)p; }


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

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

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

LLVM IR (-O2):
define i32 @get_16(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
ret i32 %3
}
void GPIOPortP3_Handler(void) {
  while (1) {
  }
}


x86 assembly (clang, -O0):
<GPIOPortP3_Handler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <GPIOPortP3_Handler+0x9>
jmp    1109 <GPIOPortP3_Handler+0x9>

x86 assembly (clang, -O2):
<GPIOPortP3_Handler>:
jmp    1100 <GPIOPortP3_Handler>

LLVM IR (-O0):
define void @GPIOPortP3_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @GPIOPortP3_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Type definitions */
typedef int /*<<< orphan*/ cs_path;

/* Variables and functions */
int /*<<< orphan*/ get_cs_path(char const *, char *, int);
int is_regular_file(char *);
int color_scheme_exists(const char name[]) {
  char cs_path[4096];
  get_cs_path(name, cs_path, sizeof(cs_path));
  return is_regular_file(cs_path);
}


x86 assembly (clang, -O0):
<color_scheme_exists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1010,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x1010(%rbp),%rsi
mov    $0x1000,%edx
call   1030 <get_cs_path@plt>
lea    -0x1010(%rbp),%rdi
call   1040 <is_regular_file@plt>
add    $0x1010,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<color_scheme_exists>:
push   %rbx
sub    $0x1000,%rsp
mov    %rsp,%rbx
mov    %rbx,%rsi
mov    $0x1000,%edx
call   1030 <get_cs_path@plt>
mov    %rbx,%rdi
call   1040 <is_regular_file@plt>
add    $0x1000,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @color_scheme_exists(i8* %0) {
%2 = alloca i8*
%3 = alloca [4096 x i8]
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = getelementptr inbounds [4096 x i8], [4096 x i8]* %3, i64 0, i64 0
%6 = call i32 @get_cs_path(i8* %4, i8* %5, i32 4096)
%7 = getelementptr inbounds [4096 x i8], [4096 x i8]* %3, i64 0, i64 0
%8 = call i32 @is_regular_file(i8* %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @color_scheme_exists(i8* %0) {
%2 = alloca [4096 x i8]
%3 = getelementptr inbounds [4096 x i8], [4096 x i8]* %2, i64 0, i64 0
%4 = call i32 @get_cs_path(i8* %0, i8* %3, i32 4096)
%5 = call i32 @is_regular_file(i8* %3)
ret i32 %5
}
imgl_munge_name(buf) char *buf;
{
  int j;
  j = 0;
  while (buf[j] != '\n')
    j++;
  buf[j] = '\0';
}


x86 assembly (clang, -O0):
<imgl_munge_name>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0xa,%eax
je     1132 <imgl_munge_name+0x32>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    110f <imgl_munge_name+0xf>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<imgl_munge_name>:
mov    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
cmpb   $0xa,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <imgl_munge_name+0x10>
mov    %eax,%eax
movb   $0x0,(%rdi,%rax,1)
ret

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

LLVM IR (-O2):
define i32 @imgl_munge_name(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, 10
%7 = add nuw i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = and i64 %3, 4294967295
%10 = getelementptr inbounds i8, i8* %0, i64 %9
store i8 0, i8* %10
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ strtriml(char *);
int /*<<< orphan*/ strtrimr(char *);
char *strtrim(char *str) {
  strtrimr(str);
  strtriml(str);
  return str;
}


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

x86 assembly (clang, -O2):
<strtrim>:
push   %rbx
mov    %rdi,%rbx
call   1040 <strtrimr@plt>
mov    %rbx,%rdi
call   1030 <strtriml@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @strtrim(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @strtrimr(i8* %3)
%5 = load i8*, i8** %2
%6 = call i32 @strtriml(i8* %5)
%7 = load i8*, i8** %2
ret i8* %7
}

LLVM IR (-O2):
define i8* @strtrim(i8* returned %0) {
%2 = tail call i32 @strtrimr(i8* %0)
%3 = tail call i32 @strtriml(i8* %0)
ret i8* %0
}
int main(int argc, char **argv) {
  char a[1000];
  char *b = (char *)(((unsigned long int)(a + 16) >> 4) << 4);
  char *c = b + 1;
  asm volatile("movdqa %%xmm0, %0" : "=m"(*b) : : "%xmm0");
  asm volatile("movdqa %%xmm0, %0" : "=m"(*c) : : "%xmm0");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x390,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x400(%rbp),%rax
add    $0x10,%rax
shr    $0x4,%rax
shl    $0x4,%rax
mov    %rax,-0x408(%rbp)
mov    -0x408(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x410(%rbp)
mov    -0x408(%rbp),%rax
movdqa %xmm0,(%rax)
mov    -0x410(%rbp),%rax
movdqa %xmm0,(%rax)
xor    %eax,%eax
add    $0x390,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x368,%rsp
movdqa %xmm0,-0x70(%rsp)
movdqa %xmm0,-0x6f(%rsp)
xor    %eax,%eax
add    $0x368,%rsp
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca [1000 x i8]
%6 = alloca i8*
%7 = alloca i8*
store i32 %0, i32* %3
store i8** %1, i8*** %4
%8 = getelementptr inbounds [1000 x i8], [1000 x i8]* %5, i64 0, i64 0
%9 = getelementptr inbounds i8, i8* %8, i64 16
%10 = ptrtoint i8* %9 to i64
%11 = lshr i64 %10, 4
%12 = shl i64 %11, 4
%13 = inttoptr i64 %12 to i8*
store i8* %13, i8** %6
%14 = load i8*, i8** %6
%15 = getelementptr inbounds i8, i8* %14, i64 1
store i8* %15, i8** %7
%16 = load i8*, i8** %6
%17 = load i8*, i8** %7
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [1000 x i8]
%4 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%5 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 16
%6 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 17
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ render_audio();
int /*<<< orphan*/ render_checkered();
int /*<<< orphan*/ update_input();
void retro_run(void) {
  update_input();
  render_checkered();
  render_audio();
}


x86 assembly (clang, -O0):
<retro_run>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <update_input@plt>
mov    $0x0,%al
call   1030 <render_checkered@plt>
mov    $0x0,%al
call   1050 <render_audio@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<retro_run>:
push   %rax
xor    %eax,%eax
call   1040 <update_input@plt>
xor    %eax,%eax
call   1030 <render_checkered@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <render_audio@plt>

LLVM IR (-O0):
define void @retro_run() {
%1 = call i32 (...) @update_input()
%2 = call i32 (...) @render_checkered()
%3 = call i32 (...) @render_audio()
ret void
}

LLVM IR (-O2):
define void @retro_run() {
%1 = tail call i32 (...) @update_input()
%2 = tail call i32 (...) @render_checkered()
%3 = tail call i32 (...) @render_audio()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ terminal_setcolor(int /*<<< orphan*/);
void chFG(uint8_t foregroundcolor) { terminal_setcolor(foregroundcolor); }


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

x86 assembly (clang, -O2):
<chFG>:
jmp    1030 <terminal_setcolor@plt>

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

LLVM IR (-O2):
define void @chFG(i32 %0) {
%2 = tail call i32 @terminal_setcolor(i32 %0)
ret void
}
/* Type definitions */
typedef unsigned char uint8_t;

/* Variables and functions */
int /*<<< orphan*/ M_DRV_I2C_Read(int, unsigned char, unsigned char *, int);
unsigned char M_DRV_MC3610_ReadReg(unsigned char bRegAddr) {
  uint8_t _bData = 0;
  M_DRV_I2C_Read((((0x4C) << 1) | 0x01), bRegAddr, &_bData, 1);
  return (_bData);
}


x86 assembly (clang, -O0):
<M_DRV_MC3610_ReadReg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movb   $0x0,-0x2(%rbp)
mov    $0x99,%edi
lea    -0x2(%rbp),%rdx
mov    $0x1,%ecx
movzbl -0x1(%rbp),%esi
call   1030 <M_DRV_I2C_Read@plt>
movzbl -0x2(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<M_DRV_MC3610_ReadReg>:
push   %rax
mov    %edi,%esi
movb   $0x0,0x7(%rsp)
lea    0x7(%rsp),%rdx
mov    $0x99,%edi
mov    $0x1,%ecx
call   1030 <M_DRV_I2C_Read@plt>
mov    0x7(%rsp),%al
pop    %rcx
ret

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

LLVM IR (-O2):
define zeroext i8 @M_DRV_MC3610_ReadReg(i8 zeroext %0) {
%2 = alloca i8
store i8 0, i8* %2
%3 = call i32 @M_DRV_I2C_Read(i32 153, i8 zeroext %0, i8* %2, i32 1)
%4 = load i8, i8* %2
ret i8 %4
}
/* Variables and functions */
int /*<<< orphan*/ memmove(char *, char *, int);
void warc_erasebuffer(char *buffer, int *buffer_filled, int erase_bytes) {
  memmove(buffer, buffer + erase_bytes, 65536 - erase_bytes);
  *buffer_filled -= erase_bytes;
  *(buffer + *buffer_filled) = '\0';
}


x86 assembly (clang, -O0):
<warc_erasebuffer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rsi
movslq -0x14(%rbp),%rax
add    %rax,%rsi
mov    $0x10000,%edx
sub    -0x14(%rbp),%edx
call   1030 <memmove@plt>
mov    -0x14(%rbp),%edx
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
sub    %edx,%ecx
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
movslq (%rcx),%rcx
movb   $0x0,(%rax,%rcx,1)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<warc_erasebuffer>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
movslq %edx,%rbx
lea    (%rdi,%rbx,1),%rsi
mov    $0x10000,%edx
sub    %ebx,%edx
call   1030 <memmove@plt>
movslq (%r14),%rax
sub    %rbx,%rax
mov    %eax,(%r14)
movb   $0x0,(%r15,%rax,1)
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @warc_erasebuffer(i8* %0, i32* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i32
store i8* %0, i8** %4
store i32* %1, i32** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %4
%9 = load i32, i32* %6
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i8, i8* %8, i64 %10
%12 = load i32, i32* %6
%13 = sub nsw i32 65536, %12
%14 = call i32 @memmove(i8* %7, i8* %11, i32 %13)
%15 = load i32, i32* %6
%16 = load i32*, i32** %5
%17 = load i32, i32* %16
%18 = sub nsw i32 %17, %15
store i32 %18, i32* %16
%19 = load i8*, i8** %4
%20 = load i32*, i32** %5
%21 = load i32, i32* %20
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds i8, i8* %19, i64 %22
store i8 0, i8* %23
ret void
}

LLVM IR (-O2):
define void @warc_erasebuffer(i8* %0, i32* nocapture %1, i32 %2) {
%4 = sext i32 %2 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = sub nsw i32 65536, %2
%7 = tail call i32 @memmove(i8* %0, i8* %5, i32 %6)
%8 = load i32, i32* %1
%9 = sub nsw i32 %8, %2
store i32 %9, i32* %1
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i8, i8* %0, i64 %10
store i8 0, i8* %11
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;

/* Variables and functions */
void make_word(uint8_t *base, uint16_t val) {
  base[0] = val >> 8;
  base[1] = val & 0xff;
}


x86 assembly (clang, -O0):
<make_word>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
sar    $0x8,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0xc(%rbp),%ecx
and    $0xff,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x4(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<make_word>:
movzbl %sil,%eax
sar    $0x8,%esi
mov    %esi,(%rdi)
mov    %eax,0x4(%rdi)
ret

LLVM IR (-O0):
define void @make_word(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = ashr i32 %5, 8
%7 = load i32*, i32** %3
%8 = getelementptr inbounds i32, i32* %7, i64 0
store i32 %6, i32* %8
%9 = load i32, i32* %4
%10 = and i32 %9, 255
%11 = load i32*, i32** %3
%12 = getelementptr inbounds i32, i32* %11, i64 1
store i32 %10, i32* %12
ret void
}

LLVM IR (-O2):
define void @make_word(i32* nocapture writeonly %0, i32 %1) {
%3 = ashr i32 %1, 8
store i32 %3, i32* %0
%4 = and i32 %1, 255
%5 = getelementptr inbounds i32, i32* %0, i64 1
store i32 %4, i32* %5
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
int /*<<< orphan*/ IntDisable(int);
int /*<<< orphan*/ IntUnregister(int);
int _PWMFaultIntNumberGet(int);
void PWMFaultIntUnregister(uint32_t ui32Base) {
  uint32_t ui32Int;
  ASSERT((ui32Base == 0x40028000) || (ui32Base == 0x40029000));
  ui32Int = _PWMFaultIntNumberGet(ui32Base);
  ASSERT(ui32Int != 0);
  IntDisable(ui32Int);
  IntUnregister(ui32Int);
}


x86 assembly (clang, -O0):
<PWMFaultIntUnregister>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x40028000,-0x4(%rbp)
mov    %al,-0x9(%rbp)
je     116a <PWMFaultIntUnregister+0x2a>
cmpl   $0x40029000,-0x4(%rbp)
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <ASSERT@plt>
mov    -0x4(%rbp),%edi
call   1040 <_PWMFaultIntNumberGet@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <ASSERT@plt>
mov    -0x8(%rbp),%edi
call   1030 <IntDisable@plt>
mov    -0x8(%rbp),%edi
call   1060 <IntUnregister@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PWMFaultIntUnregister>:
push   %rbx
mov    %edi,%ebx
mov    %edi,%eax
and    $0xffffefff,%eax
xor    %edi,%edi
cmp    $0x40028000,%eax
sete   %dil
call   1050 <ASSERT@plt>
mov    %ebx,%edi
call   1040 <_PWMFaultIntNumberGet@plt>
mov    %eax,%ebx
xor    %edi,%edi
test   %eax,%eax
setne  %dil
call   1050 <ASSERT@plt>
mov    %ebx,%edi
call   1030 <IntDisable@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1060 <IntUnregister@plt>

LLVM IR (-O0):
define void @PWMFaultIntUnregister(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = icmp eq i32 %4, 1073905664
br i1 %5, label %9, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = icmp eq i32 %7, 1073909760
br label %9
9: ; preds = %6, %1
%10 = phi i1 [ true, %1 ], [ %8, %6 ]
%11 = zext i1 %10 to i32
%12 = call i32 @ASSERT(i32 %11)
%13 = load i32, i32* %2
%14 = call i32 @_PWMFaultIntNumberGet(i32 %13)
store i32 %14, i32* %3
%15 = load i32, i32* %3
%16 = icmp ne i32 %15, 0
%17 = zext i1 %16 to i32
%18 = call i32 @ASSERT(i32 %17)
%19 = load i32, i32* %3
%20 = call i32 @IntDisable(i32 %19)
%21 = load i32, i32* %3
%22 = call i32 @IntUnregister(i32 %21)
ret void
}

LLVM IR (-O2):
define void @PWMFaultIntUnregister(i32 %0) {
%2 = and i32 %0, -4097
%3 = icmp eq i32 %2, 1073905664
%4 = zext i1 %3 to i32
%5 = tail call i32 @ASSERT(i32 %4)
%6 = tail call i32 @_PWMFaultIntNumberGet(i32 %0)
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i32
%9 = tail call i32 @ASSERT(i32 %8)
%10 = tail call i32 @IntDisable(i32 %6)
%11 = tail call i32 @IntUnregister(i32 %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, void const *, size_t);
void *xcalloc(int, size_t);
void *xmemdup(void const *input, size_t copy_size, size_t alloc_size) {
  void *output = xcalloc(1, alloc_size);
  memcpy(output, input, copy_size);
  return output;
}


x86 assembly (clang, -O0):
<xmemdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
mov    $0x1,%edi
call   1040 <xcalloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1030 <memcpy@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmemdup>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
mov    $0x1,%edi
mov    %rdx,%rsi
call   1040 <xcalloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
call   1030 <memcpy@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @xmemdup(i8* %0, i64 %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i64
%7 = alloca i8*
store i8* %0, i8** %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%8 = load i64, i64* %6
%9 = call i8* @xcalloc(i32 1, i64 %8)
store i8* %9, i8** %7
%10 = load i8*, i8** %7
%11 = load i8*, i8** %4
%12 = load i64, i64* %5
%13 = call i32 @memcpy(i8* %10, i8* %11, i64 %12)
%14 = load i8*, i8** %7
ret i8* %14
}

LLVM IR (-O2):
define i8* @xmemdup(i8* %0, i64 %1, i64 %2) {
%4 = tail call i8* @xcalloc(i32 1, i64 %2)
%5 = tail call i32 @memcpy(i8* %4, i8* %0, i64 %1)
ret i8* %4
}
void sscop_retrans_timeout(data) unsigned long data;
{ struct sscop *sp = (struct sscop *)data; }


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

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

LLVM IR (-O0):
%struct.sscop = type opaque
define void @sscop_retrans_timeout(i64 %0) {
%2 = alloca i64
%3 = alloca %struct.sscop*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = inttoptr i64 %4 to %struct.sscop*
store %struct.sscop* %5, %struct.sscop** %3
ret void
}

LLVM IR (-O2):
define void @sscop_retrans_timeout(i64 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SEQ_DUMPBUF();
void seq_flush(void) { SEQ_DUMPBUF(); }


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

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

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

LLVM IR (-O2):
define void @seq_flush() {
%1 = tail call i32 (...) @SEQ_DUMPBUF()
ret void
}
int ansikclose() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @ansikclose() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0xc8() {
  Assert_real((isxdigit(200) == 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_isxdigit.c",
              1005, ("isxdigit should be 0 for 0xc8"));
}


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

x86 assembly (clang, -O2):
<t_isxdigit_0xc8>:
push   %rax
mov    $0xc8,%edi
call   1030 <isxdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x3ed,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 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_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0xc8\00"
define void @t_isxdigit_0xc8() {
%1 = call i64 @isxdigit(i32 200)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 1005, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 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_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0xc8\00"
define void @t_isxdigit_0xc8() {
%1 = tail call i64 @isxdigit(i32 200)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 1005, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
long _mod(long EV_a, long EV_b) { return (EV_a - ((EV_a / EV_b) * EV_b)); }


x86 assembly (clang, -O0):
<_mod>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
cqto
idivq  -0x10(%rbp)
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
imul   -0x10(%rbp),%rcx
sub    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_mod>:
mov    %rdi,%rax
mov    %rdi,%rcx
or     %rsi,%rcx
shr    $0x20,%rcx
je     1118 <_mod+0x18>
cqto
idiv   %rsi
mov    %rdx,%rax
ret
xor    %edx,%edx
div    %esi
mov    %edx,%eax
ret

LLVM IR (-O0):
define i64 @_mod(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* %3
%7 = load i64, i64* %4
%8 = sdiv i64 %6, %7
%9 = load i64, i64* %4
%10 = mul nsw i64 %8, %9
%11 = sub nsw i64 %5, %10
ret i64 %11
}

LLVM IR (-O2):
define i64 @_mod(i64 %0, i64 %1) {
%3 = srem i64 %0, %1
ret i64 %3
}
/* Type definitions */
struct radeon_compiler {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ rc_error(struct radeon_compiler *, char *, char const *, int,
                            char const *);
int rc_if_fail_helper(struct radeon_compiler *c, const char *file, int line,
                      const char *assertion) {
  rc_error(c, "ICE at %s:%i: assertion failed: %s\n", file, line, assertion);
  return 1;
}


x86 assembly (clang, -O0):
<rc_if_fail_helper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    -0x20(%rbp),%r8
lea    0xec3(%rip),%rsi
call   1030 <rc_error@plt>
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rc_if_fail_helper>:
push   %rax
mov    %rcx,%r8
mov    %edx,%ecx
mov    %rsi,%rdx
lea    0xee0(%rip),%rsi
call   1030 <rc_error@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.radeon_compiler = type { i32 }
@.str = [36 x i8] c"ICE at %s:%i: assertion failed: %s\0A\00"
define i32 @rc_if_fail_helper(%struct.radeon_compiler* %0, i8* %1, i32 %2, i8* %3) {
%5 = alloca %struct.radeon_compiler*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
store %struct.radeon_compiler* %0, %struct.radeon_compiler** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i8* %3, i8** %8
%9 = load %struct.radeon_compiler*, %struct.radeon_compiler** %5
%10 = load i8*, i8** %6
%11 = load i32, i32* %7
%12 = load i8*, i8** %8
%13 = call i32 @rc_error(%struct.radeon_compiler* %9, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8* %10, i32 %11, i8* %12)
ret i32 1
}

LLVM IR (-O2):
%struct.radeon_compiler = type { i32 }
@.str = [36 x i8] c"ICE at %s:%i: assertion failed: %s\0A\00"
define i32 @rc_if_fail_helper(%struct.radeon_compiler* %0, i8* %1, i32 %2, i8* %3) {
%5 = tail call i32 @rc_error(%struct.radeon_compiler* %0, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8* %1, i32 %2, i8* %3)
ret i32 1
}
void GB_ISNE_f_FP32(float *z, const float *x, const float *y) {
  (*z) = ((*x) != (*y));
}


x86 assembly (clang, -O0):
<GB_ISNE_f_FP32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x18(%rbp),%rax
ucomiss (%rax),%xmm0
setne  %al
setp   %cl
or     %cl,%al
and    $0x1,%al
movzbl %al,%eax
cvtsi2ss %eax,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<GB_ISNE_f_FP32>:
movss  (%rdx),%xmm0
cmpneqss (%rsi),%xmm0
movss  0xeef(%rip),%xmm1
andps  %xmm0,%xmm1
movss  %xmm1,(%rdi)
ret

LLVM IR (-O0):
define void @GB_ISNE_f_FP32(float* %0, float* %1, float* %2) {
%4 = alloca float*
%5 = alloca float*
%6 = alloca float*
store float* %0, float** %4
store float* %1, float** %5
store float* %2, float** %6
%7 = load float*, float** %5
%8 = load float, float* %7
%9 = load float*, float** %6
%10 = load float, float* %9
%11 = fcmp une float %8, %10
%12 = zext i1 %11 to i32
%13 = sitofp i32 %12 to float
%14 = load float*, float** %4
store float %13, float* %14
ret void
}

LLVM IR (-O2):
define void @GB_ISNE_f_FP32(float* nocapture writeonly %0, float* nocapture %1, float* nocapture %2) {
%4 = load float, float* %1
%5 = load float, float* %2
%6 = fcmp une float %4, %5
%7 = uitofp i1 %6 to float
store float %7, float* %0
ret void
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int quaddobl_scale_solutions(int dim, int basis, double *cff) {
  int fail;
  fail = _ada_use_c2phc(596, &dim, &basis, cff);
  return fail;
}


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

x86 assembly (clang, -O2):
<quaddobl_scale_solutions>:
push   %rax
mov    %rdx,%rcx
mov    %edi,0x4(%rsp)
mov    %esi,(%rsp)
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
mov    $0x254,%edi
call   1030 <_ada_use_c2phc@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @quaddobl_scale_solutions(i32 %0, i32 %1, double* %2) {
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = call i32 @_ada_use_c2phc(i32 596, i32* %4, i32* %5, double* %2)
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ msg;

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ STDERR_FILENO;
int /*<<< orphan*/ _exit(int /*<<< orphan*/);
int /*<<< orphan*/ write(int /*<<< orphan*/, char const *, int);
void segv_handler(int sig __attribute__((__unused__))) {
  static const char msg[] = "cmp: Input/output error (caught SIGSEGV)\n";
  write(STDERR_FILENO, msg, sizeof(msg));
  _exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<segv_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
lea    0xec5(%rip),%rsi
mov    $0x2a,%edx
call   1040 <write@plt>
mov    0x2e8c(%rip),%rax
mov    (%rax),%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<segv_handler>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
mov    $0x2a,%edx
call   1040 <write@plt>
mov    0x2e96(%rip),%rax
mov    (%rax),%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
@segv_handler.msg = internal constant [42 x i8] c"cmp: Input/output error (caught SIGSEGV)\0A\00"
@STDERR_FILENO = global i32 0
@EXIT_FAILURE = global i32 0
define void @segv_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @STDERR_FILENO
%4 = call i32 @write(i32 %3, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @segv_handler.msg, i64 0, i64 0), i32 42)
%5 = load i32, i32* @EXIT_FAILURE
%6 = call i32 @_exit(i32 %5)
unreachable
}

LLVM IR (-O2):
@segv_handler.msg = internal constant [42 x i8] c"cmp: Input/output error (caught SIGSEGV)\0A\00"
@STDERR_FILENO = global i32 0
@EXIT_FAILURE = global i32 0
define void @segv_handler(i32 %0) {
%2 = load i32, i32* @STDERR_FILENO
%3 = tail call i32 @write(i32 %2, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @segv_handler.msg, i64 0, i64 0), i32 42)
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @_exit(i32 %4)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void detect(void) { printf("正在检测颜色是否均匀...\n"); }


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

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

LLVM IR (-O0):
@.str = [35 x i8] c"\E6\AD\A3\E5\9C\A8\E6\A3\80\E6\B5\8B\E9\A2\9C\E8\89\B2\E6\98\AF\E5\90\A6\E5\9D\87\E5\8C\80...\0A\00"
define void @detect() {
%1 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [34 x i8] c"\E6\AD\A3\E5\9C\A8\E6\A3\80\E6\B5\8B\E9\A2\9C\E8\89\B2\E6\98\AF\E5\90\A6\E5\9D\87\E5\8C\80...\00"
define void @detect() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str, i64 0, i64 0))
ret void
}