xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ fn1();
int /*<<< orphan*/ fn10();
int /*<<< orphan*/ fn11();
int /*<<< orphan*/ fn12();
int /*<<< orphan*/ fn2();
int /*<<< orphan*/ fn3();
int /*<<< orphan*/ fn4();
int /*<<< orphan*/ fn5();
int /*<<< orphan*/ fn6();
int /*<<< orphan*/ fn7();
int /*<<< orphan*/ fn8();
int /*<<< orphan*/ fn9();
int main(void) {
  fn1();
  fn2();
  fn3();
  fn4();
  fn5();
  fn6();
  fn7();
  fn8();
  fn9();
  fn10();
  fn11();
  fn12();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1060 <fn1@plt>
mov    $0x0,%al
call   10e0 <fn2@plt>
mov    $0x0,%al
call   1080 <fn3@plt>
mov    $0x0,%al
call   10d0 <fn4@plt>
mov    $0x0,%al
call   1090 <fn5@plt>
mov    $0x0,%al
call   10c0 <fn6@plt>
mov    $0x0,%al
call   1050 <fn7@plt>
mov    $0x0,%al
call   10b0 <fn8@plt>
mov    $0x0,%al
call   1070 <fn9@plt>
mov    $0x0,%al
call   1040 <fn10@plt>
mov    $0x0,%al
call   10a0 <fn11@plt>
mov    $0x0,%al
call   1030 <fn12@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1060 <fn1@plt>
xor    %eax,%eax
call   10e0 <fn2@plt>
xor    %eax,%eax
call   1080 <fn3@plt>
xor    %eax,%eax
call   10d0 <fn4@plt>
xor    %eax,%eax
call   1090 <fn5@plt>
xor    %eax,%eax
call   10c0 <fn6@plt>
xor    %eax,%eax
call   1050 <fn7@plt>
xor    %eax,%eax
call   10b0 <fn8@plt>
xor    %eax,%eax
call   1070 <fn9@plt>
xor    %eax,%eax
call   1040 <fn10@plt>
xor    %eax,%eax
call   10a0 <fn11@plt>
xor    %eax,%eax
call   1030 <fn12@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @fn1()
%3 = call i32 (...) @fn2()
%4 = call i32 (...) @fn3()
%5 = call i32 (...) @fn4()
%6 = call i32 (...) @fn5()
%7 = call i32 (...) @fn6()
%8 = call i32 (...) @fn7()
%9 = call i32 (...) @fn8()
%10 = call i32 (...) @fn9()
%11 = call i32 (...) @fn10()
%12 = call i32 (...) @fn11()
%13 = call i32 (...) @fn12()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @fn1()
%2 = tail call i32 (...) @fn2()
%3 = tail call i32 (...) @fn3()
%4 = tail call i32 (...) @fn4()
%5 = tail call i32 (...) @fn5()
%6 = tail call i32 (...) @fn6()
%7 = tail call i32 (...) @fn7()
%8 = tail call i32 (...) @fn8()
%9 = tail call i32 (...) @fn9()
%10 = tail call i32 (...) @fn10()
%11 = tail call i32 (...) @fn11()
%12 = tail call i32 (...) @fn12()
ret i32 0
}
void halt(void) { __asm __volatile("hlt"); }


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

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

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

LLVM IR (-O2):
define void @halt() {
tail call void asm sideeffect "hlt", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void fail(char *msg) {
  fprintf(stderr, "closefrom: %s\n", msg);
  exit(1);
}


x86 assembly (clang, -O0):
<fail>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<fail>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [15 x i8] c"closefrom: %s\0A\00"
define void @fail(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isupper(int);
void t_isupper_0x1d() {
  Assert_real((isupper(29) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isupper.c",
              150, ("isupper should be 0 for 0x1d"));
}


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

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

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0x1d\00"
define void @t_isupper_0x1d() {
%1 = call i64 @isupper(i32 29)
%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 150, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0x1d\00"
define void @t_isupper_0x1d() {
%1 = tail call i64 @isupper(i32 29)
%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 150, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void frm_gpu_done(void) {}


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

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

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

LLVM IR (-O2):
define void @frm_gpu_done() {
ret void
}
double dabs(double a) {
  if (a < 0)
    return -a;
  else
    return a;
}


x86 assembly (clang, -O0):
<dabs>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    113d <dabs+0x3d>
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1147 <dabs+0x47>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<dabs>:
movapd 0xef8(%rip),%xmm2
xorpd  %xmm0,%xmm2
xorpd  %xmm3,%xmm3
movapd %xmm0,%xmm1
cmpltsd %xmm3,%xmm1
andpd  %xmm1,%xmm2
andnpd %xmm0,%xmm1
orpd   %xmm2,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @dabs(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp olt double %4, 0.000000e+00
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load double, double* %3
%8 = fneg double %7
store double %8, double* %2
br label %11
9: ; preds = %1
%10 = load double, double* %3
store double %10, double* %2
br label %11
11: ; preds = %9, %6
%12 = load double, double* %2
ret double %12
}

LLVM IR (-O2):
define double @dabs(double %0) {
%2 = fcmp olt double %0, 0.000000e+00
%3 = fneg double %0
%4 = select i1 %2, double %3, double %0
ret double %4
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_mutex_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int);
int pthread_mutex_lock(int /*<<< orphan*/ *);
void Pthread_mutex_lock(pthread_mutex_t *m) {
  int rc = pthread_mutex_lock(m);
  assert(rc == 0);
}


x86 assembly (clang, -O0):
<Pthread_mutex_lock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <pthread_mutex_lock@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Pthread_mutex_lock>:
push   %rax
call   1040 <pthread_mutex_lock@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
pop    %rax
jmp    1030 <assert@plt>

LLVM IR (-O0):
define void @Pthread_mutex_lock(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 @pthread_mutex_lock(i32* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp eq i32 %6, 0
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
ret void
}

LLVM IR (-O2):
define void @Pthread_mutex_lock(i32* %0) {
%2 = tail call i32 @pthread_mutex_lock(i32* %0)
%3 = icmp eq i32 %2, 0
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ sleep(int);
void *my_procedure(void *vargp) {
  sleep(1);
  printf("thread\n");
  return NULL;
}


x86 assembly (clang, -O0):
<my_procedure>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x1,%edi
call   1040 <sleep@plt>
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_procedure>:
push   %rax
mov    $0x1,%edi
call   1040 <sleep@plt>
lea    0xece(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@str = [7 x i8] c"thread\00"
define noalias i8* @my_procedure(i8* nocapture readnone %0) {
%2 = tail call i32 @sleep(i32 1)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
ret i8* null
}
/* Variables and functions */
char *malloc(int);
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
char *test() {
  char *res = malloc(sizeof(char) * 10);
  strcpy(res, "loltesg");
  for (int i = 0; i < 3; i++) {
    strcat(res, "l");
  }
  return res;
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xa,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xeaf(%rip),%rsi
call   1030 <strcpy@plt>
movl   $0x0,-0xc(%rbp)
cmpl   $0x3,-0xc(%rbp)
jge    1185 <test+0x55>
mov    -0x8(%rbp),%rdi
lea    0xe96(%rip),%rsi
call   1050 <strcat@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    115d <test+0x2d>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %r14
push   %rbx
push   %rax
mov    $0xa,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
lea    0xeb8(%rip),%rsi
mov    %rax,%rdi
call   1030 <strcpy@plt>
lea    0xeb1(%rip),%r14
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <strcat@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <strcat@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <strcat@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [8 x i8] c"loltesg\00"
@.str.1 = [2 x i8] c"l\00"
define i8* @test() {
%1 = alloca i8*
%2 = alloca i32
%3 = call i8* @malloc(i32 10)
store i8* %3, i8** %1
%4 = load i8*, i8** %1
%5 = call i32 @strcpy(i8* %4, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %2
br label %6
6: ; preds = %12, %0
%7 = load i32, i32* %2
%8 = icmp slt i32 %7, 3
br i1 %8, label %9, label %15
9: ; preds = %6
%10 = load i8*, i8** %1
%11 = call i32 @strcat(i8* %10, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %12
12: ; preds = %9
%13 = load i32, i32* %2
%14 = add nsw i32 %13, 1
store i32 %14, i32* %2
br label %6
15: ; preds = %6
%16 = load i8*, i8** %1
ret i8* %16
}

LLVM IR (-O2):
@.str = [8 x i8] c"loltesg\00"
@.str.1 = [2 x i8] c"l\00"
define i8* @test() {
%1 = tail call dereferenceable_or_null(10) i8* @malloc(i32 10)
%2 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @strcat(i8* %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @strcat(i8* %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @strcat(i8* %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret i8* %1
}
/* Variables and functions */
int /*<<< orphan*/ disable_button_interrupt();
void selectMMC(void) {
  disable_button_interrupt();
  (*(volatile unsigned long *)((0xE0028008))) |= 0x00004000;
  (*(volatile unsigned long *)((0xE002800C))) = 0x00004000;
}


x86 assembly (clang, -O0):
<selectMMC>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <disable_button_interrupt@plt>
mov    $0xe0028008,%eax
mov    (%rax),%rcx
or     $0x4000,%rcx
mov    $0xe0028008,%eax
mov    %rcx,(%rax)
mov    $0xe002800c,%eax
movq   $0x4000,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<selectMMC>:
push   %rax
xor    %eax,%eax
call   1030 <disable_button_interrupt@plt>
mov    $0xe0028008,%eax
orq    $0x4000,(%rax)
movq   $0x4000,0x4(%rax)
pop    %rax
ret

LLVM IR (-O0):
define void @selectMMC() {
%1 = call i32 (...) @disable_button_interrupt()
%2 = load volatile i64, i64* inttoptr (i64 3758260232 to i64*)
%3 = or i64 %2, 16384
store volatile i64 %3, i64* inttoptr (i64 3758260232 to i64*)
store volatile i64 16384, i64* inttoptr (i64 3758260236 to i64*)
ret void
}

LLVM IR (-O2):
define void @selectMMC() {
%1 = tail call i32 (...) @disable_button_interrupt()
%2 = load volatile i64, i64* inttoptr (i64 3758260232 to i64*)
%3 = or i64 %2, 16384
store volatile i64 %3, i64* inttoptr (i64 3758260232 to i64*)
store volatile i64 16384, i64* inttoptr (i64 3758260236 to i64*)
ret void
}
/* Type definitions */
typedef char uint8_t;

/* Variables and functions */
scalar_t__ isalpha(char);
scalar_t__ isdigit(char);
int is_ident_char(uint8_t ch) {
  return isalpha(ch) || isdigit(ch) || ch == '_';
}


x86 assembly (clang, -O0):
<is_ident_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1040 <isalpha@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x2(%rbp)
jne    1171 <is_ident_char+0x51>
movsbl -0x1(%rbp),%edi
call   1030 <isdigit@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x2(%rbp)
jne    1171 <is_ident_char+0x51>
movsbl -0x1(%rbp),%eax
cmp    $0x5f,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_ident_char>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
call   1040 <isalpha@plt>
mov    $0x1,%ebx
test   %rax,%rax
jne    114b <is_ident_char+0x2b>
movsbl %bpl,%edi
call   1030 <isdigit@plt>
test   %rax,%rax
jne    114b <is_ident_char+0x2b>
xor    %ebx,%ebx
cmp    $0x5f,%bpl
sete   %bl
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @is_ident_char(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i64 @isalpha(i8 signext %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %14, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = call i64 @isdigit(i8 signext %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %14, label %10
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 95
br label %14
14: ; preds = %10, %6, %1
%15 = phi i1 [ true, %6 ], [ true, %1 ], [ %13, %10 ]
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @is_ident_char(i8 signext %0) {
%2 = tail call i64 @isalpha(i8 signext %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %10
4: ; preds = %1
%5 = tail call i64 @isdigit(i8 signext %0)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %4
%8 = icmp eq i8 %0, 95
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %7, %4, %1
%11 = phi i32 [ 1, %4 ], [ 1, %1 ], [ %9, %7 ]
ret i32 %11
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
int /*<<< orphan*/ port_92_writeb(int, int, void *);
void port_92_writew(uint16_t port, uint16_t val, void *priv) {
  port_92_writeb(port, val & 0xff, priv);
}


x86 assembly (clang, -O0):
<port_92_writew>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
and    $0xff,%esi
mov    -0x10(%rbp),%rdx
call   1030 <port_92_writeb@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<port_92_writew>:
movzbl %sil,%esi
jmp    1030 <port_92_writeb@plt>

LLVM IR (-O0):
define void @port_92_writew(i32 %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = and i32 %8, 255
%10 = load i8*, i8** %6
%11 = call i32 @port_92_writeb(i32 %7, i32 %9, i8* %10)
ret void
}

LLVM IR (-O2):
define void @port_92_writew(i32 %0, i32 %1, i8* %2) {
%4 = and i32 %1, 255
%5 = tail call i32 @port_92_writeb(i32 %0, i32 %4, i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int time(int /*<<< orphan*/);
void maybe_abort() {
  if (time(0) != 42) {
    abort();
  }
}


x86 assembly (clang, -O0):
<maybe_abort>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1040 <time@plt>
cmp    $0x2a,%eax
je     113b <maybe_abort+0x1b>
mov    $0x0,%al
call   1030 <abort@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<maybe_abort>:
push   %rax
xor    %edi,%edi
call   1040 <time@plt>
cmp    $0x2a,%eax
jne    112f <maybe_abort+0xf>
pop    %rax
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @maybe_abort() {
%1 = call i32 @time(i32 0)
%2 = icmp ne i32 %1, 42
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 (...) @abort()
unreachable
5: ; preds = %0
ret void
}

LLVM IR (-O2):
define void @maybe_abort() {
%1 = tail call i32 @time(i32 0)
%2 = icmp eq i32 %1, 42
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
ret void
}
void DPRINT2(const char *fmt, ...) {}


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

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

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

LLVM IR (-O2):
define void @DPRINT2(i8* nocapture %0, ...) {
ret void
}
void geopolySwab32(unsigned char *a) {
  unsigned char t = a[0];
  a[0] = a[3];
  a[3] = t;
  t = a[1];
  a[1] = a[2];
  a[2] = t;
}


x86 assembly (clang, -O0):
<geopolySwab32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rax
mov    0x3(%rax),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x9(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x3(%rax)
mov    -0x8(%rbp),%rax
mov    0x1(%rax),%al
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rax
mov    0x2(%rax),%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0x9(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x2(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<geopolySwab32>:
mov    (%rdi),%al
mov    0x3(%rdi),%cl
mov    %cl,(%rdi)
mov    %al,0x3(%rdi)
rolw   $0x8,0x1(%rdi)
ret

LLVM IR (-O0):
define void @geopolySwab32(i8* %0) {
%2 = alloca i8*
%3 = alloca i8
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i64 0
%6 = load i8, i8* %5
store i8 %6, i8* %3
%7 = load i8*, i8** %2
%8 = getelementptr inbounds i8, i8* %7, i64 3
%9 = load i8, i8* %8
%10 = load i8*, i8** %2
%11 = getelementptr inbounds i8, i8* %10, i64 0
store i8 %9, i8* %11
%12 = load i8, i8* %3
%13 = load i8*, i8** %2
%14 = getelementptr inbounds i8, i8* %13, i64 3
store i8 %12, i8* %14
%15 = load i8*, i8** %2
%16 = getelementptr inbounds i8, i8* %15, i64 1
%17 = load i8, i8* %16
store i8 %17, i8* %3
%18 = load i8*, i8** %2
%19 = getelementptr inbounds i8, i8* %18, i64 2
%20 = load i8, i8* %19
%21 = load i8*, i8** %2
%22 = getelementptr inbounds i8, i8* %21, i64 1
store i8 %20, i8* %22
%23 = load i8, i8* %3
%24 = load i8*, i8** %2
%25 = getelementptr inbounds i8, i8* %24, i64 2
store i8 %23, i8* %25
ret void
}

LLVM IR (-O2):
define void @geopolySwab32(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = getelementptr inbounds i8, i8* %0, i64 3
%4 = load i8, i8* %3
store i8 %4, i8* %0
store i8 %2, i8* %3
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = getelementptr inbounds i8, i8* %0, i64 2
%8 = load i8, i8* %7
store i8 %8, i8* %5
store i8 %6, i8* %7
ret void
}
void f(void) { return; }


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

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

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

LLVM IR (-O2):
define void @f() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ link_failure_tgamma();
scalar_t__ tgamma(double);
void test_tgamma(double d) {
  if (tgamma(d) != tgamma(d))
    link_failure_tgamma();
}


x86 assembly (clang, -O0):
<test_tgamma>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <tgamma@plt>
mov    %rax,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <tgamma@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
cmp    %rcx,%rax
je     115c <test_tgamma+0x3c>
mov    $0x0,%al
call   1040 <link_failure_tgamma@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_tgamma>:
push   %rbx
sub    $0x10,%rsp
movsd  %xmm0,0x8(%rsp)
call   1030 <tgamma@plt>
mov    %rax,%rbx
movsd  0x8(%rsp),%xmm0
call   1030 <tgamma@plt>
cmp    %rax,%rbx
jne    1149 <test_tgamma+0x29>
add    $0x10,%rsp
pop    %rbx
ret
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
jmp    1040 <link_failure_tgamma@plt>

LLVM IR (-O0):
define void @test_tgamma(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i64 @tgamma(double %3)
%5 = load double, double* %2
%6 = call i64 @tgamma(double %5)
%7 = icmp ne i64 %4, %6
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 (...) @link_failure_tgamma()
br label %10
10: ; preds = %8, %1
ret void
}

LLVM IR (-O2):
define void @test_tgamma(double %0) {
%2 = tail call i64 @tgamma(double %0)
%3 = tail call i64 @tgamma(double %0)
%4 = icmp eq i64 %2, %3
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 (...) @link_failure_tgamma()
br label %7
7: ; preds = %5, %1
ret void
}
void test_rindex(void) {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test1()
%2 = tail call i32 (...) @test2()
ret i32 0
}
void RTPathJoinA(void) {}


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

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

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

LLVM IR (-O2):
define void @RTPathJoinA() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char *);
int cbSingle(char *data, int argc, char **argv, char **azColName) {
  strcpy(data, argv[0]);
  return 0;
}


x86 assembly (clang, -O0):
<cbSingle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rax
mov    (%rax),%rsi
call   1030 <strcpy@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cbSingle>:
push   %rax
mov    (%rdx),%rsi
call   1030 <strcpy@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @cbSingle(i8* %0, i32 %1, i8** nocapture %2, i8** nocapture readnone %3) {
%5 = load i8*, i8** %2
%6 = tail call i32 @strcpy(i8* %0, i8* %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ BLSLOAD_CHECK_MAIN();
void blsload_check_main() { BLSLOAD_CHECK_MAIN(); }


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

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

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

LLVM IR (-O2):
define void @blsload_check_main() {
%1 = tail call i32 (...) @BLSLOAD_CHECK_MAIN()
ret void
}
void rcon_command(char *text) {}


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

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

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

LLVM IR (-O2):
define void @rcon_command(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int cup(int);
int /*<<< orphan*/ hpig(int *, int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int *spig(int);
main() {
  int b;
  b = 0;
  int *k;
  printf("数列生成器\n数列的长度?\n");
  scanf("%d", &b);
  b = cup(b);
  k = spig(b);
  hpig(k, b);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe9a(%rip),%rdi
call   1030 <printf@plt>
lea    0xeb0(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1060 <scanf@plt>
mov    -0x4(%rbp),%edi
call   1050 <cup@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <spig@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%esi
call   1070 <hpig@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0xea3(%rip),%rdi
call   1030 <puts@plt>
lea    0xe94(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1060 <scanf@plt>
mov    0x4(%rsp),%edi
call   1050 <cup@plt>
mov    %eax,0x4(%rsp)
mov    %eax,%edi
call   1040 <spig@plt>
mov    0x4(%rsp),%esi
mov    %rax,%rdi
call   1070 <hpig@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [34 x i8] c"\E6\95\B0\E5\88\97\E7\94\9F\E6\88\90\E5\99\A8\0A\E6\95\B0\E5\88\97\E7\9A\84\E9\95\BF\E5\BA\A6?\0A\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @cup(i32 %5)
store i32 %6, i32* %1
%7 = load i32, i32* %1
%8 = call i32* @spig(i32 %7)
store i32* %8, i32** %2
%9 = load i32*, i32** %2
%10 = load i32, i32* %1
%11 = call i32 @hpig(i32* %9, i32 %10)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@str = [33 x i8] c"\E6\95\B0\E5\88\97\E7\94\9F\E6\88\90\E5\99\A8\0A\E6\95\B0\E5\88\97\E7\9A\84\E9\95\BF\E5\BA\A6?\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @cup(i32 %5)
store i32 %6, i32* %1
%7 = call i32* @spig(i32 %6)
%8 = load i32, i32* %1
%9 = call i32 @hpig(i32* %7, i32 %8)
ret i32 0
}
/* Variables and functions */
int yas_bma150_read_reg(unsigned char, unsigned char *, int);
int yas_bma150_read_reg_byte(unsigned char adr) {
  unsigned char buf;
  int err;
  err = yas_bma150_read_reg(adr, &buf, 1);
  if (err == 0) {
    return buf;
  }
  return 0;
}


x86 assembly (clang, -O0):
<yas_bma150_read_reg_byte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
lea    -0x6(%rbp),%rsi
mov    $0x1,%edx
movzbl -0x5(%rbp),%edi
call   1030 <yas_bma150_read_reg@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1149 <yas_bma150_read_reg_byte+0x39>
movzbl -0x6(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1150 <yas_bma150_read_reg_byte+0x40>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yas_bma150_read_reg_byte>:
push   %rax
lea    0x7(%rsp),%rsi
mov    $0x1,%edx
call   1030 <yas_bma150_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_bma150_read_reg_byte(i8 zeroext %0) {
%2 = alloca i32
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
store i8 %0, i8* %3
%6 = load i8, i8* %3
%7 = call i32 @yas_bma150_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_bma150_read_reg_byte(i8 zeroext %0) {
%2 = alloca i8
%3 = call i32 @yas_bma150_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
}
int isVowel(char c) {
  char x = c | 0x20;
  return (x == 'a' || x == 'e' || x == 'i' || x == 'o' || x == 'u');
}


x86 assembly (clang, -O0):
<isVowel>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
or     $0x20,%eax
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%ecx
mov    $0x1,%al
cmp    $0x61,%ecx
mov    %al,-0x3(%rbp)
je     1169 <isVowel+0x69>
movsbl -0x2(%rbp),%ecx
mov    $0x1,%al
cmp    $0x65,%ecx
mov    %al,-0x3(%rbp)
je     1169 <isVowel+0x69>
movsbl -0x2(%rbp),%ecx
mov    $0x1,%al
cmp    $0x69,%ecx
mov    %al,-0x3(%rbp)
je     1169 <isVowel+0x69>
movsbl -0x2(%rbp),%ecx
mov    $0x1,%al
cmp    $0x6f,%ecx
mov    %al,-0x3(%rbp)
je     1169 <isVowel+0x69>
movsbl -0x2(%rbp),%eax
cmp    $0x75,%eax
sete   %al
mov    %al,-0x3(%rbp)
mov    -0x3(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isVowel>:
mov    %edi,%eax
or     $0x20,%al
and    $0xdb,%dil
cmp    $0x41,%dil
sete   %cl
cmp    $0x69,%al
sete   %dl
or     %cl,%dl
cmp    $0x6f,%al
sete   %cl
cmp    $0x75,%al
sete   %al
or     %cl,%al
or     %dl,%al
movzbl %al,%eax
ret

LLVM IR (-O0):
define i32 @isVowel(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %2
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
%6 = or i32 %5, 32
%7 = trunc i32 %6 to i8
store i8 %7, i8* %3
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 97
br i1 %10, label %27, label %11
11: ; preds = %1
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 101
br i1 %14, label %27, label %15
15: ; preds = %11
%16 = load i8, i8* %3
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %17, 105
br i1 %18, label %27, label %19
19: ; preds = %15
%20 = load i8, i8* %3
%21 = sext i8 %20 to i32
%22 = icmp eq i32 %21, 111
br i1 %22, label %27, label %23
23: ; preds = %19
%24 = load i8, i8* %3
%25 = sext i8 %24 to i32
%26 = icmp eq i32 %25, 117
br label %27
27: ; preds = %23, %19, %15, %11, %1
%28 = phi i1 [ true, %19 ], [ true, %15 ], [ true, %11 ], [ true, %1 ], [ %26, %23 ]
%29 = zext i1 %28 to i32
ret i32 %29
}

LLVM IR (-O2):
define i32 @isVowel(i8 signext %0) {
%2 = or i8 %0, 32
%3 = and i8 %0, -37
%4 = icmp eq i8 %3, 65
%5 = icmp eq i8 %2, 105
%6 = or i1 %4, %5
%7 = icmp eq i8 %2, 111
%8 = or i1 %7, %6
%9 = icmp eq i8 %2, 117
%10 = or i1 %9, %8
%11 = zext i1 %10 to i32
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_63() {
  Assert_real((isqrt(63) == 7),
              "/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/stdlib/isqrt.c",
              320, ("Integer square root of 63 should be 7"));
}


x86 assembly (clang, -O0):
<t_sqrt_63>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3f,%edi
call   1030 <isqrt@plt>
cmp    $0x7,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xec0(%rip),%rsi
mov    $0x140,%edx
lea    0xf56(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_sqrt_63>:
push   %rax
mov    $0x3f,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0x7,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x140,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [38 x i8] c"Integer square root of 63 should be 7\00"
define void @t_sqrt_63() {
%1 = call i32 @isqrt(i32 63)
%2 = icmp eq i32 %1, 7
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 320, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [38 x i8] c"Integer square root of 63 should be 7\00"
define void @t_sqrt_63() {
%1 = tail call i32 @isqrt(i32 63)
%2 = icmp eq i32 %1, 7
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 320, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void setup_iconv(void) {}


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

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

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

LLVM IR (-O2):
define void @setup_iconv() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ F_LOCK;
scalar_t__ lockf(int, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ sys_error(char *, int);
void write_lock(int fd) {
  if (lockf(fd, F_LOCK, 0) < 0)
    sys_error("lockf (LOCK) failed", 258);
}


x86 assembly (clang, -O0):
<write_lock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eb3(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <lockf@plt>
cmp    $0x0,%rax
jge    1159 <write_lock+0x39>
lea    0xeb1(%rip),%rdi
mov    $0x102,%esi
call   1040 <sys_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_lock>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <lockf@plt>
test   %rax,%rax
js     1138 <write_lock+0x18>
pop    %rax
ret
lea    0xec1(%rip),%rdi
mov    $0x102,%esi
pop    %rax
jmp    1040 <sys_error@plt>

LLVM IR (-O0):
@F_LOCK = global i32 0
@.str = [20 x i8] c"lockf (LOCK) failed\00"
define void @write_lock(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @F_LOCK
%5 = call i64 @lockf(i32 %3, i32 %4, i32 0)
%6 = icmp slt i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 @sys_error(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 258)
br label %9
9: ; preds = %7, %1
ret void
}

LLVM IR (-O2):
@F_LOCK = global i32 0
@.str = [20 x i8] c"lockf (LOCK) failed\00"
define void @write_lock(i32 %0) {
%2 = load i32, i32* @F_LOCK
%3 = tail call i64 @lockf(i32 %0, i32 %2, i32 0)
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 @sys_error(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 258)
br label %7
7: ; preds = %5, %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
int /*<<< orphan*/ STDIN_FILENO;
int read(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ write(int, char *, int);
void stdin_to_serial(int fd) {
  char buf[4096] = {0};
  int size;
  size = read(STDIN_FILENO, buf, sizeof(buf));
  if (size < 0)
    return;
  write(fd, buf, size);
}


x86 assembly (clang, -O0):
<stdin_to_serial>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1020,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x1010(%rbp),%rdi
xor    %esi,%esi
mov    $0x1000,%edx
call   1040 <memset@plt>
mov    0x2e88(%rip),%rax
mov    (%rax),%edi
lea    -0x1010(%rbp),%rsi
mov    $0x1000,%edx
call   1050 <read@plt>
mov    %eax,-0x1014(%rbp)
cmpl   $0x0,-0x1014(%rbp)
jge    1183 <stdin_to_serial+0x53>
jmp    1198 <stdin_to_serial+0x68>
mov    -0x4(%rbp),%edi
lea    -0x1010(%rbp),%rsi
mov    -0x1014(%rbp),%edx
call   1030 <write@plt>
add    $0x1020,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stdin_to_serial>:
push   %rbp
push   %rbx
sub    $0x1008,%rsp
mov    %edi,%ebp
mov    %rsp,%rbx
mov    $0x1000,%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <memset@plt>
mov    0x2e8c(%rip),%rax
mov    (%rax),%edi
mov    %rbx,%rsi
mov    $0x1000,%edx
call   1050 <read@plt>
test   %eax,%eax
js     1173 <stdin_to_serial+0x43>
mov    %rsp,%rsi
mov    %ebp,%edi
mov    %eax,%edx
call   1030 <write@plt>
add    $0x1008,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@STDIN_FILENO = global i32 0
define void @stdin_to_serial(i32 %0) {
%2 = alloca i32
%3 = alloca [4096 x i8]
%4 = alloca i32
store i32 %0, i32* %2
%5 = bitcast [4096 x i8]* %3 to i8*
%6 = load i32, i32* @STDIN_FILENO
%7 = getelementptr inbounds [4096 x i8], [4096 x i8]* %3, i64 0, i64 0
%8 = call i32 @read(i32 %6, i8* %7, i32 4096)
store i32 %8, i32* %4
%9 = load i32, i32* %4
%10 = icmp slt i32 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %1
br label %17
12: ; preds = %1
%13 = load i32, i32* %2
%14 = getelementptr inbounds [4096 x i8], [4096 x i8]* %3, i64 0, i64 0
%15 = load i32, i32* %4
%16 = call i32 @write(i32 %13, i8* %14, i32 %15)
br label %17
17: ; preds = %12, %11
ret void
}

LLVM IR (-O2):
@STDIN_FILENO = global i32 0
define void @stdin_to_serial(i32 %0) {
%2 = alloca [4096 x i8]
%3 = getelementptr inbounds [4096 x i8], [4096 x i8]* %2, i64 0, i64 0
%4 = load i32, i32* @STDIN_FILENO
%5 = call i32 @read(i32 %4, i8* %3, i32 4096)
%6 = icmp slt i32 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %1
%8 = call i32 @write(i32 %0, i8* %3, i32 %5)
br label %9
9: ; preds = %1, %7
ret void
}
int peg_defer_func_NULL(const char *from, const char *to, void *aux) {
  return 1;
}


x86 assembly (clang, -O0):
<peg_defer_func_NULL>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0x1,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @peg_defer_func_NULL(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ endelse(char *, char *, char *);
int /*<<< orphan*/ printf(char *, char *);
void test3(void) {
  char ord1[] = "defsgram";
  char ord2[] = "gram";
  char out[10];
  endelse(ord1, ord2, out);
  printf("%s\n", out);
}


x86 assembly (clang, -O0):
<test3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0xed1(%rip),%rax
mov    %rax,-0x9(%rbp)
mov    0xecf(%rip),%al
mov    %al,-0x1(%rbp)
mov    0xec2(%rip),%eax
mov    %eax,-0xe(%rbp)
mov    0xebd(%rip),%al
mov    %al,-0xa(%rbp)
lea    -0x9(%rbp),%rdi
lea    -0xe(%rbp),%rsi
lea    -0x18(%rbp),%rdx
call   1040 <endelse@plt>
lea    -0x18(%rbp),%rsi
lea    0xe9f(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test3>:
push   %rbx
sub    $0x20,%rsp
movabs $0x6d61726773666564,%rax
72 61 6d
mov    %rax,0x8(%rsp)
movb   $0x0,0x10(%rsp)
movb   $0x0,0x4(%rsp)
movl   $0x6d617267,(%rsp)
lea    0x8(%rsp),%rdi
mov    %rsp,%rsi
lea    0x16(%rsp),%rbx
mov    %rbx,%rdx
call   1040 <endelse@plt>
lea    0xea8(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.test3.ord1 = [9 x i8] c"defsgram\00"
@__const.test3.ord2 = [5 x i8] c"gram\00"
@.str = [4 x i8] c"%s\0A\00"
define void @test3() {
%1 = alloca [9 x i8]
%2 = alloca [5 x i8]
%3 = alloca [10 x i8]
%4 = bitcast [9 x i8]* %1 to i8*
%5 = bitcast [5 x i8]* %2 to i8*
%6 = getelementptr inbounds [9 x i8], [9 x i8]* %1, i64 0, i64 0
%7 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
%8 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%9 = call i32 @endelse(i8* %6, i8* %7, i8* %8)
%10 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%11 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %10)
ret void
}

LLVM IR (-O2):
@__const.test3.ord1 = [9 x i8] c"defsgram\00"
@__const.test3.ord2 = [5 x i8] c"gram\00"
@.str = [4 x i8] c"%s\0A\00"
define void @test3() {
%1 = alloca [9 x i8]
%2 = alloca [5 x i8]
%3 = alloca [10 x i8]
%4 = getelementptr inbounds [9 x i8], [9 x i8]* %1, i64 0, i64 0
%5 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
%6 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%7 = call i32 @endelse(i8* %4, i8* %5, i8* %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ f(long);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, long *);
int main() {
  long N;
  scanf("%ld", &N);
  if (N == 1)
    printf("1\n");
  else
    printf("%lld\n", f(N));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1050 <scanf@plt>
cmpq   $0x1,-0x10(%rbp)
jne    116d <main+0x3d>
lea    0xea3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1186 <main+0x56>
mov    -0x10(%rbp),%rdi
call   1030 <f@plt>
mov    %eax,%esi
lea    0xe88(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeb8(%rip),%rdi
mov    %rsp,%rsi
call   1060 <scanf@plt>
mov    (%rsp),%rdi
cmp    $0x1,%rdi
jne    1168 <main+0x28>
lea    0xea9(%rip),%rdi
call   1030 <puts@plt>
jmp    117d <main+0x3d>
call   1040 <f@plt>
lea    0xe90(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%ld\00"
@.str.2 = [6 x i8] c"%lld\0A\00"
@str = [2 x i8] c"1\00"
define i32 @main() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64* %1)
%4 = load i64, i64* %1
%5 = icmp eq i64 %4, 1
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
br label %11
8: ; preds = %0
%9 = call i32 @f(i64 %4)
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 %9)
br label %11
11: ; preds = %8, %6
ret i32 0
}
__attribute__((const)) int makecol15(int r, int g, int b) {
  return (((r >> 3) << 10) | ((g >> 3) << 5) | ((b >> 3)));
}


x86 assembly (clang, -O0):
<makecol15>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x3,%eax
shl    $0xa,%eax
mov    -0x8(%rbp),%ecx
sar    $0x3,%ecx
shl    $0x5,%ecx
or     %ecx,%eax
mov    -0xc(%rbp),%ecx
sar    $0x3,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<makecol15>:
and    $0xfffffff8,%edi
shl    $0x7,%edi
lea    0x0(,%rsi,4),%eax
and    $0xffffffe0,%eax
or     %edi,%eax
sar    $0x3,%edx
or     %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @makecol15(i32 %0, i32 %1, i32 %2) {
%4 = shl i32 %0, 7
%5 = and i32 %4, -1024
%6 = shl i32 %1, 2
%7 = and i32 %6, -32
%8 = or i32 %7, %5
%9 = ashr i32 %2, 3
%10 = or i32 %8, %9
ret i32 %10
}
void foo403(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo403(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int i = -1;
  i = i * -1 - 2;
  printf("%d", i);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xffffffff,-0x8(%rbp)
imul   $0xffffffff,-0x8(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xec6(%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    $0xffffffff,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

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