xunge/DecIR huggingface dataset:
/* Type definitions */
typedef scalar_t__ __u64;

/* Variables and functions */
double tc_core_tick2time(unsigned int);
unsigned int tc_calc_xmitsize(__u64 rate, unsigned int ticks) {
  return ((double)rate * tc_core_tick2time(ticks)) / 1000000;
}


x86 assembly (clang, -O0):
<tc_calc_xmitsize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cvtsi2sdq -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <tc_core_tick2time@plt>
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  0xeba(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tc_calc_xmitsize>:
push   %rax
cvtsi2sd %rdi,%xmm0
movsd  %xmm0,(%rsp)
mov    %esi,%edi
call   1030 <tc_core_tick2time@plt>
mulsd  (%rsp),%xmm0
divsd  0xed1(%rip),%xmm0
cvttsd2si %xmm0,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @tc_calc_xmitsize(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
store i64 %0, i64* %3
store i32 %1, i32* %4
%5 = load i64, i64* %3
%6 = sitofp i64 %5 to double
%7 = load i32, i32* %4
%8 = call double @tc_core_tick2time(i32 %7)
%9 = fmul double %6, %8
%10 = fdiv double %9, 1.000000e+06
%11 = fptoui double %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @tc_calc_xmitsize(i64 %0, i32 %1) {
%3 = sitofp i64 %0 to double
%4 = tail call double @tc_core_tick2time(i32 %1)
%5 = fmul double %4, %3
%6 = fdiv double %5, 1.000000e+06
%7 = fptoui double %6 to i32
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ gpio_dev_close();
int /*<<< orphan*/ pwm_dev_close();
void wiringNPiExit(void) {
  gpio_dev_close();
  pwm_dev_close();
}


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

x86 assembly (clang, -O2):
<wiringNPiExit>:
push   %rax
xor    %eax,%eax
call   1040 <gpio_dev_close@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <pwm_dev_close@plt>

LLVM IR (-O0):
define void @wiringNPiExit() {
%1 = call i32 (...) @gpio_dev_close()
%2 = call i32 (...) @pwm_dev_close()
ret void
}

LLVM IR (-O2):
define void @wiringNPiExit() {
%1 = tail call i32 (...) @gpio_dev_close()
%2 = tail call i32 (...) @pwm_dev_close()
ret void
}
/* Variables and functions */
float acosf(float);
float HMM_ACosF(float Radians) {
  ;
  float Result = acosf(Radians);
  return (Result);
}


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

x86 assembly (clang, -O2):
<HMM_ACosF>:
jmp    1030 <acosf@plt>

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

LLVM IR (-O2):
define float @HMM_ACosF(float %0) {
%2 = tail call float @acosf(float %0)
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ MRF24_Write_Short(int);
void MRF24J40_sleep(void) {
  MRF24_Write_Short(0x2A << 9 | 0x04);
  MRF24_Write_Short(0x35 << 9 | 0x5F);
}


x86 assembly (clang, -O0):
<MRF24J40_sleep>:
push   %rbp
mov    %rsp,%rbp
mov    $0x5404,%edi
call   1030 <MRF24_Write_Short@plt>
mov    $0x6a5f,%edi
call   1030 <MRF24_Write_Short@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<MRF24J40_sleep>:
push   %rax
mov    $0x5404,%edi
call   1030 <MRF24_Write_Short@plt>
mov    $0x6a5f,%edi
pop    %rax
jmp    1030 <MRF24_Write_Short@plt>

LLVM IR (-O0):
define void @MRF24J40_sleep() {
%1 = call i32 @MRF24_Write_Short(i32 21508)
%2 = call i32 @MRF24_Write_Short(i32 27231)
ret void
}

LLVM IR (-O2):
define void @MRF24J40_sleep() {
%1 = tail call i32 @MRF24_Write_Short(i32 21508)
%2 = tail call i32 @MRF24_Write_Short(i32 27231)
ret void
}
/* Variables and functions */
char *environment_get(char *);
char *environment_application(void) {
  char *results;
  if ((results = environment_get("DATABASE"))) {
    return results;
  } else if ((results = environment_get("APPASERVER_DATABASE"))) {
    return results;
  } else {
    return (char *)0;
  }
}


x86 assembly (clang, -O0):
<environment_application>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xeec(%rip),%rdi
call   1030 <environment_get@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
je     113f <environment_application+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    116e <environment_application+0x5e>
lea    0xeba(%rip),%rdi
call   1030 <environment_get@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
je     1166 <environment_application+0x56>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    116e <environment_application+0x5e>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<environment_application>:
push   %rax
lea    0xef3(%rip),%rdi
call   1030 <environment_get@plt>
test   %rax,%rax
je     1124 <environment_application+0x14>
pop    %rcx
ret
lea    0xed5(%rip),%rdi
pop    %rax
jmp    1030 <environment_get@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"DATABASE\00"
@.str.1 = [20 x i8] c"APPASERVER_DATABASE\00"
define i8* @environment_application() {
%1 = alloca i8*
%2 = alloca i8*
%3 = call i8* @environment_get(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
store i8* %3, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = load i8*, i8** %2
store i8* %6, i8** %1
br label %13
7: ; preds = %0
%8 = call i8* @environment_get(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
store i8* %8, i8** %2
%9 = icmp ne i8* %8, null
br i1 %9, label %10, label %12
10: ; preds = %7
%11 = load i8*, i8** %2
store i8* %11, i8** %1
br label %13
12: ; preds = %7
store i8* null, i8** %1
br label %13
13: ; preds = %12, %10, %5
%14 = load i8*, i8** %1
ret i8* %14
}

LLVM IR (-O2):
@.str = [9 x i8] c"DATABASE\00"
@.str.1 = [20 x i8] c"APPASERVER_DATABASE\00"
define i8* @environment_application() {
%1 = tail call i8* @environment_get(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i8* %1, null
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i8* @environment_get(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
%6 = phi i8* [ %1, %0 ], [ %4, %3 ]
ret i8* %6
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void trie_cb_freevoidptr(void *buf, void *userp) {
  (void)userp;
  free(*(void **)buf);
}


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

x86 assembly (clang, -O2):
<trie_cb_freevoidptr>:
mov    (%rdi),%rdi
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @trie_cb_freevoidptr(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to i8**
%8 = load i8*, i8** %7
%9 = call i32 @free(i8* %8)
ret void
}

LLVM IR (-O2):
define void @trie_cb_freevoidptr(i8* nocapture %0, i8* nocapture readnone %1) {
%3 = bitcast i8* %0 to i8**
%4 = load i8*, i8** %3
%5 = tail call i32 @free(i8* %4)
ret void
}
/* Type definitions */
struct nss_nlcmn {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ nss_nlcmn_set_cb_owner(struct nss_nlcmn *, int);
void nss_nlcmn_clr_cb_owner(struct nss_nlcmn *cm) {
  nss_nlcmn_set_cb_owner(cm, -1);
}


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

x86 assembly (clang, -O2):
<nss_nlcmn_clr_cb_owner>:
mov    $0xffffffff,%esi
jmp    1030 <nss_nlcmn_set_cb_owner@plt>

LLVM IR (-O0):
%struct.nss_nlcmn = type { i32 }
define void @nss_nlcmn_clr_cb_owner(%struct.nss_nlcmn* %0) {
%2 = alloca %struct.nss_nlcmn*
store %struct.nss_nlcmn* %0, %struct.nss_nlcmn** %2
%3 = load %struct.nss_nlcmn*, %struct.nss_nlcmn** %2
%4 = call i32 @nss_nlcmn_set_cb_owner(%struct.nss_nlcmn* %3, i32 -1)
ret void
}

LLVM IR (-O2):
%struct.nss_nlcmn = type { i32 }
define void @nss_nlcmn_clr_cb_owner(%struct.nss_nlcmn* %0) {
%2 = tail call i32 @nss_nlcmn_set_cb_owner(%struct.nss_nlcmn* %0, i32 -1)
ret void
}
main(argc, argv) int argc;
char **argv;
{
  int i;
  for (i = 0; i < argc; i++)
    puts(argv[i]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    115a <main+0x4a>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112d <main+0x1d>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
test   %edi,%edi
jle    1144 <main+0x34>
mov    %rsi,%r14
mov    %edi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdi
xor    %eax,%eax
call   1030 <puts@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <main+0x20>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i8*, i8** %1, i64 %7
%9 = load i8*, i8** %8
%10 = tail call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ trap_SendConsoleCommand(int /*<<< orphan*/);
int /*<<< orphan*/ va(char *, char *);
void CG_TaskOwnFlag_f(void) {
  trap_SendConsoleCommand(va("cmd vsay_team %s\n", "ihaveflag"));
}


x86 assembly (clang, -O0):
<CG_TaskOwnFlag_f>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xee0(%rip),%rsi
call   1030 <va@plt>
mov    %eax,%edi
call   1040 <trap_SendConsoleCommand@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<CG_TaskOwnFlag_f>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xee3(%rip),%rsi
call   1030 <va@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <trap_SendConsoleCommand@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"cmd vsay_team %s\0A\00"
@.str.1 = [10 x i8] c"ihaveflag\00"
define void @CG_TaskOwnFlag_f() {
%1 = call i32 @va(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 @trap_SendConsoleCommand(i32 %1)
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"cmd vsay_team %s\0A\00"
@.str.1 = [10 x i8] c"ihaveflag\00"
define void @CG_TaskOwnFlag_f() {
%1 = tail call i32 @va(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @trap_SendConsoleCommand(i32 %1)
ret void
}
int test_imm_A2uint8_reg(unsigned char val) {
  return ((val) & (0xA2 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_A2uint8_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, 162
%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_A2uint8_reg(i8 zeroext %0) {
%2 = and i8 %0, -94
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void local_irq_disable(void) { __asm__ __volatile__("" : : : "memory"); }


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

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

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

LLVM IR (-O2):
define void @local_irq_disable() {
tail call void asm sideeffect "", "~{memory},~{dirflag},~{fpsr},~{flags}"()
ret void
}
char *getProteinLink(pid)
char *pid;
{
  extern char link[];
  sprintf(link,
          "<A "
          "HREF=\"http://www.ncbi.nlm.nih.gov/entrez/"
          "query.fcgi?cmd=Search&db=Protein&term=%s&doptcmdl=GenPept\" "
          "TARGET=\"PROTEIN SEQUENCE SEARCH\">%s</A>",
          pid, pid);
  return link;
}


x86 assembly (clang, -O0):
<getProteinLink>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
mov    -0x8(%rbp),%rcx
mov    0x2ebd(%rip),%rdi
lea    0xece(%rip),%rsi
mov    $0x0,%al
call   1030 <sprintf@plt>
mov    0x2ea8(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getProteinLink>:
push   %rbx
mov    %rdi,%rcx
mov    0x2ecd(%rip),%rbx
lea    0xede(%rip),%rsi
mov    %rbx,%rdi
mov    %rcx,%rdx
xor    %eax,%eax
call   1030 <sprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@link = external global [0 x i8]
@.str = [143 x i8] c"<A HREF=\22http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Search&db=Protein&term=%s&doptcmdl=GenPept\22 TARGET=\22PROTEIN SEQUENCE SEARCH\22>%s</A>\00"
define i8* @getProteinLink(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 (i8*, i8*, ...) @sprintf(i8* getelementptr inbounds ([0 x i8], [0 x i8]* @link, i64 0, i64 0), i8* getelementptr inbounds ([143 x i8], [143 x i8]* @.str, i64 0, i64 0), i8* %3, i8* %4)
ret i8* getelementptr inbounds ([0 x i8], [0 x i8]* @link, i64 0, i64 0)
}

LLVM IR (-O2):
@link = external global [0 x i8]
@.str = [143 x i8] c"<A HREF=\22http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Search&db=Protein&term=%s&doptcmdl=GenPept\22 TARGET=\22PROTEIN SEQUENCE SEARCH\22>%s</A>\00"
define i8* @getProteinLink(i8* %0) {
%2 = tail call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) getelementptr inbounds ([0 x i8], [0 x i8]* @link, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([143 x i8], [143 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %0)
ret i8* getelementptr inbounds ([0 x i8], [0 x i8]* @link, i64 0, i64 0)
}
/* Variables and functions */
unsigned int time(int /*<<< orphan*/);
void delay(unsigned int seconds) {
  unsigned int counter = time(0) + seconds;
  while (time(0) < counter)
    ;
}


x86 assembly (clang, -O0):
<delay>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %edi,%edi
call   1030 <time@plt>
add    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
xor    %edi,%edi
call   1030 <time@plt>
cmp    -0x8(%rbp),%eax
jae    113d <delay+0x2d>
jmp    1128 <delay+0x18>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<delay>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
xor    %edi,%edi
call   1030 <time@plt>
mov    %eax,%ebx
add    %ebp,%ebx
xor    %edi,%edi
call   1030 <time@plt>
cmp    %ebx,%eax
jb     1120 <delay+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @delay(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = call i32 @time(i32 0)
%5 = load i32, i32* %2
%6 = add i32 %4, %5
store i32 %6, i32* %3
br label %7
7: ; preds = %11, %1
%8 = call i32 @time(i32 0)
%9 = load i32, i32* %3
%10 = icmp ult i32 %8, %9
br i1 %10, label %11, label %12
11: ; preds = %7
br label %7
12: ; preds = %7
ret void
}

LLVM IR (-O2):
define void @delay(i32 %0) {
%2 = tail call i32 @time(i32 0)
%3 = add i32 %2, %0
br label %4
4: ; preds = %4, %1
%5 = tail call i32 @time(i32 0)
%6 = icmp ult i32 %5, %3
br i1 %6, label %4, label %7
7: ; preds = %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ putstr(char *, int);
void term_clear_screen(void) { putstr("\x1b[2J", 4); }


x86 assembly (clang, -O0):
<term_clear_screen>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x4,%esi
call   1030 <putstr@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<term_clear_screen>:
lea    0xee9(%rip),%rdi
mov    $0x4,%esi
jmp    1030 <putstr@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"\1B[2J\00"
define void @term_clear_screen() {
%1 = call i32 @putstr(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 4)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"\1B[2J\00"
define void @term_clear_screen() {
%1 = tail call i32 @putstr(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 4)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128;

/* Variables and functions */
int /*<<< orphan*/ _mm_rsqrt_ps(int /*<<< orphan*/);
__m128 test_mm_rsqrt_ps(__m128 x) { return _mm_rsqrt_ps(x); }


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

x86 assembly (clang, -O2):
<test_mm_rsqrt_ps>:
jmp    1030 <_mm_rsqrt_ps@plt>

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

LLVM IR (-O2):
define i32 @test_mm_rsqrt_ps(i32 %0) {
%2 = tail call i32 @_mm_rsqrt_ps(i32 %0)
ret i32 %2
}
/* Variables and functions */
int PAPI_accum_counters(long long *, int);
void PAPIF_ACCUM_COUNTERS(long long *values, int *array_len, int *check) {
  *check = PAPI_accum_counters(values, *array_len);
}


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

x86 assembly (clang, -O2):
<PAPIF_ACCUM_COUNTERS>:
push   %rbx
mov    %rdx,%rbx
mov    (%rsi),%esi
call   1030 <PAPI_accum_counters@plt>
mov    %eax,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @PAPIF_ACCUM_COUNTERS(i64* %0, i32* nocapture %1, i32* nocapture writeonly %2) {
%4 = load i32, i32* %1
%5 = tail call i32 @PAPI_accum_counters(i64* %0, i32 %4)
store i32 %5, i32* %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ run_client();
int /*<<< orphan*/ stdout;
int main(int argc, char *argv[]) {
  fprintf(stdout, "welcome to yunuo board!\n");
  run_client();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ea3(%rip),%rax
mov    (%rax),%edi
lea    0xeba(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x0,%al
call   1040 <run_client@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
call   1040 <run_client@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [25 x i8] c"welcome to yunuo board!\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* @stdout
%7 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%8 = call i32 (...) @run_client()
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [25 x i8] c"welcome to yunuo board!\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @stdout
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 (...) @run_client()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ f(char *);
int tcv_exts_dump() {
  f("hello world\n");
rtattr_failure:
  __attribute__((unused)) return -1;
}


x86 assembly (clang, -O0):
<tcv_exts_dump>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <f@plt>
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tcv_exts_dump>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <f@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"hello world\0A\00"
define i32 @tcv_exts_dump() {
%1 = call i32 @f(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %0
ret i32 -1
}

LLVM IR (-O2):
@.str = [13 x i8] c"hello world\0A\00"
define i32 @tcv_exts_dump() {
%1 = tail call i32 @f(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void echo(char c) {
  if (c == 127 || c == 8) {
    printf("\b \b");
  } else {
    printf("%c", c);
  }
}


x86 assembly (clang, -O0):
<echo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x7f,%eax
je     1138 <echo+0x28>
movsbl -0x1(%rbp),%eax
cmp    $0x8,%eax
jne    114b <echo+0x3b>
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    115d <echo+0x4d>
movsbl -0x1(%rbp),%esi
lea    0xeae(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<echo>:
cmp    $0x7f,%dil
je     112c <echo+0xc>
cmp    $0x8,%dil
jne    113a <echo+0x1a>
lea    0xecd(%rip),%rdi
xor    %eax,%eax
jmp    1040 <printf@plt>
movsbl %dil,%edi
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"\08 \08\00"
define void @echo(i8 signext %0) {
switch i8 %0, label %4 [
i8 127, label %2
i8 8, label %2
]
2: ; preds = %1, %1
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
br label %7
4: ; preds = %1
%5 = sext i8 %0 to i32
%6 = tail call i32 @putchar(i32 %5)
br label %7
7: ; preds = %4, %2
ret void
}
/* Variables and functions */
int bar(int, int);
int foo(int, int);
int main(void) {
  int a = 1;
  a = foo(a, a);
  a = bar(a, a);
  a = foo(a, a);
  return a;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <foo@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <bar@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <foo@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
mov    $0x1,%esi
call   1040 <foo@plt>
mov    %eax,%edi
mov    %eax,%esi
call   1030 <bar@plt>
mov    %eax,%edi
mov    %eax,%esi
pop    %rax
jmp    1040 <foo@plt>

LLVM IR (-O0):
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 = load i32, i32* %2
%5 = call i32 @foo(i32 %3, i32 %4)
store i32 %5, i32* %2
%6 = load i32, i32* %2
%7 = load i32, i32* %2
%8 = call i32 @bar(i32 %6, i32 %7)
store i32 %8, i32* %2
%9 = load i32, i32* %2
%10 = load i32, i32* %2
%11 = call i32 @foo(i32 %9, i32 %10)
store i32 %11, i32* %2
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(i32 1, i32 1)
%2 = tail call i32 @bar(i32 %1, i32 %1)
%3 = tail call i32 @foo(i32 %2, i32 %2)
ret i32 %3
}
/* Variables and functions */
int *bar0();
int *bar1();
int foo(int a) {
  int *b0 = bar0();
  int *b1 = bar1();
  return b0[a] + b1[a];
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <bar0@plt>
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1040 <bar1@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x4(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    -0x18(%rbp),%rcx
movslq -0x4(%rbp),%rdx
add    (%rcx,%rdx,4),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <bar0@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1040 <bar1@plt>
movslq %ebp,%rcx
mov    (%rax,%rcx,4),%eax
add    (%rbx,%rcx,4),%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @foo(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i32*
store i32 %0, i32* %2
%5 = call i32* (...) @bar0()
store i32* %5, i32** %3
%6 = call i32* (...) @bar1()
store i32* %6, i32** %4
%7 = load i32*, i32** %3
%8 = load i32, i32* %2
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i32, i32* %7, i64 %9
%11 = load i32, i32* %10
%12 = load i32*, i32** %4
%13 = load i32, i32* %2
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i32, i32* %12, i64 %14
%16 = load i32, i32* %15
%17 = add nsw i32 %11, %16
ret i32 %17
}

LLVM IR (-O2):
define i32 @foo(i32 %0) {
%2 = tail call i32* (...) @bar0()
%3 = tail call i32* (...) @bar1()
%4 = sext i32 %0 to i64
%5 = getelementptr inbounds i32, i32* %2, i64 %4
%6 = load i32, i32* %5
%7 = getelementptr inbounds i32, i32* %3, i64 %4
%8 = load i32, i32* %7
%9 = add nsw i32 %8, %6
ret i32 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_END;
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, long, int /*<<< orphan*/);
long ftell(int /*<<< orphan*/ *);
int remaining_file_pointer_length(FILE *fp) {
  long int current_file_pointer_position = ftell(fp);
  fseek(fp, 0, SEEK_END);
  long int file_pointer_end_position = ftell(fp);
  fseek(fp, current_file_pointer_position, SEEK_SET);
  return file_pointer_end_position - current_file_pointer_position;
}


x86 assembly (clang, -O0):
<remaining_file_pointer_length>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <ftell@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ea4(%rip),%rax
mov    (%rax),%edx
xor    %eax,%eax
mov    %eax,%esi
call   1040 <fseek@plt>
mov    -0x8(%rbp),%rdi
call   1030 <ftell@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    0x2e6d(%rip),%rax
mov    (%rax),%edx
call   1040 <fseek@plt>
mov    -0x18(%rbp),%rax
sub    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<remaining_file_pointer_length>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r15
call   1030 <ftell@plt>
mov    %rax,%r14
mov    0x2eb1(%rip),%rax
mov    (%rax),%edx
mov    %r15,%rdi
xor    %esi,%esi
call   1040 <fseek@plt>
mov    %r15,%rdi
call   1030 <ftell@plt>
mov    %rax,%rbx
mov    0x2e83(%rip),%rax
mov    (%rax),%edx
mov    %r15,%rdi
mov    %r14,%rsi
call   1040 <fseek@plt>
sub    %r14d,%ebx
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
define i32 @remaining_file_pointer_length(i32* %0) {
%2 = alloca i32*
%3 = alloca i64
%4 = alloca i64
store i32* %0, i32** %2
%5 = load i32*, i32** %2
%6 = call i64 @ftell(i32* %5)
store i64 %6, i64* %3
%7 = load i32*, i32** %2
%8 = load i32, i32* @SEEK_END
%9 = call i32 @fseek(i32* %7, i64 0, i32 %8)
%10 = load i32*, i32** %2
%11 = call i64 @ftell(i32* %10)
store i64 %11, i64* %4
%12 = load i32*, i32** %2
%13 = load i64, i64* %3
%14 = load i32, i32* @SEEK_SET
%15 = call i32 @fseek(i32* %12, i64 %13, i32 %14)
%16 = load i64, i64* %4
%17 = load i64, i64* %3
%18 = sub nsw i64 %16, %17
%19 = trunc i64 %18 to i32
ret i32 %19
}

LLVM IR (-O2):
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
define i32 @remaining_file_pointer_length(i32* nocapture %0) {
%2 = tail call i64 @ftell(i32* %0)
%3 = load i32, i32* @SEEK_END
%4 = tail call i32 @fseek(i32* %0, i64 0, i32 %3)
%5 = tail call i64 @ftell(i32* %0)
%6 = load i32, i32* @SEEK_SET
%7 = tail call i32 @fseek(i32* %0, i64 %2, i32 %6)
%8 = sub nsw i64 %5, %2
%9 = trunc i64 %8 to i32
ret i32 %9
}
void glmMatrixFromVectors2fT(float m[4], const float v1[2], const float v2[2]) {
  m[0] = v1[0];
  m[2] = v1[1];
  m[1] = v2[0];
  m[3] = v2[1];
}


x86 assembly (clang, -O0):
<glmMatrixFromVectors2fT>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x8(%rax)
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x4(%rax)
mov    -0x18(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<glmMatrixFromVectors2fT>:
movss  (%rsi),%xmm0
movss  %xmm0,(%rdi)
movss  0x4(%rsi),%xmm0
movss  %xmm0,0x8(%rdi)
movss  (%rdx),%xmm0
movss  %xmm0,0x4(%rdi)
movss  0x4(%rdx),%xmm0
movss  %xmm0,0xc(%rdi)
ret

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

LLVM IR (-O2):
define void @glmMatrixFromVectors2fT(float* nocapture writeonly %0, float* nocapture %1, float* nocapture %2) {
%4 = load float, float* %1
store float %4, float* %0
%5 = getelementptr inbounds float, float* %1, i64 1
%6 = load float, float* %5
%7 = getelementptr inbounds float, float* %0, i64 2
store float %6, float* %7
%8 = load float, float* %2
%9 = getelementptr inbounds float, float* %0, i64 1
store float %8, float* %9
%10 = getelementptr inbounds float, float* %2, i64 1
%11 = load float, float* %10
%12 = getelementptr inbounds float, float* %0, i64 3
store float %11, float* %12
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isascii(int);
void t_isascii_0xb7() {
  Assert_real((isascii(183) == 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_isascii.c",
              920, ("isascii should be 0 for 0xb7"));
}


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

x86 assembly (clang, -O2):
<t_isascii_0xb7>:
push   %rax
mov    $0xb7,%edi
call   1030 <isascii@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x398,%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_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 0 for 0xb7\00"
define void @t_isascii_0xb7() {
%1 = call i64 @isascii(i32 183)
%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 920, 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_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 0 for 0xb7\00"
define void @t_isascii_0xb7() {
%1 = tail call i64 @isascii(i32 183)
%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 920, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int XY(int x, int y) {
  if (y > 16) {
    y = 16;
  }
  if (y < 0) {
    y = 0;
  }
  if (x > 16) {
    x = 16;
  }
  if (x < 0) {
    x = 0;
  }
  if (x % 2 == 1) {
    return (x * (16) + (16 - y - 1));
  } else {
    return (x * (16) + y);
  }
}


x86 assembly (clang, -O0):
<XY>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x10,-0xc(%rbp)
jle    111b <XY+0x1b>
movl   $0x10,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jge    112c <XY+0x2c>
movl   $0x0,-0xc(%rbp)
cmpl   $0x10,-0x8(%rbp)
jle    113d <XY+0x3d>
movl   $0x10,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    114e <XY+0x4e>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x1,%edx
jne    117d <XY+0x7d>
mov    -0x8(%rbp),%eax
shl    $0x4,%eax
mov    $0x10,%ecx
sub    -0xc(%rbp),%ecx
sub    $0x1,%ecx
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    1189 <XY+0x89>
mov    -0x8(%rbp),%eax
shl    $0x4,%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<XY>:
cmp    $0x10,%esi
mov    $0x10,%ecx
cmovge %ecx,%esi
xor    %eax,%eax
test   %esi,%esi
cmovs  %eax,%esi
cmp    $0x10,%edi
cmovl  %edi,%ecx
test   %ecx,%ecx
cmovs  %eax,%ecx
mov    %ecx,%edx
shl    $0x4,%edx
mov    $0xf,%eax
sub    %esi,%eax
test   $0x1,%cl
cmove  %esi,%eax
add    %edx,%eax
ret

LLVM IR (-O0):
define i32 @XY(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %5
%7 = icmp sgt i32 %6, 16
br i1 %7, label %8, label %9
8: ; preds = %2
store i32 16, i32* %5
br label %9
9: ; preds = %8, %2
%10 = load i32, i32* %5
%11 = icmp slt i32 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %9
store i32 0, i32* %5
br label %13
13: ; preds = %12, %9
%14 = load i32, i32* %4
%15 = icmp sgt i32 %14, 16
br i1 %15, label %16, label %17
16: ; preds = %13
store i32 16, i32* %4
br label %17
17: ; preds = %16, %13
%18 = load i32, i32* %4
%19 = icmp slt i32 %18, 0
br i1 %19, label %20, label %21
20: ; preds = %17
store i32 0, i32* %4
br label %21
21: ; preds = %20, %17
%22 = load i32, i32* %4
%23 = srem i32 %22, 2
%24 = icmp eq i32 %23, 1
br i1 %24, label %25, label %32
25: ; preds = %21
%26 = load i32, i32* %4
%27 = mul nsw i32 %26, 16
%28 = load i32, i32* %5
%29 = sub nsw i32 16, %28
%30 = sub nsw i32 %29, 1
%31 = add nsw i32 %27, %30
store i32 %31, i32* %3
br label %37
32: ; preds = %21
%33 = load i32, i32* %4
%34 = mul nsw i32 %33, 16
%35 = load i32, i32* %5
%36 = add nsw i32 %34, %35
store i32 %36, i32* %3
br label %37
37: ; preds = %32, %25
%38 = load i32, i32* %3
ret i32 %38
}

LLVM IR (-O2):
define i32 @XY(i32 %0, i32 %1) {
%3 = icmp slt i32 %1, 16
%4 = select i1 %3, i32 %1, i32 16
%5 = icmp sgt i32 %4, 0
%6 = select i1 %5, i32 %4, i32 0
%7 = icmp slt i32 %0, 16
%8 = select i1 %7, i32 %0, i32 16
%9 = icmp sgt i32 %8, 0
%10 = select i1 %9, i32 %8, i32 0
%11 = and i32 %10, 1
%12 = icmp eq i32 %11, 0
%13 = shl nuw nsw i32 %10, 4
%14 = sub nsw i32 15, %6
%15 = select i1 %12, i32 %6, i32 %14
%16 = add nsw i32 %13, %15
ret i32 %16
}
int restoreTTyStat(int fd, void *sg) { return -1; }


x86 assembly (clang, -O0):
<restoreTTyStat>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @restoreTTyStat(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
ret i32 -1
}

LLVM IR (-O2):
define i32 @restoreTTyStat(i32 %0, i8* nocapture readnone %1) {
ret i32 -1
}
int little_endian(void) {
  int number_one = 1;
  char *ptr = (char *)&number_one;
  return *ptr;
}


x86 assembly (clang, -O0):
<little_endian>:
push   %rbp
mov    %rsp,%rbp
movl   $0x1,-0x4(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @little_endian() {
ret i32 1
}
unsigned long long int ulifibonacci(unsigned long long int n) {
  if (n < 3)
    return 1;
  else
    return (ulifibonacci(n - 1) + ulifibonacci(n - 2));
}


x86 assembly (clang, -O0):
<ulifibonacci>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x3,-0x10(%rbp)
jae    1134 <ulifibonacci+0x24>
movq   $0x1,-0x8(%rbp)
jmp    1160 <ulifibonacci+0x50>
mov    -0x10(%rbp),%rdi
sub    $0x1,%rdi
call   1030 <ulifibonacci@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
sub    $0x2,%rdi
call   1030 <ulifibonacci@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ulifibonacci>:
push   %r14
push   %rbx
push   %rax
mov    $0x1,%r14d
cmp    $0x3,%rdi
jb     114a <ulifibonacci+0x3a>
mov    %rdi,%rbx
xor    %r14d,%r14d
cs nopw 0x0(%rax,%rax,1)
lea    -0x1(%rbx),%rdi
call   1030 <ulifibonacci@plt>
add    $0xfffffffffffffffe,%rbx
add    %rax,%r14
cmp    $0x2,%rbx
ja     1130 <ulifibonacci+0x20>
add    $0x1,%r14
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i64 @ulifibonacci(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i64, i64* %3
%5 = icmp ult i64 %4, 3
br i1 %5, label %6, label %7
6: ; preds = %1
store i64 1, i64* %2
br label %15
7: ; preds = %1
%8 = load i64, i64* %3
%9 = sub i64 %8, 1
%10 = call i64 @ulifibonacci(i64 %9)
%11 = load i64, i64* %3
%12 = sub i64 %11, 2
%13 = call i64 @ulifibonacci(i64 %12)
%14 = add i64 %10, %13
store i64 %14, i64* %2
br label %15
15: ; preds = %7, %6
%16 = load i64, i64* %2
ret i64 %16
}

LLVM IR (-O2):
define i64 @ulifibonacci(i64 %0) {
%2 = icmp ult i64 %0, 3
br i1 %2, label %13, label %3
3: ; preds = %1, %3
%4 = phi i64 [ %8, %3 ], [ %0, %1 ]
%5 = phi i64 [ %9, %3 ], [ 0, %1 ]
%6 = add i64 %4, -1
%7 = tail call i64 @ulifibonacci(i64 %6)
%8 = add i64 %4, -2
%9 = add i64 %7, %5
%10 = icmp ult i64 %8, 3
br i1 %10, label %11, label %3
11: ; preds = %3
%12 = add i64 %9, 1
br label %13
13: ; preds = %11, %1
%14 = phi i64 [ 1, %1 ], [ %12, %11 ]
ret i64 %14
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, double, double);
double sindeg(double);
int main() {
  double x, y;
  x = 60.0;
  y = sindeg(x);
  printf("angle = %f degree, sin(angle) = %f\n", x, y);
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xeb9(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1030 <sindeg@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
lea    0xe9c(%rip),%rdi
call   1040 <printf@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
movsd  0xec7(%rip),%xmm0
call   1030 <sindeg@plt>
movaps %xmm0,%xmm1
lea    0xec0(%rip),%rdi
movsd  0xeb0(%rip),%xmm0
call   1040 <printf@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [36 x i8] c"angle = %f degree, sin(angle) = %f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
store i32 0, i32* %1
store double 6.000000e+01, double* %2
%4 = load double, double* %2
%5 = call double @sindeg(double %4)
store double %5, double* %3
%6 = load double, double* %2
%7 = load double, double* %3
%8 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), double %6, double %7)
%9 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [36 x i8] c"angle = %f degree, sin(angle) = %f\0A\00"
define i32 @main() {
%1 = tail call double @sindeg(double 6.000000e+01)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), double 6.000000e+01, double %1)
%3 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
scalar_t__ is_on_trace_list(char *);
int /*<<< orphan*/ tokenization_error(int, char *, char *);
void traced_name_error(char *trace_name) {
  if (is_on_trace_list(trace_name)) {
    tokenization_error(0x00008000, "Attempt to invoke (undefined) %s.\n",
                       trace_name);
  }
}


x86 assembly (clang, -O0):
<traced_name_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <is_on_trace_list@plt>
cmp    $0x0,%rax
je     1154 <traced_name_error+0x34>
mov    -0x8(%rbp),%rdx
mov    $0x8000,%edi
lea    0xeb1(%rip),%rsi
call   1030 <tokenization_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<traced_name_error>:
push   %rbx
mov    %rdi,%rbx
call   1040 <is_on_trace_list@plt>
test   %rax,%rax
je     1143 <traced_name_error+0x23>
lea    0xecb(%rip),%rsi
mov    $0x8000,%edi
mov    %rbx,%rdx
pop    %rbx
jmp    1030 <tokenization_error@plt>
pop    %rbx
ret

LLVM IR (-O0):
@.str = [35 x i8] c"Attempt to invoke (undefined) %s.\0A\00"
define void @traced_name_error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @is_on_trace_list(i8* %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = call i32 @tokenization_error(i32 32768, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %7)
br label %9
9: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
@.str = [35 x i8] c"Attempt to invoke (undefined) %s.\0A\00"
define void @traced_name_error(i8* %0) {
%2 = tail call i64 @is_on_trace_list(i8* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @tokenization_error(i32 32768, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %6
6: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_3(char);
void println_4(void) { print_3('\n'); }


x86 assembly (clang, -O0):
<println_4>:
push   %rbp
mov    %rsp,%rbp
mov    $0xa,%edi
call   1030 <print_3@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<println_4>:
mov    $0xa,%edi
jmp    1030 <print_3@plt>

LLVM IR (-O0):
define void @println_4() {
%1 = call i32 @print_3(i8 signext 10)
ret void
}

LLVM IR (-O2):
define void @println_4() {
%1 = tail call i32 @print_3(i8 signext 10)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int uint64_t;
typedef int int64_t;

/* Variables and functions */
int le_to_u64(int /*<<< orphan*/ const *);
int64_t le_to_i64(const uint8_t *buf) {
  uint64_t v = le_to_u64(buf);
  return (v < 0x8000000000000000ULL
              ? (int64_t)v
              : -((int64_t)(0xffffffffffffffffULL - v)) - 1);
}


x86 assembly (clang, -O0):
<le_to_i64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <le_to_u64@plt>
mov    %eax,-0xc(%rbp)
movslq -0xc(%rbp),%rax
movabs $0x8000000000000000,%rcx
cmp    %rcx,%rax
jae    114a <le_to_i64+0x3a>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1164 <le_to_i64+0x54>
movslq -0xc(%rbp),%rcx
mov    $0xffffffffffffffff,%rax
sub    %rcx,%rax
mov    %eax,%ecx
xor    %eax,%eax
sub    %ecx,%eax
sub    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<le_to_i64>:
jmp    1030 <le_to_u64@plt>

LLVM IR (-O0):
define i32 @le_to_i64(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 @le_to_u64(i32* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = sext i32 %6 to i64
%8 = icmp ult i64 %7, -9223372036854775808
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = load i32, i32* %3
br label %18
11: ; preds = %1
%12 = load i32, i32* %3
%13 = sext i32 %12 to i64
%14 = sub i64 -1, %13
%15 = trunc i64 %14 to i32
%16 = sub nsw i32 0, %15
%17 = sub nsw i32 %16, 1
br label %18
18: ; preds = %11, %9
%19 = phi i32 [ %10, %9 ], [ %17, %11 ]
ret i32 %19
}

LLVM IR (-O2):
define i32 @le_to_i64(i32* %0) {
%2 = tail call i32 @le_to_u64(i32* %0)
ret i32 %2
}