xunge/DecIR huggingface dataset:
int foo(int bar) {
  int idx;
  int res = 0;
  for (idx = 1; idx < bar; idx++)
    res += idx;
  res *= idx;
  return (res);
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1138 <foo+0x38>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1115 <foo+0x15>
mov    -0x8(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
xor    %eax,%eax
cmp    $0x2,%edi
jl     111d <foo+0x1d>
lea    -0x2(%rdi),%eax
lea    -0x3(%rdi),%ecx
imul   %rax,%rcx
shr    %rcx
lea    (%rcx,%rdi,2),%eax
add    $0xfffffffd,%eax
imul   %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @foo(i32 %0) {
%2 = icmp sgt i32 %0, 1
br i1 %2, label %3, label %15
3: ; preds = %1
%4 = shl nuw i32 %0, 1
%5 = add nsw i32 %0, -2
%6 = zext i32 %5 to i33
%7 = add nsw i32 %0, -3
%8 = zext i32 %7 to i33
%9 = mul i33 %6, %8
%10 = lshr i33 %9, 1
%11 = trunc i33 %10 to i32
%12 = add i32 %4, %11
%13 = add i32 %12, -3
%14 = mul nsw i32 %13, %0
br label %15
15: ; preds = %3, %1
%16 = phi i32 [ %14, %3 ], [ 0, %1 ]
ret i32 %16
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ perror(char const *);
int /*<<< orphan*/ stderr;
int _wc_error(char const *message, int ret) {
  fputs("wc"
        ": ",
        stderr);
  perror(message);
  return ret;
}


x86 assembly (clang, -O0):
<_wc_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%esi
lea    0xec1(%rip),%rdi
call   1030 <fputs@plt>
mov    -0x8(%rbp),%rdi
call   1040 <perror@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_wc_error>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
mov    0x2eb1(%rip),%rax
mov    (%rax),%esi
lea    0xec8(%rip),%rdi
call   1030 <fputs@plt>
mov    %rbx,%rdi
call   1040 <perror@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [5 x i8] c"wc: \00"
@stderr = global i32 0
define i32 @_wc_error(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @stderr
%6 = call i32 @fputs(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = load i8*, i8** %3
%8 = call i32 @perror(i8* %7)
%9 = load i32, i32* %4
ret i32 %9
}

LLVM IR (-O2):
@.str = [5 x i8] c"wc: \00"
@stderr = global i32 0
define i32 @_wc_error(i8* nocapture %0, i32 returned %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fputs(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 @perror(i8* %0)
ret i32 %1
}
long long longlong_ignoring_unsignedshort(long long x, unsigned short y) {
  return x;
}


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

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

LLVM IR (-O0):
define i64 @longlong_ignoring_unsignedshort(i64 %0, i16 zeroext %1) {
%3 = alloca i64
%4 = alloca i16
store i64 %0, i64* %3
store i16 %1, i16* %4
%5 = load i64, i64* %3
ret i64 %5
}

LLVM IR (-O2):
define i64 @longlong_ignoring_unsignedshort(i64 returned %0, i16 zeroext %1) {
ret i64 %0
}
void answer_edit(void) {}


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

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

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

LLVM IR (-O2):
define void @answer_edit() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ addrange(int, int);
void addranges_S(void) {
  addrange(0, 0x9 - 1);
  addrange(0x9 + 1, 0xA - 1);
  addrange(0xD + 1, 0x20 - 1);
  addrange(0x20 + 1, 0xA0 - 1);
  addrange(0xA0 + 1, 0x2028 - 1);
  addrange(0x2029 + 1, 0xFEFF - 1);
  addrange(0xFEFF + 1, 0xFFFF);
}


x86 assembly (clang, -O0):
<addranges_S>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
mov    $0x8,%esi
call   1030 <addrange@plt>
mov    $0xa,%edi
mov    $0x9,%esi
call   1030 <addrange@plt>
mov    $0xe,%edi
mov    $0x1f,%esi
call   1030 <addrange@plt>
mov    $0x21,%edi
mov    $0x9f,%esi
call   1030 <addrange@plt>
mov    $0xa1,%edi
mov    $0x2027,%esi
call   1030 <addrange@plt>
mov    $0x202a,%edi
mov    $0xfefe,%esi
call   1030 <addrange@plt>
mov    $0xff00,%edi
mov    $0xffff,%esi
call   1030 <addrange@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<addranges_S>:
push   %rax
xor    %edi,%edi
mov    $0x8,%esi
call   1030 <addrange@plt>
mov    $0xa,%edi
mov    $0x9,%esi
call   1030 <addrange@plt>
mov    $0xe,%edi
mov    $0x1f,%esi
call   1030 <addrange@plt>
mov    $0x21,%edi
mov    $0x9f,%esi
call   1030 <addrange@plt>
mov    $0xa1,%edi
mov    $0x2027,%esi
call   1030 <addrange@plt>
mov    $0x202a,%edi
mov    $0xfefe,%esi
call   1030 <addrange@plt>
mov    $0xff00,%edi
mov    $0xffff,%esi
pop    %rax
jmp    1030 <addrange@plt>

LLVM IR (-O0):
define void @addranges_S() {
%1 = call i32 @addrange(i32 0, i32 8)
%2 = call i32 @addrange(i32 10, i32 9)
%3 = call i32 @addrange(i32 14, i32 31)
%4 = call i32 @addrange(i32 33, i32 159)
%5 = call i32 @addrange(i32 161, i32 8231)
%6 = call i32 @addrange(i32 8234, i32 65278)
%7 = call i32 @addrange(i32 65280, i32 65535)
ret void
}

LLVM IR (-O2):
define void @addranges_S() {
%1 = tail call i32 @addrange(i32 0, i32 8)
%2 = tail call i32 @addrange(i32 10, i32 9)
%3 = tail call i32 @addrange(i32 14, i32 31)
%4 = tail call i32 @addrange(i32 33, i32 159)
%5 = tail call i32 @addrange(i32 161, i32 8231)
%6 = tail call i32 @addrange(i32 8234, i32 65278)
%7 = tail call i32 @addrange(i32 65280, i32 65535)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ BNCHz();
int /*<<< orphan*/ BNCIO(int);
int /*<<< orphan*/ IntegerDigits(long);
long int PulseF2(long int iduty) {
  long int stat = 0;
  BNCIO(46);
  BNCIO(2);
  IntegerDigits(iduty);
  BNCHz();
  return (stat);
}


x86 assembly (clang, -O0):
<PulseF2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    $0x2e,%edi
call   1040 <BNCIO@plt>
mov    $0x2,%edi
call   1040 <BNCIO@plt>
mov    -0x8(%rbp),%rdi
call   1030 <IntegerDigits@plt>
mov    $0x0,%al
call   1050 <BNCHz@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PulseF2>:
push   %rbx
mov    %rdi,%rbx
mov    $0x2e,%edi
call   1040 <BNCIO@plt>
mov    $0x2,%edi
call   1040 <BNCIO@plt>
mov    %rbx,%rdi
call   1030 <IntegerDigits@plt>
xor    %eax,%eax
call   1050 <BNCHz@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @PulseF2(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
store i64 0, i64* %3
%4 = call i32 @BNCIO(i32 46)
%5 = call i32 @BNCIO(i32 2)
%6 = load i64, i64* %2
%7 = call i32 @IntegerDigits(i64 %6)
%8 = call i32 (...) @BNCHz()
%9 = load i64, i64* %3
ret i64 %9
}

LLVM IR (-O2):
define i64 @PulseF2(i64 %0) {
%2 = tail call i32 @BNCIO(i32 46)
%3 = tail call i32 @BNCIO(i32 2)
%4 = tail call i32 @IntegerDigits(i64 %0)
%5 = tail call i32 (...) @BNCHz()
ret i64 0
}
int test_imm_D6int8_mem(signed char *val) {
  return ((*val) & (-0xD6 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_D6int8_mem>:
movsbl (%rdi),%eax
test   $0xffffff2a,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_D6int8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = sext i8 %2 to i32
%4 = and i32 %3, -214
%5 = icmp eq i32 %4, 0
%6 = select i1 %5, i32 -40, i32 -20
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ strtoimax(char const *, char **, int);
int /*<<< orphan*/ strtoumax(char const *, char **, int);
void uninitvar_strtoimax(void) {
  const char *s;
  char **endp;
  int base;
  (void)strtoimax(s, endp, base);
  (void)strtoumax(s, endp, base);
}


x86 assembly (clang, -O0):
<uninitvar_strtoimax>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <strtoimax@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1040 <strtoumax@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uninitvar_strtoimax>:
push   %rax
call   1030 <strtoimax@plt>
pop    %rax
jmp    1040 <strtoumax@plt>

LLVM IR (-O0):
define void @uninitvar_strtoimax() {
%1 = alloca i8*
%2 = alloca i8**
%3 = alloca i32
%4 = load i8*, i8** %1
%5 = load i8**, i8*** %2
%6 = load i32, i32* %3
%7 = call i32 @strtoimax(i8* %4, i8** %5, i32 %6)
%8 = load i8*, i8** %1
%9 = load i8**, i8*** %2
%10 = load i32, i32* %3
%11 = call i32 @strtoumax(i8* %8, i8** %9, i32 %10)
ret void
}

LLVM IR (-O2):
define void @uninitvar_strtoimax() {
%1 = tail call i32 @strtoimax(i8* undef, i8** undef, i32 undef)
%2 = tail call i32 @strtoumax(i8* undef, i8** undef, i32 undef)
ret void
}
void produce_beep(void) {}


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

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

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

LLVM IR (-O2):
define void @produce_beep() {
ret void
}
/* Variables and functions */
int assert_(int, char const *);
int assert_false(bool statement, const char *error) {
  return assert_(!statement, error);
}


x86 assembly (clang, -O0):
<assert_false>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
mov    -0x10(%rbp),%rsi
call   1030 <assert_@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<assert_false>:
xor    %eax,%eax
test   %edi,%edi
sete   %al
mov    %eax,%edi
jmp    1030 <assert_@plt>

LLVM IR (-O0):
define i32 @assert_false(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = icmp ne i32 %5, 0
%7 = xor i1 %6, true
%8 = zext i1 %7 to i32
%9 = load i8*, i8** %4
%10 = call i32 @assert_(i32 %8, i8* %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @assert_false(i32 %0, i8* %1) {
%3 = icmp eq i32 %0, 0
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert_(i32 %4, i8* %1)
ret i32 %5
}
/* Type definitions */
struct timezone {
  int dummy;
};
struct timeval {
  int tv_sec;
  unsigned long tv_usec;
};

/* Variables and functions */
scalar_t__ gettimeofday(struct timeval *, struct timezone *);
unsigned long yar_get_microsec() {
  struct timeval tv;
  if (gettimeofday(&tv, (struct timezone *)NULL) == 0) {
    return (tv.tv_sec * 1000000) + tv.tv_usec;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<yar_get_microsec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x18(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
cmp    $0x0,%rax
jne    1145 <yar_get_microsec+0x35>
imul   $0xf4240,-0x18(%rbp),%eax
cltq
add    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    114d <yar_get_microsec+0x3d>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yar_get_microsec>:
push   %rbx
sub    $0x10,%rsp
xor    %ebx,%ebx
mov    %rsp,%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
test   %rax,%rax
jne    1136 <yar_get_microsec+0x26>
movslq (%rsp),%rax
imul   $0xf4240,%rax,%rbx
add    0x8(%rsp),%rbx
mov    %rbx,%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i64 }
%struct.timezone = type { i32 }
define i64 @yar_get_microsec() {
%1 = alloca i64
%2 = alloca %struct.timeval
%3 = call i64 @gettimeofday(%struct.timeval* %2, %struct.timezone* null)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %13
5: ; preds = %0
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i32 0, i32 0
%7 = load i32, i32* %6
%8 = mul nsw i32 %7, 1000000
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i32 0, i32 1
%11 = load i64, i64* %10
%12 = add i64 %9, %11
store i64 %12, i64* %1
br label %14
13: ; preds = %0
store i64 0, i64* %1
br label %14
14: ; preds = %13, %5
%15 = load i64, i64* %1
ret i64 %15
}

LLVM IR (-O2):
%struct.timeval = type { i32, i64 }
%struct.timezone = type { i32 }
define i64 @yar_get_microsec() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i64 @gettimeofday(%struct.timeval* %1, %struct.timezone* null)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %13
5: ; preds = %0
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%7 = load i32, i32* %6
%8 = mul nsw i32 %7, 1000000
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%11 = load i64, i64* %10
%12 = add i64 %11, %9
br label %13
13: ; preds = %0, %5
%14 = phi i64 [ %12, %5 ], [ 0, %0 ]
ret i64 %14
}
int fun256() { return 256; }


x86 assembly (clang, -O0):
<fun256>:
push   %rbp
mov    %rsp,%rbp
mov    $0x100,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @fun256() {
ret i32 256
}

LLVM IR (-O2):
define i32 @fun256() {
ret i32 256
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char name[20];
  printf("What's your full name?\n");
  scanf("%s", name);
  printf("Hello %s, how are you?", name);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x20(%rbp),%rsi
lea    0xed7(%rip),%rdi
call   1040 <scanf@plt>
lea    -0x20(%rbp),%rsi
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
lea    0xede(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb8(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1050 <scanf@plt>
lea    0xea9(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"What's your full name?\0A\00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [23 x i8] c"Hello %s, how are you?\00"
define i32 @main() {
%1 = alloca [20 x i8]
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %3)
%5 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i8* %5)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [23 x i8] c"Hello %s, how are you?\00"
@str = [23 x i8] c"What's your full name?\00"
define i32 @main() {
%1 = alloca [20 x i8]
%2 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 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), i8* %2)
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i8* %2)
ret i32 0
}
void _ZTVN5javax8security4sasl19RealmChoiceCallbackE(void) {}


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

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

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

LLVM IR (-O2):
define void @_ZTVN5javax8security4sasl19RealmChoiceCallbackE() {
ret void
}
/* Variables and functions */
double cos(double);
double ln_deg_to_rad(int /*<<< orphan*/);
int /*<<< orphan*/ ln_get_lunar_phase(double);
double ln_get_lunar_disk(double JD) {
  double i;
  i = ln_deg_to_rad(ln_get_lunar_phase(JD));
  return (1.0 + cos(i)) / 2.0;
}


x86 assembly (clang, -O0):
<ln_get_lunar_disk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <ln_get_lunar_phase@plt>
mov    %eax,%edi
call   1050 <ln_deg_to_rad@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1040 <cos@plt>
movaps %xmm0,%xmm1
movsd  0xea0(%rip),%xmm0
addsd  %xmm1,%xmm0
movsd  0xe8c(%rip),%xmm1
divsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ln_get_lunar_disk>:
push   %rax
call   1030 <ln_get_lunar_phase@plt>
mov    %eax,%edi
call   1050 <ln_deg_to_rad@plt>
call   1040 <cos@plt>
addsd  0xeb6(%rip),%xmm0
mulsd  0xeb6(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @ln_get_lunar_disk(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = call i32 @ln_get_lunar_phase(double %4)
%6 = call double @ln_deg_to_rad(i32 %5)
store double %6, double* %3
%7 = load double, double* %3
%8 = call double @cos(double %7)
%9 = fadd double 1.000000e+00, %8
%10 = fdiv double %9, 2.000000e+00
ret double %10
}

LLVM IR (-O2):
define double @ln_get_lunar_disk(double %0) {
%2 = tail call i32 @ln_get_lunar_phase(double %0)
%3 = tail call double @ln_deg_to_rad(i32 %2)
%4 = tail call double @cos(double %3)
%5 = fadd double %4, 1.000000e+00
%6 = fmul double %5, 5.000000e-01
ret double %6
}
const char *vde_chain_nm4_name_in(int i) {
  switch (i) {
  case 0:
    return "i0";
  case 1:
    return "i1";
  case 2:
    return "i2";
  case 3:
    return "i3";
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<vde_chain_nm4_name_in>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %rax,-0x18(%rbp)
sub    $0x3,%rax
ja     116c <vde_chain_nm4_name_in+0x6c>
mov    -0x18(%rbp),%rax
lea    0xedd(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xedd(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1174 <vde_chain_nm4_name_in+0x74>
lea    0xed0(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1174 <vde_chain_nm4_name_in+0x74>
lea    0xec3(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1174 <vde_chain_nm4_name_in+0x74>
lea    0xeb6(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1174 <vde_chain_nm4_name_in+0x74>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<vde_chain_nm4_name_in>:
cmp    $0x3,%edi
ja     1117 <vde_chain_nm4_name_in+0x17>
movslq %edi,%rax
lea    0xefd(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
@.str = [3 x i8] c"i0\00"
@.str.1 = [3 x i8] c"i1\00"
@.str.2 = [3 x i8] c"i2\00"
@.str.3 = [3 x i8] c"i3\00"
define i8* @vde_chain_nm4_name_in(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %9 [
i32 0, label %5
i32 1, label %6
i32 2, label %7
i32 3, label %8
]
5: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %2
br label %10
6: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %10
7: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %10
8: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %10
9: ; preds = %1
store i8* null, i8** %2
br label %10
10: ; preds = %9, %8, %7, %6, %5
%11 = load i8*, i8** %2
ret i8* %11
}

LLVM IR (-O2):
@.str = [3 x i8] c"i0\00"
@.str.1 = [3 x i8] c"i1\00"
@.str.2 = [3 x i8] c"i2\00"
@.str.3 = [3 x i8] c"i3\00"
@reltable.vde_chain_nm4_name_in = [4 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str to i64), i64 ptrtoint ([4 x i32]* @reltable.vde_chain_nm4_name_in to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str.1 to i64), i64 ptrtoint ([4 x i32]* @reltable.vde_chain_nm4_name_in to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str.2 to i64), i64 ptrtoint ([4 x i32]* @reltable.vde_chain_nm4_name_in to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str.3 to i64), i64 ptrtoint ([4 x i32]* @reltable.vde_chain_nm4_name_in to i64)) to i32)]
define i8* @vde_chain_nm4_name_in(i32 %0) {
%2 = icmp ult i32 %0, 4
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = sext i32 %0 to i64
%5 = shl i64 %4, 2
%6 = call i8* @llvm.load.relative.i64(i8* bitcast ([4 x i32]* @reltable.vde_chain_nm4_name_in to i8*), i64 %5)
br label %7
7: ; preds = %1, %3
%8 = phi i8* [ %6, %3 ], [ null, %1 ]
ret i8* %8
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isbdigit(int);
void t_isbdigit_0xaa() {
  Assert_real((isbdigit(170) == 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_isbdigit.c",
              855, ("isbdigit should be 0 for 0xaa"));
}


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

x86 assembly (clang, -O2):
<t_isbdigit_0xaa>:
push   %rax
mov    $0xaa,%edi
call   1040 <isbdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x357,%edx
pop    %rax
jmp    1030 <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_isbdigit.c\00"
@.str.1 = [30 x i8] c"isbdigit should be 0 for 0xaa\00"
define void @t_isbdigit_0xaa() {
%1 = call i64 @isbdigit(i32 170)
%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 855, 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_isbdigit.c\00"
@.str.1 = [30 x i8] c"isbdigit should be 0 for 0xaa\00"
define void @t_isbdigit_0xaa() {
%1 = tail call i64 @isbdigit(i32 170)
%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 855, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void outsb(int port, const void *addr, unsigned long count) {
  __asm__ __volatile__("rep; outsb" : "+S"(addr), "+c"(count) : "d"(port));
}


x86 assembly (clang, -O0):
<outsb>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rcx
mov    -0x4(%rbp),%edx
rep outsb %ds:(%rsi),(%dx)
mov    %rsi,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<outsb>:
mov    %rdx,%rcx
mov    %edi,%edx
rep outsb %ds:(%rsi),(%dx)
ret

LLVM IR (-O0):
define void @outsb(i32 %0, i8* %1, i64 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
store i32 %0, i32* %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i8*, i8** %5
%8 = load i64, i64* %6
%9 = load i32, i32* %4
%10 = call { i8*, i64 } asm sideeffect "rep; outsb", "={si},={cx},{dx},0,1,~{dirflag},~{fpsr},~{flags}"(i32 %9, i8* %7, i64 %8)
%11 = extractvalue { i8*, i64 } %10, 0
%12 = extractvalue { i8*, i64 } %10, 1
store i8* %11, i8** %5
store i64 %12, i64* %6
ret void
}

LLVM IR (-O2):
define void @outsb(i32 %0, i8* %1, i64 %2) {
%4 = tail call { i8*, i64 } asm sideeffect "rep; outsb", "={si},={cx},{dx},0,1,~{dirflag},~{fpsr},~{flags}"(i32 %0, i8* %1, i64 %2)
ret void
}
/* Type definitions */
typedef scalar_t__ int16_t;

/* Variables and functions */
int16_t Function1Int16(int16_t x) { return x + 42; }


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

x86 assembly (clang, -O2):
<Function1Int16>:
lea    0x2a(%rdi),%rax
ret

LLVM IR (-O0):
define i64 @Function1Int16(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add nsw i64 %3, 42
ret i64 %4
}

LLVM IR (-O2):
define i64 @Function1Int16(i64 %0) {
%2 = add nsw i64 %0, 42
ret i64 %2
}
long tf_bl(signed char x, long c) { return c / 3; }


x86 assembly (clang, -O0):
<tf_bl>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    $0x3,%ecx
cqto
idiv   %rcx
pop    %rbp
ret

x86 assembly (clang, -O2):
<tf_bl>:
mov    %rsi,%rax
movabs $0x5555555555555556,%rcx
55 55 55
imul   %rcx
mov    %rdx,%rax
shr    $0x3f,%rax
add    %rdx,%rax
ret

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

LLVM IR (-O2):
define i64 @tf_bl(i8 signext %0, i64 %1) {
%3 = sdiv i64 %1, 3
ret i64 %3
}
int test_imm_76uint8_reg(unsigned char val) {
  return ((val) & (-0x76 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_76uint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
and    $0xffffff8a,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_76uint8_reg>:
test   $0x8a,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_76uint8_reg(i8 zeroext %0) {
%2 = and i8 %0, -118
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ eruConfigureETL3(int, int /*<<< orphan*/, int);
int /*<<< orphan*/ eruConfigureOGU0(int);
int /*<<< orphan*/ eruEnable();
unsigned int eru0ConfigureChannel3AorB(void) {
  eruEnable();
  eruConfigureETL3(1, 0,
                   (1 << 1) | (0 << 0) | (1 << 2) | (0 << 3) | (0 << 4) |
                       (3 << 8) | (0 << 10) | (0 << 11));
  eruConfigureOGU0((0 << 0) | (0 << 2) | (0 << 4) | (1 << 15));
  return 0;
}


x86 assembly (clang, -O0):
<eru0ConfigureChannel3AorB>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <eruEnable@plt>
mov    $0x1,%edi
xor    %esi,%esi
mov    $0x306,%edx
call   1050 <eruConfigureETL3@plt>
mov    $0x8000,%edi
call   1040 <eruConfigureOGU0@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<eru0ConfigureChannel3AorB>:
push   %rax
xor    %eax,%eax
call   1030 <eruEnable@plt>
mov    $0x1,%edi
xor    %esi,%esi
mov    $0x306,%edx
call   1050 <eruConfigureETL3@plt>
mov    $0x8000,%edi
call   1040 <eruConfigureOGU0@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @eru0ConfigureChannel3AorB() {
%1 = call i32 (...) @eruEnable()
%2 = call i32 @eruConfigureETL3(i32 1, i32 0, i32 774)
%3 = call i32 @eruConfigureOGU0(i32 32768)
ret i32 0
}

LLVM IR (-O2):
define i32 @eru0ConfigureChannel3AorB() {
%1 = tail call i32 (...) @eruEnable()
%2 = tail call i32 @eruConfigureETL3(i32 1, i32 0, i32 774)
%3 = tail call i32 @eruConfigureOGU0(i32 32768)
ret i32 0
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
scalar_t__ islittleendian();
uint16_t htons(uint16_t hostshort) {
  if (islittleendian())
    return (hostshort << 8) | (hostshort >> 8);
  else
    return hostshort;
}


x86 assembly (clang, -O0):
<htons>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <islittleendian@plt>
cmp    $0x0,%rax
je     1142 <htons+0x32>
mov    -0x8(%rbp),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%ecx
sar    $0x8,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    1148 <htons+0x38>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<htons>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <islittleendian@plt>
mov    %ebx,%edx
shl    $0x8,%edx
mov    %ebx,%ecx
sar    $0x8,%ecx
or     %edx,%ecx
test   %rax,%rax
cmove  %ebx,%ecx
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @htons(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i64 (...) @islittleendian()
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = load i32, i32* %3
%8 = shl i32 %7, 8
%9 = load i32, i32* %3
%10 = ashr i32 %9, 8
%11 = or i32 %8, %10
store i32 %11, i32* %2
br label %14
12: ; preds = %1
%13 = load i32, i32* %3
store i32 %13, i32* %2
br label %14
14: ; preds = %12, %6
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @htons(i32 %0) {
%2 = tail call i64 (...) @islittleendian()
%3 = icmp eq i64 %2, 0
%4 = shl i32 %0, 8
%5 = ashr i32 %0, 8
%6 = or i32 %4, %5
%7 = select i1 %3, i32 %0, i32 %6
ret i32 %7
}
/* Variables and functions */
int io_in8(int);
void wait_8042(void) {
  for (;;) {
    if ((io_in8(0x0064) & 0x02) == 0) {
      break;
    }
  }
  return;
}


x86 assembly (clang, -O0):
<wait_8042>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <wait_8042+0x9>
mov    $0x64,%edi
call   1030 <io_in8@plt>
and    $0x2,%eax
cmp    $0x0,%eax
jne    1134 <wait_8042+0x24>
jmp    1139 <wait_8042+0x29>
jmp    1119 <wait_8042+0x9>
pop    %rbp
ret

x86 assembly (clang, -O2):
<wait_8042>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x64,%edi
call   1030 <io_in8@plt>
test   $0x2,%al
jne    1120 <wait_8042+0x10>
pop    %rax
ret

LLVM IR (-O0):
define void @wait_8042() {
br label %1
1: ; preds = %6, %0
%2 = call i32 @io_in8(i32 100)
%3 = and i32 %2, 2
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %1
br label %7
6: ; preds = %1
br label %1
7: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @wait_8042() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 @io_in8(i32 100)
%3 = and i32 %2, 2
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %1
5: ; preds = %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isprint(int);
void t_isprint_0x64() {
  Assert_real((isprint(100)),
              "/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_isprint.c",
              505, ("isprint should be 1 for d"));
}


x86 assembly (clang, -O0):
<t_isprint_0x64>:
push   %rbp
mov    %rsp,%rbp
mov    $0x64,%edi
call   1030 <isprint@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x1f9,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isprint_0x64>:
push   %rax
mov    $0x64,%edi
call   1030 <isprint@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x1f9,%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_isprint.c\00"
@.str.1 = [26 x i8] c"isprint should be 1 for d\00"
define void @t_isprint_0x64() {
%1 = call i32 @isprint(i32 100)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 505, i8* getelementptr inbounds ([26 x i8], [26 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_isprint.c\00"
@.str.1 = [26 x i8] c"isprint should be 1 for d\00"
define void @t_isprint_0x64() {
%1 = tail call i32 @isprint(i32 100)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 505, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ read(int, void *, size_t);
int /*<<< orphan*/ unix_error(char *);
ssize_t Read(int fd, void *buf, size_t count) {
  ssize_t rc;
  if ((rc = read(fd, buf, count)) < 0)
    unix_error("Read error");
  return rc;
}


x86 assembly (clang, -O0):
<Read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <read@plt>
mov    %eax,-0x1c(%rbp)
cmp    $0x0,%eax
jge    115b <Read+0x3b>
lea    0xeaa(%rip),%rdi
call   1040 <unix_error@plt>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Read>:
push   %rbx
call   1030 <read@plt>
mov    %eax,%ebx
test   %eax,%eax
jns    1138 <Read+0x18>
lea    0xecd(%rip),%rdi
call   1040 <unix_error@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [11 x i8] c"Read error\00"
define i32 @Read(i32 %0, i8* nocapture %1, i64 %2) {
%4 = tail call i32 @read(i32 %0, i8* %1, i64 %2)
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @unix_error(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %3
ret i32 %4
}
unsigned int my_strlen(const char *x) {
  char *count = (char *)x;
  while (*count++)
    ;
  return (unsigned int)(count - x - 1);
}


x86 assembly (clang, -O0):
<my_strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
cmpb   $0x0,(%rax)
je     112d <my_strlen+0x2d>
jmp    1110 <my_strlen+0x10>
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
sub    $0x1,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_strlen>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <my_strlen+0x10>
ret

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

LLVM IR (-O2):
define i32 @my_strlen(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %4, %2 ]
%4 = getelementptr inbounds i8, i8* %3, i64 1
%5 = load i8, i8* %3
%6 = icmp eq i8 %5, 0
br i1 %6, label %7, label %2
7: ; preds = %2
%8 = ptrtoint i8* %4 to i64
%9 = ptrtoint i8* %0 to i64
%10 = xor i64 %9, -1
%11 = add i64 %8, %10
%12 = trunc i64 %11 to i32
ret i32 %12
}
void INT_Excep_IRQ6(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_IRQ6() {
ret void
}
/* Variables and functions */
int pow(int, int);
int getBit(int x, int num_bit, int i) {
  if (i < 0 || i >= num_bit)
    return -1;
  x /= pow(10, i);
  return x % 10;
}


x86 assembly (clang, -O0):
<getBit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jl     1137 <getBit+0x27>
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jl     1143 <getBit+0x33>
movl   $0xffffffff,-0x4(%rbp)
jmp    1169 <getBit+0x59>
mov    -0x10(%rbp),%esi
mov    $0xa,%edi
call   1030 <pow@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getBit>:
mov    $0xffffffff,%eax
test   %edx,%edx
js     1151 <getBit+0x41>
cmp    %esi,%edx
jge    1151 <getBit+0x41>
push   %rbx
mov    %edi,%ebx
mov    $0xa,%edi
mov    %edx,%esi
call   1030 <pow@plt>
mov    %eax,%ecx
mov    %ebx,%eax
cltd
idiv   %ecx
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rcx
add    %edx,%ecx
add    %ecx,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @getBit(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
%8 = load i32, i32* %7
%9 = icmp slt i32 %8, 0
br i1 %9, label %14, label %10
10: ; preds = %3
%11 = load i32, i32* %7
%12 = load i32, i32* %6
%13 = icmp sge i32 %11, %12
br i1 %13, label %14, label %15
14: ; preds = %10, %3
store i32 -1, i32* %4
br label %22
15: ; preds = %10
%16 = load i32, i32* %7
%17 = call i32 @pow(i32 10, i32 %16)
%18 = load i32, i32* %5
%19 = sdiv i32 %18, %17
store i32 %19, i32* %5
%20 = load i32, i32* %5
%21 = srem i32 %20, 10
store i32 %21, i32* %4
br label %22
22: ; preds = %15, %14
%23 = load i32, i32* %4
ret i32 %23
}

LLVM IR (-O2):
define i32 @getBit(i32 %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %2, -1
%5 = icmp slt i32 %2, %1
%6 = and i1 %4, %5
br i1 %6, label %7, label %11
7: ; preds = %3
%8 = tail call i32 @pow(i32 10, i32 %2)
%9 = sdiv i32 %0, %8
%10 = srem i32 %9, 10
br label %11
11: ; preds = %3, %7
%12 = phi i32 [ %10, %7 ], [ -1, %3 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
void endpwent(void) { errno = ENOSYS; }


x86 assembly (clang, -O0):
<endpwent>:
push   %rbp
mov    %rsp,%rbp
mov    0x2edd(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec4(%rip),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<endpwent>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
@errno = global i32 0
define void @endpwent() {
%1 = load i32, i32* @ENOSYS
store i32 %1, i32* @errno
ret void
}

LLVM IR (-O2):
@ENOSYS = global i32 0
@errno = global i32 0
define void @endpwent() {
%1 = load i32, i32* @ENOSYS
store i32 %1, i32* @errno
ret void
}
void wpas_p2p_cancel_remain_on_channel_cb(struct wpa_supplicant *wpa_s,
                                          unsigned int freq) {}


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

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

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

LLVM IR (-O2):
%struct.wpa_supplicant = type opaque
define void @wpas_p2p_cancel_remain_on_channel_cb(%struct.wpa_supplicant* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ test119_BlinkMilli_test__I();
void test119_BlinkMilli_pollen__run__E() {
  test119_BlinkMilli_test__I();
  exit(0);
}


x86 assembly (clang, -O0):
<test119_BlinkMilli_pollen__run__E>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <test119_BlinkMilli_test__I@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<test119_BlinkMilli_pollen__run__E>:
push   %rax
xor    %eax,%eax
call   1030 <test119_BlinkMilli_test__I@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @test119_BlinkMilli_pollen__run__E() {
%1 = call i32 (...) @test119_BlinkMilli_test__I()
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @test119_BlinkMilli_pollen__run__E() {
%1 = tail call i32 (...) @test119_BlinkMilli_test__I()
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
scalar_t__ _jwArr();
int /*<<< orphan*/ jwPutraw(char *);
void jwArr_raw(char *rawtext) {
  if (_jwArr() == 0)
    jwPutraw(rawtext);
}


x86 assembly (clang, -O0):
<jwArr_raw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <_jwArr@plt>
cmp    $0x0,%rax
jne    1146 <jwArr_raw+0x26>
mov    -0x8(%rbp),%rdi
call   1040 <jwPutraw@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<jwArr_raw>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <_jwArr@plt>
test   %rax,%rax
je     1132 <jwArr_raw+0x12>
pop    %rbx
ret
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <jwPutraw@plt>

LLVM IR (-O0):
define void @jwArr_raw(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i64 (...) @_jwArr()
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i32 @jwPutraw(i8* %6)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @jwArr_raw(i8* %0) {
%2 = tail call i64 (...) @_jwArr()
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @jwPutraw(i8* %0)
br label %6
6: ; preds = %4, %1
ret void
}
/* Variables and functions */
int my_getline(char *, int);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ reverse(char *, int);
int main(void) {
  int len;
  char line[1000];
  while ((len = my_getline(line, 1000)) > 0) {
    reverse(line, len);
    printf("%s", line);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x3f0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x3f0(%rbp),%rdi
mov    $0x3e8,%esi
call   1050 <my_getline@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jle    1186 <main+0x56>
lea    -0x3f0(%rbp),%rdi
mov    -0x8(%rbp),%esi
call   1030 <reverse@plt>
lea    -0x3f0(%rbp),%rsi
lea    0xe84(%rip),%rdi
call   1040 <printf@plt>
jmp    1142 <main+0x12>
xor    %eax,%eax
add    $0x3f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x3e8,%rsp
mov    %rsp,%rdi
mov    $0x3e8,%esi
call   1050 <my_getline@plt>
test   %eax,%eax
jle    1186 <main+0x56>
mov    %rsp,%rbx
lea    0xeab(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nop
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <reverse@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x3e8,%esi
call   1050 <my_getline@plt>
test   %eax,%eax
jg     1160 <main+0x30>
xor    %eax,%eax
add    $0x3e8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [1000 x i8]
%2 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%3 = call i32 @my_getline(i8* %2, i32 1000)
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %11
5: ; preds = %0, %5
%6 = phi i32 [ %9, %5 ], [ %3, %0 ]
%7 = call i32 @reverse(i8* %2, i32 %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%9 = call i32 @my_getline(i8* %2, i32 1000)
%10 = icmp sgt i32 %9, 0
br i1 %10, label %5, label %11
11: ; preds = %5, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
void *thread1(void *arg) { assert(0); }


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

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

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

LLVM IR (-O2):
define noalias i8* @thread1(i8* nocapture readnone %0) {
%2 = tail call i32 @assert(i32 0)
ret i8* undef
}
int roi_check_stream_response(char *buff) { return 0; }


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

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

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

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