xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void fz_trace_pop_clip(void *user) { printf("<pop_clip />\n"); }


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"<pop_clip />\0A\00"
define void @fz_trace_pop_clip(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [13 x i8] c"<pop_clip />\00"
define void @fz_trace_pop_clip(i8* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("This is test #1.\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [17 x i8] c"This is test.\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
void NetSock_Destroy(int fd) { close(fd); }


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

x86 assembly (clang, -O2):
<NetSock_Destroy>:
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define void @NetSock_Destroy(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret void
}
/* Variables and functions */
double pow(int, int);
double truncf(double);
double my_trunc(double parm_num, int parm_digitos) {
  double temp = pow(10, parm_digitos);
  return truncf(parm_num * temp) / temp;
}


x86 assembly (clang, -O0):
<my_trunc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%esi
mov    $0xa,%edi
call   1030 <pow@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
call   1040 <truncf@plt>
divsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_trunc>:
sub    $0x18,%rsp
mov    %edi,%esi
movsd  %xmm0,0x10(%rsp)
mov    $0xa,%edi
call   1030 <pow@plt>
movapd %xmm0,%xmm1
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
mulsd  %xmm1,%xmm0
call   1040 <truncf@plt>
divsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @my_trunc(double %0, i32 %1) {
%3 = alloca double
%4 = alloca i32
%5 = alloca double
store double %0, double* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = call double @pow(i32 10, i32 %6)
store double %7, double* %5
%8 = load double, double* %3
%9 = load double, double* %5
%10 = fmul double %8, %9
%11 = call double @truncf(double %10)
%12 = load double, double* %5
%13 = fdiv double %11, %12
ret double %13
}

LLVM IR (-O2):
define double @my_trunc(double %0, i32 %1) {
%3 = tail call double @pow(i32 10, i32 %1)
%4 = fmul double %3, %0
%5 = tail call double @truncf(double %4)
%6 = fdiv double %5, %3
ret double %6
}
void g_on_error_stack_trace() {}


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

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

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

LLVM IR (-O2):
define void @g_on_error_stack_trace() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ init(char *);
scalar_t__ malloc(int);
int main() {
  char *p;
  init(p);
  p = (char *)malloc(42);
  if (p)
    p[0] = '\0';
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <init@plt>
mov    $0x2a,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1158 <main+0x38>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1030 <init@plt>
mov    $0x2a,%edi
call   1040 <malloc@plt>
test   %rax,%rax
je     1138 <main+0x18>
movb   $0x0,(%rax)
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
%3 = load i8*, i8** %2
%4 = call i32 @init(i8* %3)
%5 = call i64 @malloc(i32 42)
%6 = inttoptr i64 %5 to i8*
store i8* %6, i8** %2
%7 = load i8*, i8** %2
%8 = icmp ne i8* %7, null
br i1 %8, label %9, label %12
9: ; preds = %0
%10 = load i8*, i8** %2
%11 = getelementptr inbounds i8, i8* %10, i64 0
store i8 0, i8* %11
br label %12
12: ; preds = %9, %0
%13 = load i32, i32* %1
ret i32 %13
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @init(i8* undef)
%2 = tail call i64 @malloc(i32 42)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %0
%5 = inttoptr i64 %2 to i8*
store i8 0, i8* %5
br label %6
6: ; preds = %4, %0
ret i32 0
}
/* Variables and functions */
scalar_t__ InfoNES_ReadRom(char const *);
int /*<<< orphan*/ InfoNES_ReleaseRom();
scalar_t__ InfoNES_Reset();
int InfoNES_Load(const char *pszFileName) {
  InfoNES_ReleaseRom();
  if (InfoNES_ReadRom(pszFileName) < 0)
    return -1;
  if (InfoNES_Reset() < 0)
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<InfoNES_Load>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <InfoNES_ReleaseRom@plt>
mov    -0x10(%rbp),%rdi
call   1050 <InfoNES_ReadRom@plt>
cmp    $0x0,%rax
jge    1162 <InfoNES_Load+0x32>
movl   $0xffffffff,-0x4(%rbp)
jmp    1186 <InfoNES_Load+0x56>
mov    $0x0,%al
call   1040 <InfoNES_Reset@plt>
cmp    $0x0,%rax
jge    117f <InfoNES_Load+0x4f>
movl   $0xffffffff,-0x4(%rbp)
jmp    1186 <InfoNES_Load+0x56>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<InfoNES_Load>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <InfoNES_ReleaseRom@plt>
mov    %rbx,%rdi
call   1050 <InfoNES_ReadRom@plt>
test   %rax,%rax
js     1155 <InfoNES_Load+0x25>
xor    %eax,%eax
call   1040 <InfoNES_Reset@plt>
sar    $0x3f,%rax
pop    %rbx
ret
mov    $0xffffffff,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @InfoNES_Load(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = call i32 (...) @InfoNES_ReleaseRom()
%5 = load i8*, i8** %3
%6 = call i64 @InfoNES_ReadRom(i8* %5)
%7 = icmp slt i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %1
store i32 -1, i32* %2
br label %14
9: ; preds = %1
%10 = call i64 (...) @InfoNES_Reset()
%11 = icmp slt i64 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %9
store i32 -1, i32* %2
br label %14
13: ; preds = %9
store i32 0, i32* %2
br label %14
14: ; preds = %13, %12, %8
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @InfoNES_Load(i8* %0) {
%2 = tail call i32 (...) @InfoNES_ReleaseRom()
%3 = tail call i64 @InfoNES_ReadRom(i8* %0)
%4 = icmp slt i64 %3, 0
br i1 %4, label %9, label %5
5: ; preds = %1
%6 = tail call i64 (...) @InfoNES_Reset()
%7 = ashr i64 %6, 63
%8 = trunc i64 %7 to i32
br label %9
9: ; preds = %5, %1
%10 = phi i32 [ -1, %1 ], [ %8, %5 ]
ret i32 %10
}
double strtod(const char *str, char **endptr) {
  ((void)str);
  ((void)endptr);
  return 0;
}


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

x86 assembly (clang, -O2):
<strtod>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @strtod(i8* %0, i8** %1) {
%3 = alloca i8*
%4 = alloca i8**
store i8* %0, i8** %3
store i8** %1, i8*** %4
%5 = load i8*, i8** %3
%6 = load i8**, i8*** %4
ret double 0.000000e+00
}

LLVM IR (-O2):
define double @strtod(i8* nocapture readnone %0, i8** nocapture readnone %1) {
ret double 0.000000e+00
}
void init_doc() {}


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

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

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

LLVM IR (-O2):
define void @init_doc() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ xlfail(char *);
void checkizero(long iarg) {
  if (iarg == 0)
    xlfail("division by zero");
}


x86 assembly (clang, -O0):
<checkizero>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1133 <checkizero+0x23>
lea    0xed2(%rip),%rdi
call   1030 <xlfail@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkizero>:
test   %rdi,%rdi
je     1116 <checkizero+0x6>
ret
lea    0xee3(%rip),%rdi
jmp    1030 <xlfail@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"division by zero\00"
define void @checkizero(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @xlfail(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"division by zero\00"
define void @checkizero(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @xlfail(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %3, %1
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;

/* Variables and functions */
uint16_t ST7735_Color565(uint8_t r, uint8_t g, uint8_t b) {
  return ((b & 0xF8) << 8) | ((g & 0xFC) << 3) | (r >> 3);
}


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

x86 assembly (clang, -O2):
<ST7735_Color565>:
shl    $0x8,%edx
and    $0xf800,%edx
lea    0x0(,%rsi,8),%eax
and    $0x7e0,%eax
sar    $0x3,%edi
or     %edi,%eax
or     %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @ST7735_Color565(i32 %0, i32 %1, i32 %2) {
%4 = shl i32 %2, 8
%5 = and i32 %4, 63488
%6 = shl i32 %1, 3
%7 = and i32 %6, 2016
%8 = ashr i32 %0, 3
%9 = or i32 %7, %8
%10 = or i32 %9, %5
ret i32 %10
}
void w9(void *x, long long y) { *(long long *)(x + 32759) = y; }


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

x86 assembly (clang, -O2):
<w9>:
mov    %rsi,0x7ff7(%rdi)
ret

LLVM IR (-O0):
define void @w9(i8* %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 = load i8*, i8** %3
%7 = getelementptr i8, i8* %6, i64 32759
%8 = bitcast i8* %7 to i64*
store i64 %5, i64* %8
ret void
}

LLVM IR (-O2):
define void @w9(i8* nocapture writeonly %0, i64 %1) {
%3 = getelementptr i8, i8* %0, i64 32759
%4 = bitcast i8* %3 to i64*
store i64 %1, i64* %4
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ child();
int /*<<< orphan*/ fork();
int /*<<< orphan*/ parent(int /*<<< orphan*/);
int main() {
  pid_t pid;
  if ((pid = fork()) == 0)
    child();
  else
    parent(pid);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <fork@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jne    115e <main+0x2e>
mov    $0x0,%al
call   1030 <child@plt>
jmp    1166 <main+0x36>
mov    -0x8(%rbp),%edi
call   1040 <parent@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <fork@plt>
test   %eax,%eax
je     1145 <main+0x15>
mov    %eax,%edi
call   1040 <parent@plt>
jmp    114c <main+0x1c>
xor    %eax,%eax
call   1030 <child@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (...) @fork()
store i32 %3, i32* %2
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 (...) @child()
br label %10
7: ; preds = %0
%8 = load i32, i32* %2
%9 = call i32 @parent(i32 %8)
br label %10
10: ; preds = %7, %5
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @fork()
%2 = icmp eq i32 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (...) @child()
br label %7
5: ; preds = %0
%6 = tail call i32 @parent(i32 %1)
br label %7
7: ; preds = %5, %3
ret i32 0
}
void RTDbgModLineByAddr(void) {}


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

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

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

LLVM IR (-O2):
define void @RTDbgModLineByAddr() {
ret void
}
int main(int argc, const char *argv[]) {
  struct my_struct {
    int a;
    double b[2];
  };
  struct my_struct array[2];
  array[0].a = 1;
  array[0].b[0] = 3.5;
  array[0].b[1] = 3.6;
  array[1].a = 2;
  array[1].b[0] = 4.5;
  array[1].b[1] = 4.6;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x40(%rbp)
movsd  0xef7(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xee2(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
movl   $0x2,-0x28(%rbp)
movsd  0xec6(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xeb1(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.my_struct = type { i32, [2 x double] }
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [2 x %struct.my_struct]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = getelementptr inbounds [2 x %struct.my_struct], [2 x %struct.my_struct]* %6, i64 0, i64 0
%8 = getelementptr inbounds %struct.my_struct, %struct.my_struct* %7, i32 0, i32 0
store i32 1, i32* %8
%9 = getelementptr inbounds [2 x %struct.my_struct], [2 x %struct.my_struct]* %6, i64 0, i64 0
%10 = getelementptr inbounds %struct.my_struct, %struct.my_struct* %9, i32 0, i32 1
%11 = getelementptr inbounds [2 x double], [2 x double]* %10, i64 0, i64 0
store double 3.500000e+00, double* %11
%12 = getelementptr inbounds [2 x %struct.my_struct], [2 x %struct.my_struct]* %6, i64 0, i64 0
%13 = getelementptr inbounds %struct.my_struct, %struct.my_struct* %12, i32 0, i32 1
%14 = getelementptr inbounds [2 x double], [2 x double]* %13, i64 0, i64 1
store double 3.600000e+00, double* %14
%15 = getelementptr inbounds [2 x %struct.my_struct], [2 x %struct.my_struct]* %6, i64 0, i64 1
%16 = getelementptr inbounds %struct.my_struct, %struct.my_struct* %15, i32 0, i32 0
store i32 2, i32* %16
%17 = getelementptr inbounds [2 x %struct.my_struct], [2 x %struct.my_struct]* %6, i64 0, i64 1
%18 = getelementptr inbounds %struct.my_struct, %struct.my_struct* %17, i32 0, i32 1
%19 = getelementptr inbounds [2 x double], [2 x double]* %18, i64 0, i64 0
store double 4.500000e+00, double* %19
%20 = getelementptr inbounds [2 x %struct.my_struct], [2 x %struct.my_struct]* %6, i64 0, i64 1
%21 = getelementptr inbounds %struct.my_struct, %struct.my_struct* %20, i32 0, i32 1
%22 = getelementptr inbounds [2 x double], [2 x double]* %21, i64 0, i64 1
store double 4.600000e+00, double* %22
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isupper(int);
void t_isupper_0x9d() {
  Assert_real((isupper(157) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isupper.c",
              790, ("isupper should be 0 for 0x9d"));
}


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

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

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

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


x86 assembly (clang, -O0):
<pathconN_nm7_sign>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    1129 <pathconN_nm7_sign+0x29>
movsd  0xee9(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1161 <pathconN_nm7_sign+0x61>
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    114d <pathconN_nm7_sign+0x4d>
movsd  0xebd(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1157 <pathconN_nm7_sign+0x57>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

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

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

LLVM IR (-O2):
define double @pathconN_nm7_sign(double %0) {
%2 = fcmp olt double %0, 0.000000e+00
%3 = fcmp ogt double %0, 0.000000e+00
%4 = select i1 %3, double 1.000000e+00, double %0
%5 = select i1 %2, double -1.000000e+00, double %4
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
void xfunlock(int fd) { close(fd); }


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

x86 assembly (clang, -O2):
<xfunlock>:
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define void @xfunlock(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ sa_log_output(char const *);
void sa_log_abort(const char *buf) {
  sa_log_output(buf);
  abort();
}


x86 assembly (clang, -O0):
<sa_log_abort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <sa_log_output@plt>
mov    $0x0,%al
call   1040 <abort@plt>

x86 assembly (clang, -O2):
<sa_log_abort>:
push   %rax
call   1030 <sa_log_output@plt>
xor    %eax,%eax
call   1040 <abort@plt>

LLVM IR (-O0):
define void @sa_log_abort(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @sa_log_output(i8* %3)
%5 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
define void @sa_log_abort(i8* %0) {
%2 = tail call i32 @sa_log_output(i8* %0)
%3 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
unsigned int sleep(unsigned int);
void real_sleep(unsigned int sec) {
  unsigned int s;
  s = sec;
  while ((s = sleep(s)))
    ;
}


x86 assembly (clang, -O0):
<real_sleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <sleep@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
je     113a <real_sleep+0x2a>
jmp    1121 <real_sleep+0x11>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<real_sleep>:
push   %rax
mov    %edi,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %eax,%edi
call   1030 <sleep@plt>
test   %eax,%eax
jne    1120 <real_sleep+0x10>
pop    %rax
ret

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

LLVM IR (-O2):
define void @real_sleep(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ %0, %1 ], [ %4, %2 ]
%4 = tail call i32 @sleep(i32 %3)
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %2
6: ; preds = %2
ret void
}
__uint128_t __attribute__((no)) ushift_53_i(unsigned int data) {
  return (__uint128_t)data << 53;
}


x86 assembly (clang, -O0):
<ushift_53_i>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,%ecx
mov    %rcx,%rax
shl    $0x35,%rax
shr    $0xb,%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
pop    %rbp
ret

x86 assembly (clang, -O2):
<ushift_53_i>:
mov    %rdi,%rax
shl    $0x35,%rax
shr    $0xb,%edi
mov    %rdi,%rdx
ret

LLVM IR (-O0):
define { i64, i64 } @ushift_53_i(i32 %0) {
%2 = alloca i128
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = zext i32 %4 to i128
%6 = shl i128 %5, 53
store i128 %6, i128* %2
%7 = bitcast i128* %2 to { i64, i64 }*
%8 = load { i64, i64 }, { i64, i64 }* %7
ret { i64, i64 } %8
}

LLVM IR (-O2):
define { i64, i64 } @ushift_53_i(i32 %0) {
%2 = zext i32 %0 to i64
%3 = shl i64 %2, 53
%4 = lshr i32 %0, 11
%5 = zext i32 %4 to i64
%6 = insertvalue { i64, i64 } poison, i64 %3, 0
%7 = insertvalue { i64, i64 } %6, i64 %5, 1
ret { i64, i64 } %7
}
/* Variables and functions */
int /*<<< orphan*/ pthread_exit(void *);
long recieve(char *);
void *recieve_entry(void *data) {
  long int retval = recieve((char *)data);
  pthread_exit((void *)retval);
}


x86 assembly (clang, -O0):
<recieve_entry>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <recieve@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <pthread_exit@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<recieve_entry>:
push   %rax
call   1030 <recieve@plt>
mov    %rax,%rdi
pop    %rax
jmp    1040 <pthread_exit@plt>

LLVM IR (-O0):
define i8* @recieve_entry(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i64 @recieve(i8* %5)
store i64 %6, i64* %4
%7 = load i64, i64* %4
%8 = inttoptr i64 %7 to i8*
%9 = call i32 @pthread_exit(i8* %8)
%10 = load i8*, i8** %2
ret i8* %10
}

LLVM IR (-O2):
define noalias i8* @recieve_entry(i8* %0) {
%2 = tail call i64 @recieve(i8* %0)
%3 = inttoptr i64 %2 to i8*
%4 = tail call i32 @pthread_exit(i8* %3)
ret i8* undef
}
/* Variables and functions */
int core4_swap(char *, int);
int U_EMRSTROKEANDFILLPATH_swap(char *record, int torev) {
  return (core4_swap(record, torev));
}


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

x86 assembly (clang, -O2):
<U_EMRSTROKEANDFILLPATH_swap>:
jmp    1030 <core4_swap@plt>

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

LLVM IR (-O2):
define i32 @U_EMRSTROKEANDFILLPATH_swap(i8* %0, i32 %1) {
%3 = tail call i32 @core4_swap(i8* %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ print(char *);
void idt_int11(void) { print("!! Segment not present "); }


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

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

LLVM IR (-O0):
@.str = [24 x i8] c"!! Segment not present \00"
define void @idt_int11() {
%1 = call i32 @print(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"!! Segment not present \00"
define void @idt_int11() {
%1 = tail call i32 @print(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret void
}
void *chmc_syscat_mem(void *d, void *s, unsigned long len) {
  __builtin_memcpy(d, s, len);
  return (char *)d + len;
}


x86 assembly (clang, -O0):
<chmc_syscat_mem>:
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),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <memcpy@plt>
mov    -0x8(%rbp),%rax
add    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chmc_syscat_mem>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rdi,%rbx
call   1030 <memcpy@plt>
add    %r14,%rbx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @chmc_syscat_mem(i8* writeonly %0, i8* nocapture %1, i64 %2) {
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %0, i8* align 1 %1, i64 %2, i1 false)
%4 = getelementptr inbounds i8, i8* %0, i64 %2
ret i8* %4
}
/* Variables and functions */
scalar_t__ ft_islower(unsigned char);
int ft_toupper(int c) {
  if (ft_islower(((unsigned char)c)))
    return ('A' + (c - 'a'));
  return (c);
}


x86 assembly (clang, -O0):
<ft_toupper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
movzbl %al,%edi
call   1030 <ft_islower@plt>
cmp    $0x0,%rax
je     1141 <ft_toupper+0x31>
mov    -0x8(%rbp),%eax
sub    $0x61,%eax
add    $0x41,%eax
mov    %eax,-0x4(%rbp)
jmp    1147 <ft_toupper+0x37>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_toupper>:
push   %rbx
mov    %edi,%ebx
movzbl %bl,%edi
call   1030 <ft_islower@plt>
lea    -0x20(%rbx),%ecx
test   %rax,%rax
cmove  %ebx,%ecx
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @ft_toupper(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = trunc i32 %4 to i8
%6 = call i64 @ft_islower(i8 zeroext %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %1
%9 = load i32, i32* %3
%10 = sub nsw i32 %9, 97
%11 = add nsw i32 65, %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, %8
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @ft_toupper(i32 %0) {
%2 = trunc i32 %0 to i8
%3 = tail call i64 @ft_islower(i8 zeroext %2)
%4 = icmp eq i64 %3, 0
%5 = add nsw i32 %0, -32
%6 = select i1 %4, i32 %0, i32 %5
ret i32 %6
}
void lcm_set_pwm(unsigned int divider) {}


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

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

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

LLVM IR (-O2):
define void @lcm_set_pwm(i32 %0) {
ret void
}
unsigned int simple_object_fetch_little_32(const unsigned char *buf) {
  return (((unsigned int)buf[3] << 24) | ((unsigned int)buf[2] << 16) |
          ((unsigned int)buf[1] << 8) | (unsigned int)buf[0]);
}


x86 assembly (clang, -O0):
<simple_object_fetch_little_32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl 0x3(%rax),%eax
shl    $0x18,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x2(%rcx),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
or     %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @simple_object_fetch_little_32(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 3
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = shl nuw i32 %4, 24
%6 = getelementptr inbounds i8, i8* %0, i64 2
%7 = load i8, i8* %6
%8 = zext i8 %7 to i32
%9 = shl nuw nsw i32 %8, 16
%10 = or i32 %9, %5
%11 = getelementptr inbounds i8, i8* %0, i64 1
%12 = load i8, i8* %11
%13 = zext i8 %12 to i32
%14 = shl nuw nsw i32 %13, 8
%15 = or i32 %10, %14
%16 = load i8, i8* %0
%17 = zext i8 %16 to i32
%18 = or i32 %15, %17
ret i32 %18
}
/* Variables and functions */
int /*<<< orphan*/ cpy(int *, void *, int);
int getInt(void *data) {
  int v;
  cpy(&v, data, sizeof(int));
  return v;
}


x86 assembly (clang, -O0):
<getInt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdi
mov    $0x4,%edx
call   1030 <cpy@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getInt>:
push   %rax
mov    %rdi,%rsi
lea    0x4(%rsp),%rdi
mov    $0x4,%edx
call   1030 <cpy@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @getInt(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @cpy(i32* %2, i8* %0, i32 4)
%5 = load i32, i32* %2
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ task_assert_flag(int, int);
void task_assert_stopped(int id) { task_assert_flag(id, (1 << 5)); }


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

x86 assembly (clang, -O2):
<task_assert_stopped>:
mov    $0x20,%esi
jmp    1030 <task_assert_flag@plt>

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

LLVM IR (-O2):
define void @task_assert_stopped(i32 %0) {
%2 = tail call i32 @task_assert_flag(i32 %0, i32 32)
ret void
}
void INT_Excep_RIIC3_TEI3(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_RIIC3_TEI3() {
ret void
}
void exchange(unsigned *a, unsigned *b) {
  unsigned t = *a;
  *a = *b;
  *b = t;
}


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

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

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

LLVM IR (-O2):
define void @exchange(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
store i32 %4, i32* %0
store i32 %3, i32* %1
ret void
}
/* Variables and functions */
size_t corner_size(const size_t n, const int negative) {
  return n / 2 + (negative == 0);
}


x86 assembly (clang, -O0):
<corner_size>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x1,%rax
cmpl   $0x0,-0xc(%rbp)
sete   %cl
and    $0x1,%cl
movzbl %cl,%ecx
movslq %ecx,%rcx
add    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<corner_size>:
mov    %rdi,%rax
shr    %rax
cmp    $0x1,%esi
adc    $0x0,%rax
ret

LLVM IR (-O0):
define i64 @corner_size(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 = udiv i64 %5, 2
%7 = load i32, i32* %4
%8 = icmp eq i32 %7, 0
%9 = zext i1 %8 to i32
%10 = sext i32 %9 to i64
%11 = add i64 %6, %10
ret i64 %11
}

LLVM IR (-O2):
define i64 @corner_size(i64 %0, i32 %1) {
%3 = lshr i64 %0, 1
%4 = icmp eq i32 %1, 0
%5 = zext i1 %4 to i64
%6 = add nuw i64 %3, %5
ret i64 %6
}
/* Variables and functions */
int /*<<< orphan*/ dyOutClose(int);
int dyOutFlush(int);
int dyOutFlushAndClose(int token) {
  int len = dyOutFlush(token);
  dyOutClose(token);
  return len;
}


x86 assembly (clang, -O0):
<dyOutFlushAndClose>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <dyOutFlush@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <dyOutClose@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dyOutFlushAndClose>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
call   1030 <dyOutFlush@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1040 <dyOutClose@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @dyOutFlushAndClose(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @dyOutFlush(i32 %4)
store i32 %5, i32* %3
%6 = load i32, i32* %2
%7 = call i32 @dyOutClose(i32 %6)
%8 = load i32, i32* %3
ret i32 %8
}

LLVM IR (-O2):
define i32 @dyOutFlushAndClose(i32 %0) {
%2 = tail call i32 @dyOutFlush(i32 %0)
%3 = tail call i32 @dyOutClose(i32 %0)
ret i32 %2
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_1__;

/* Type definitions */
struct TYPE_4__ {
  int purpose;
};
typedef TYPE_1__ X509_PURPOSE;

/* Variables and functions */
int xp_cmp(const X509_PURPOSE *const *a, const X509_PURPOSE *const *b) {
  return (*a)->purpose - (*b)->purpose;
}


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

x86 assembly (clang, -O2):
<xp_cmp>:
mov    (%rdi),%rax
mov    (%rax),%eax
mov    (%rsi),%rcx
sub    (%rcx),%eax
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { i32 }
define i32 @xp_cmp(%struct.TYPE_4__** %0, %struct.TYPE_4__** %1) {
%3 = alloca %struct.TYPE_4__**
%4 = alloca %struct.TYPE_4__**
store %struct.TYPE_4__** %0, %struct.TYPE_4__*** %3
store %struct.TYPE_4__** %1, %struct.TYPE_4__*** %4
%5 = load %struct.TYPE_4__**, %struct.TYPE_4__*** %3
%6 = load %struct.TYPE_4__*, %struct.TYPE_4__** %5
%7 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %6, i32 0, i32 0
%8 = load i32, i32* %7
%9 = load %struct.TYPE_4__**, %struct.TYPE_4__*** %4
%10 = load %struct.TYPE_4__*, %struct.TYPE_4__** %9
%11 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %10, i32 0, i32 0
%12 = load i32, i32* %11
%13 = sub nsw i32 %8, %12
ret i32 %13
}

LLVM IR (-O2):
%struct.TYPE_4__ = type { i32 }
define i32 @xp_cmp(%struct.TYPE_4__** nocapture %0, %struct.TYPE_4__** nocapture %1) {
%3 = load %struct.TYPE_4__*, %struct.TYPE_4__** %0
%4 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %3, i64 0, i32 0
%5 = load i32, i32* %4
%6 = load %struct.TYPE_4__*, %struct.TYPE_4__** %1
%7 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %6, i64 0, i32 0
%8 = load i32, i32* %7
%9 = sub nsw i32 %5, %8
ret i32 %9
}
/* Type definitions */
typedef int __u16;

/* Variables and functions */
int atapi_cdb_len(__u16 *dev_id) {
  __u16 tmp = dev_id[0] & 0x3;
  switch (tmp) {
  case 0:
    return 12;
  case 1:
    return 16;
  default:
    return -1;
  }
}


x86 assembly (clang, -O0):
<atapi_cdb_len>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
and    $0x3,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
test   %eax,%eax
je     1138 <atapi_cdb_len+0x38>
jmp    1127 <atapi_cdb_len+0x27>
mov    -0x18(%rbp),%eax
sub    $0x1,%eax
je     1144 <atapi_cdb_len+0x44>
jmp    1150 <atapi_cdb_len+0x50>
movl   $0xc,-0x4(%rbp)
jmp    1157 <atapi_cdb_len+0x57>
movl   $0x10,-0x4(%rbp)
jmp    1157 <atapi_cdb_len+0x57>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<atapi_cdb_len>:
mov    (%rdi),%eax
and    $0x3,%eax
cmp    $0x1,%eax
mov    $0x10,%ecx
mov    $0xffffffff,%edx
cmove  %ecx,%edx
test   %eax,%eax
mov    $0xc,%eax
cmovne %edx,%eax
ret

LLVM IR (-O0):
define i32 @atapi_cdb_len(i32* %0) {
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
%5 = load i32*, i32** %3
%6 = getelementptr inbounds i32, i32* %5, i64 0
%7 = load i32, i32* %6
%8 = and i32 %7, 3
store i32 %8, i32* %4
%9 = load i32, i32* %4
switch i32 %9, label %12 [
i32 0, label %10
i32 1, label %11
]
10: ; preds = %1
store i32 12, i32* %2
br label %13
11: ; preds = %1
store i32 16, i32* %2
br label %13
12: ; preds = %1
store i32 -1, i32* %2
br label %13
13: ; preds = %12, %11, %10
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @atapi_cdb_len(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 3
%4 = icmp eq i32 %3, 1
%5 = select i1 %4, i32 16, i32 -1
%6 = icmp eq i32 %3, 0
%7 = select i1 %6, i32 12, i32 %5
ret i32 %7
}
unsigned short int f37(unsigned short int x, unsigned int y) {
  return (x >> y) | (x << ((-y) & (8 * 2 - 1)));
}


x86 assembly (clang, -O0):
<f37>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %esi,-0x8(%rbp)
movzwl -0x2(%rbp),%eax
mov    -0x8(%rbp),%ecx
sar    %cl,%eax
movzwl -0x2(%rbp),%edx
xor    %ecx,%ecx
sub    -0x8(%rbp),%ecx
and    $0xf,%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f37>:
mov    %esi,%ecx
mov    %edi,%eax
shr    %cl,%eax
neg    %cl
and    $0xf,%cl
shl    %cl,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define zeroext i16 @f37(i16 zeroext %0, i32 %1) {
%3 = alloca i16
%4 = alloca i32
store i16 %0, i16* %3
store i32 %1, i32* %4
%5 = load i16, i16* %3
%6 = zext i16 %5 to i32
%7 = load i32, i32* %4
%8 = ashr i32 %6, %7
%9 = load i16, i16* %3
%10 = zext i16 %9 to i32
%11 = load i32, i32* %4
%12 = sub i32 0, %11
%13 = and i32 %12, 15
%14 = shl i32 %10, %13
%15 = or i32 %8, %14
%16 = trunc i32 %15 to i16
ret i16 %16
}

LLVM IR (-O2):
define zeroext i16 @f37(i16 zeroext %0, i32 %1) {
%3 = zext i16 %0 to i32
%4 = lshr i32 %3, %1
%5 = sub i32 0, %1
%6 = and i32 %5, 15
%7 = shl nuw nsw i32 %3, %6
%8 = or i32 %7, %4
%9 = trunc i32 %8 to i16
ret i16 %9
}
/* Variables and functions */
int /*<<< orphan*/ EACCES;
int /*<<< orphan*/ errno;
int rmdir(const char *path) {
  errno = EACCES;
  return -1;
}


x86 assembly (clang, -O0):
<rmdir>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    0x2ed9(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec0(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@EACCES = global i32 0
@errno = global i32 0
define i32 @rmdir(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @EACCES
store i32 %3, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@EACCES = global i32 0
@errno = global i32 0
define i32 @rmdir(i8* nocapture readnone %0) {
%2 = load i32, i32* @EACCES
store i32 %2, i32* @errno
ret i32 -1
}
unsigned null_PCAP_DATALINK(void *hPcap) {
  hPcap = (hPcap);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @null_PCAP_DATALINK(i8* nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
struct rusage {
  int dummy;
};
typedef int /*<<< orphan*/ pid_t;
typedef int /*<<< orphan*/ __pid_t;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
pid_t __wait4(__pid_t pid, int *stat_loc, int options, struct rusage *usage) {
  __set_errno(ENOSYS);
  return (pid_t)-1;
}


x86 assembly (clang, -O0):
<__wait4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    0x2ebb(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__wait4>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.rusage = type { i32 }
@ENOSYS = global i32 0
define i32 @__wait4(i32 %0, i32* %1, i32 %2, %struct.rusage* %3) {
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i32
%8 = alloca %struct.rusage*
store i32 %0, i32* %5
store i32* %1, i32** %6
store i32 %2, i32* %7
store %struct.rusage* %3, %struct.rusage** %8
%9 = load i32, i32* @ENOSYS
%10 = call i32 @__set_errno(i32 %9)
ret i32 -1
}

LLVM IR (-O2):
%struct.rusage = type { i32 }
@ENOSYS = global i32 0
define i32 @__wait4(i32 %0, i32* nocapture readnone %1, i32 %2, %struct.rusage* nocapture readnone %3) {
%5 = load i32, i32* @ENOSYS
%6 = tail call i32 @__set_errno(i32 %5)
ret i32 -1
}
void yy_1_IgnoredOpeningTag(char *yytext, int yyleng) {
  ;
  ;
}


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

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

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

LLVM IR (-O2):
define void @yy_1_IgnoredOpeningTag(i8* nocapture %0, i32 %1) {
ret void
}