xunge/DecIR huggingface dataset:
int j(int z) {
  switch (z) {
  case 1:
    return 3;
  case 2:
    return 4;
  }
  return 5;
}


x86 assembly (clang, -O0):
<j>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x1,%eax
je     112c <j+0x2c>
jmp    111b <j+0x1b>
mov    -0xc(%rbp),%eax
sub    $0x2,%eax
je     1138 <j+0x38>
jmp    1144 <j+0x44>
movl   $0x3,-0x4(%rbp)
jmp    114b <j+0x4b>
movl   $0x4,-0x4(%rbp)
jmp    114b <j+0x4b>
movl   $0x5,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<j>:
xor    %ecx,%ecx
cmp    $0x2,%edi
sete   %cl
xor    $0x5,%ecx
cmp    $0x1,%edi
mov    $0x3,%eax
cmovne %ecx,%eax
ret

LLVM IR (-O0):
define i32 @j(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %7 [
i32 1, label %5
i32 2, label %6
]
5: ; preds = %1
store i32 3, i32* %2
br label %8
6: ; preds = %1
store i32 4, i32* %2
br label %8
7: ; preds = %1
store i32 5, i32* %2
br label %8
8: ; preds = %7, %6, %5
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
define i32 @j(i32 %0) {
%2 = icmp eq i32 %0, 2
%3 = select i1 %2, i32 4, i32 5
%4 = icmp eq i32 %0, 1
%5 = select i1 %4, i32 3, i32 %3
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ esc_prn(char *);
int help_save(int argc, char **argv) {
  esc_prn("\n{Hsave} [{UFILENAME}[.vpc]]\n"
          "  Save the configuration to the file {UFILENAME.vpc}. If there is "
          "no '.' in\n"
          "  {UFILENAME} then a '.vpc' extension is added. If {UFILENAME} is "
          "omitted then the\n"
          "  configuration will be saved to {Ustartup.vpc}\n");
  return 1;
}


x86 assembly (clang, -O0):
<help_save>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <esc_prn@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [237 x i8] c"\0A{Hsave} [{UFILENAME}[.vpc]]\0A Save the configuration to the file {UFILENAME.vpc}. If there is no '.' in\0A {UFILENAME} then a '.vpc' extension is added. If {UFILENAME} is omitted then the\0A configuration will be saved to {Ustartup.vpc}\0A\00"
define i32 @help_save(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 @esc_prn(i8* getelementptr inbounds ([237 x i8], [237 x i8]* @.str, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@.str = [237 x i8] c"\0A{Hsave} [{UFILENAME}[.vpc]]\0A Save the configuration to the file {UFILENAME.vpc}. If there is no '.' in\0A {UFILENAME} then a '.vpc' extension is added. If {UFILENAME} is omitted then the\0A configuration will be saved to {Ustartup.vpc}\0A\00"
define i32 @help_save(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @esc_prn(i8* getelementptr inbounds ([237 x i8], [237 x i8]* @.str, i64 0, i64 0))
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ SPI_MODE_2;
int test_aardvark(int, int /*<<< orphan*/);
int test_aardvark_mode2(int fd) { return test_aardvark(fd, SPI_MODE_2); }


x86 assembly (clang, -O0):
<test_aardvark_mode2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ebb(%rip),%rax
mov    (%rax),%esi
call   1030 <test_aardvark@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_aardvark_mode2>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
jmp    1030 <test_aardvark@plt>

LLVM IR (-O0):
@SPI_MODE_2 = global i32 0
define i32 @test_aardvark_mode2(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @SPI_MODE_2
%5 = call i32 @test_aardvark(i32 %3, i32 %4)
ret i32 %5
}

LLVM IR (-O2):
@SPI_MODE_2 = global i32 0
define i32 @test_aardvark_mode2(i32 %0) {
%2 = load i32, i32* @SPI_MODE_2
%3 = tail call i32 @test_aardvark(i32 %0, i32 %2)
ret i32 %3
}
/* Type definitions */
struct sembuf {
  int sem_num;
  int sem_op;
  scalar_t__ sem_flg;
};

/* Variables and functions */
int /*<<< orphan*/ semop(int, struct sembuf *, int);
void release_sem(int id, int num) {
  struct sembuf sb;
  sb.sem_num = num;
  sb.sem_op = 1;
  sb.sem_flg = 0;
  semop(id, &sb, 1);
}


x86 assembly (clang, -O0):
<release_sem>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x18(%rbp)
movl   $0x1,-0x14(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x18(%rbp),%rsi
mov    $0x1,%edx
call   1030 <semop@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<release_sem>:
sub    $0x18,%rsp
mov    %esi,0x8(%rsp)
movl   $0x1,0xc(%rsp)
movq   $0x0,0x10(%rsp)
lea    0x8(%rsp),%rsi
mov    $0x1,%edx
call   1030 <semop@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.sembuf = type { i32, i32, i64 }
define void @release_sem(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca %struct.sembuf
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %5, i32 0, i32 0
store i32 %6, i32* %7
%8 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %5, i32 0, i32 1
store i32 1, i32* %8
%9 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %5, i32 0, i32 2
store i64 0, i64* %9
%10 = load i32, i32* %3
%11 = call i32 @semop(i32 %10, %struct.sembuf* %5, i32 1)
ret void
}

LLVM IR (-O2):
%struct.sembuf = type { i32, i32, i64 }
define void @release_sem(i32 %0, i32 %1) {
%3 = alloca %struct.sembuf
%4 = bitcast %struct.sembuf* %3 to i8*
%5 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %3, i64 0, i32 0
store i32 %1, i32* %5
%6 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %3, i64 0, i32 1
store i32 1, i32* %6
%7 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %3, i64 0, i32 2
store i64 0, i64* %7
%8 = call i32 @semop(i32 %0, %struct.sembuf* %3, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EX_USAGE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void emit_help(void) {
  fputs("Usage: charinfo char-or-integer ..\n", stderr);
  exit(EX_USAGE);
}


x86 assembly (clang, -O0):
<emit_help>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ead(%rip),%rax
mov    (%rax),%esi
lea    0xecc(%rip),%rdi
call   1030 <fputs@plt>
mov    0x2ea8(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<emit_help>:
push   %rax
mov    0x2eb0(%rip),%rax
mov    (%rax),%esi
lea    0xecf(%rip),%rdi
call   1030 <fputs@plt>
mov    0x2eab(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [36 x i8] c"Usage: charinfo char-or-integer ..\0A\00"
@stderr = global i32 0
@EX_USAGE = global i32 0
define void @emit_help() {
%1 = load i32, i32* @stderr
%2 = call i32 @fputs(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = load i32, i32* @EX_USAGE
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
@.str = [36 x i8] c"Usage: charinfo char-or-integer ..\0A\00"
@stderr = global i32 0
@EX_USAGE = global i32 0
define void @emit_help() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = load i32, i32* @EX_USAGE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
void RGMshowcur(void) {}


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

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

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

LLVM IR (-O2):
define void @RGMshowcur() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ glutBitmapString(void *, char *);
int /*<<< orphan*/ snprintf(char *, int, char *, int);
void glutBitmapInt(void *fontface, int i) {
  char buf[64];
  snprintf(buf, 64, "%d", i);
  glutBitmapString(fontface, buf);
}


x86 assembly (clang, -O0):
<glutBitmapInt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    -0x50(%rbp),%rdi
mov    -0xc(%rbp),%ecx
mov    $0x40,%esi
lea    0xebe(%rip),%rdx
call   1030 <snprintf@plt>
mov    -0x8(%rbp),%rdi
lea    -0x50(%rbp),%rsi
call   1040 <glutBitmapString@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<glutBitmapInt>:
push   %r14
push   %rbx
sub    $0x48,%rsp
mov    %esi,%ecx
mov    %rdi,%rbx
lea    0xecd(%rip),%rdx
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0x40,%esi
call   1030 <snprintf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <glutBitmapString@plt>
add    $0x48,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define void @glutBitmapInt(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca [64 x i8]
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = getelementptr inbounds [64 x i8], [64 x i8]* %5, i64 0, i64 0
%7 = load i32, i32* %4
%8 = call i32 @snprintf(i8* %6, i32 64, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = load i8*, i8** %3
%10 = getelementptr inbounds [64 x i8], [64 x i8]* %5, i64 0, i64 0
%11 = call i32 @glutBitmapString(i8* %9, i8* %10)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @glutBitmapInt(i8* %0, i32 %1) {
%3 = alloca [64 x i8]
%4 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%5 = call i32 @snprintf(i8* %4, i32 64, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1)
%6 = call i32 @glutBitmapString(i8* %0, i8* %4)
ret void
}
/* Variables and functions */
unsigned int UARTRegConfigModeEnable(unsigned int, int);
unsigned int UARTIntIdentityGet(unsigned int baseAdd) {
  unsigned int lcrRegValue = 0;
  unsigned int retVal = 0;
  lcrRegValue = UARTRegConfigModeEnable(baseAdd, (0x007F));
  retVal = ((*((volatile unsigned int *)(baseAdd + (0x8)))) & (0x0000003Eu));
  (*((volatile unsigned int *)(baseAdd + (0xC)))) = lcrRegValue;
  return retVal;
}


x86 assembly (clang, -O0):
<UARTIntIdentityGet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x7f,%esi
call   1030 <UARTRegConfigModeEnable@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x8,%eax
mov    %eax,%eax
mov    (%rax),%eax
and    $0x3e,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%ecx
mov    -0x4(%rbp),%eax
add    $0xc,%eax
mov    %eax,%eax
mov    %ecx,(%rax)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UARTIntIdentityGet>:
push   %rbx
mov    %edi,%ebx
mov    $0x7f,%esi
call   1030 <UARTRegConfigModeEnable@plt>
lea    0x8(%rbx),%ecx
mov    (%rcx),%ecx
and    $0x3e,%ecx
add    $0xc,%ebx
mov    %eax,(%rbx)
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @UARTIntIdentityGet(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
store i32 0, i32* %4
%5 = load i32, i32* %2
%6 = call i32 @UARTRegConfigModeEnable(i32 %5, i32 127)
store i32 %6, i32* %3
%7 = load i32, i32* %2
%8 = add i32 %7, 8
%9 = zext i32 %8 to i64
%10 = inttoptr i64 %9 to i32*
%11 = load volatile i32, i32* %10
%12 = and i32 %11, 62
store i32 %12, i32* %4
%13 = load i32, i32* %3
%14 = load i32, i32* %2
%15 = add i32 %14, 12
%16 = zext i32 %15 to i64
%17 = inttoptr i64 %16 to i32*
store volatile i32 %13, i32* %17
%18 = load i32, i32* %4
ret i32 %18
}

LLVM IR (-O2):
define i32 @UARTIntIdentityGet(i32 %0) {
%2 = tail call i32 @UARTRegConfigModeEnable(i32 %0, i32 127)
%3 = add i32 %0, 8
%4 = zext i32 %3 to i64
%5 = inttoptr i64 %4 to i32*
%6 = load volatile i32, i32* %5
%7 = and i32 %6, 62
%8 = add i32 %0, 12
%9 = zext i32 %8 to i64
%10 = inttoptr i64 %9 to i32*
store volatile i32 %2, i32* %10
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void dump(int *num) {
  int i;
  int sum = 0;
  for (i = 0; i < 6; ++i) {
    sum += num[i];
  }
  printf("%d\n", sum);
}


x86 assembly (clang, -O0):
<dump>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x6,-0xc(%rbp)
jge    1153 <dump+0x43>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112a <dump+0x1a>
mov    -0x10(%rbp),%esi
lea    0xea3(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dump>:
movdqu 0x8(%rdi),%xmm0
pshufd $0xee,%xmm0,%xmm1
paddd  %xmm0,%xmm1
pshufd $0x55,%xmm1,%xmm0
paddd  %xmm1,%xmm0
movd   %xmm0,%esi
add    0x4(%rdi),%esi
add    (%rdi),%esi
lea    0xec9(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define void @dump(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
store i32* %0, i32** %2
store i32 0, i32* %4
store i32 0, i32* %3
br label %5
5: ; preds = %16, %1
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 6
br i1 %7, label %8, label %19
8: ; preds = %5
%9 = load i32*, i32** %2
%10 = load i32, i32* %3
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i32, i32* %9, i64 %11
%13 = load i32, i32* %12
%14 = load i32, i32* %4
%15 = add nsw i32 %14, %13
store i32 %15, i32* %4
br label %16
16: ; preds = %8
%17 = load i32, i32* %3
%18 = add nsw i32 %17, 1
store i32 %18, i32* %3
br label %5
19: ; preds = %5
%20 = load i32, i32* %4
%21 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %20)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @dump(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = getelementptr inbounds i32, i32* %0, i64 1
%4 = load i32, i32* %3
%5 = getelementptr inbounds i32, i32* %0, i64 2
%6 = bitcast i32* %5 to <4 x i32>*
%7 = load <4 x i32>, <4 x i32>* %6
%8 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %7)
%9 = add nsw i32 %8, %4
%10 = add nsw i32 %9, %2
%11 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  printf("Hello World \n");
  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)
lea    0xed3(%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 = [14 x i8] c"Hello World \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 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [13 x i8] c"Hello World \00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
void *memchr(const void *s, int c, size_t n) {
  const unsigned char *src = s;
  unsigned char uc = c;
  while (n-- != 0) {
    if (*src == uc) {
      return (void *)src;
    }
    src++;
  }
  return NULL;
}


x86 assembly (clang, -O0):
<memchr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x14(%rbp),%eax
mov    %al,-0x29(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x20(%rbp)
cmp    $0x0,%rax
je     1167 <memchr+0x67>
mov    -0x28(%rbp),%rax
movzbl (%rax),%eax
movzbl -0x29(%rbp),%ecx
cmp    %ecx,%eax
jne    1156 <memchr+0x56>
mov    -0x28(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    116f <memchr+0x6f>
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
jmp    111d <memchr+0x1d>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<memchr>:
test   %rdx,%rdx
je     1122 <memchr+0x22>
mov    %rdi,%rax
nopl   0x0(%rax,%rax,1)
cmp    %sil,(%rax)
je     1124 <memchr+0x24>
add    $0xffffffffffffffff,%rdx
add    $0x1,%rax
test   %rdx,%rdx
jne    1110 <memchr+0x10>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i8* @memchr(i8* %0, i32 %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i64
%8 = alloca i8*
%9 = alloca i8
store i8* %0, i8** %5
store i32 %1, i32* %6
store i64 %2, i64* %7
%10 = load i8*, i8** %5
store i8* %10, i8** %8
%11 = load i32, i32* %6
%12 = trunc i32 %11 to i8
store i8 %12, i8* %9
br label %13
13: ; preds = %26, %3
%14 = load i64, i64* %7
%15 = add i64 %14, -1
store i64 %15, i64* %7
%16 = icmp ne i64 %14, 0
br i1 %16, label %17, label %29
17: ; preds = %13
%18 = load i8*, i8** %8
%19 = load i8, i8* %18
%20 = zext i8 %19 to i32
%21 = load i8, i8* %9
%22 = zext i8 %21 to i32
%23 = icmp eq i32 %20, %22
br i1 %23, label %24, label %26
24: ; preds = %17
%25 = load i8*, i8** %8
store i8* %25, i8** %4
br label %30
26: ; preds = %17
%27 = load i8*, i8** %8
%28 = getelementptr inbounds i8, i8* %27, i32 1
store i8* %28, i8** %8
br label %13
29: ; preds = %13
store i8* null, i8** %4
br label %30
30: ; preds = %29, %24
%31 = load i8*, i8** %4
ret i8* %31
}

LLVM IR (-O2):
define i8* @memchr(i8* %0, i32 %1, i64 %2) {
%4 = icmp eq i64 %2, 0
br i1 %4, label %16, label %5
5: ; preds = %3
%6 = trunc i32 %1 to i8
br label %7
7: ; preds = %5, %13
%8 = phi i64 [ %2, %5 ], [ %10, %13 ]
%9 = phi i8* [ %0, %5 ], [ %14, %13 ]
%10 = add i64 %8, -1
%11 = load i8, i8* %9
%12 = icmp eq i8 %11, %6
br i1 %12, label %16, label %13
13: ; preds = %7
%14 = getelementptr inbounds i8, i8* %9, i64 1
%15 = icmp eq i64 %10, 0
br i1 %15, label %16, label %7
16: ; preds = %7, %13, %3
%17 = phi i8* [ null, %3 ], [ null, %13 ], [ %9, %7 ]
ret i8* %17
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
main() {
  int x = 7;
  printf("The value of x before using pointer is %d.\n\n", x);
  int *p;
  p = &x;
  *p = 12;
  printf("The value of x after using pointer is %d.\n", x);
}


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

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

LLVM IR (-O0):
@.str = [45 x i8] c"The value of x before using pointer is %d.\0A\0A\00"
@.str.1 = [43 x i8] c"The value of x after using pointer is %d.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
store i32 7, i32* %1
%3 = load i32, i32* %1
%4 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i32 %3)
store i32* %1, i32** %2
%5 = load i32*, i32** %2
store i32 12, i32* %5
%6 = load i32, i32* %1
%7 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0), i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [45 x i8] c"The value of x before using pointer is %d.\0A\0A\00"
@.str.1 = [43 x i8] c"The value of x after using pointer is %d.\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i32 7)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0), i32 12)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ AT_FDCWD;
int /*<<< orphan*/ __NR_readlinkat;
int /*<<< orphan*/ syscall(int /*<<< orphan*/, int /*<<< orphan*/, char const *,
                           char *, size_t);
__attribute__((always_)) ssize_t _syscall_readlink(const char *pathname,
                                                   char *buf, size_t bufsiz) {
  return syscall(__NR_readlinkat, AT_FDCWD, pathname, buf, bufsiz);
}


x86 assembly (clang, -O0):
<_syscall_readlink>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    0x2e9c(%rip),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
call   1030 <syscall@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_syscall_readlink>:
mov    %rdx,%r8
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
mov    0x2ea7(%rip),%rax
mov    (%rax),%esi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
@__NR_readlinkat = global i32 0
@AT_FDCWD = global i32 0
define i32 @_syscall_readlink(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 i32, i32* @__NR_readlinkat
%8 = load i32, i32* @AT_FDCWD
%9 = load i8*, i8** %4
%10 = load i8*, i8** %5
%11 = load i64, i64* %6
%12 = call i32 @syscall(i32 %7, i32 %8, i8* %9, i8* %10, i64 %11)
ret i32 %12
}

LLVM IR (-O2):
@__NR_readlinkat = global i32 0
@AT_FDCWD = global i32 0
define i32 @_syscall_readlink(i8* %0, i8* %1, i64 %2) {
%4 = load i32, i32* @__NR_readlinkat
%5 = load i32, i32* @AT_FDCWD
%6 = tail call i32 @syscall(i32 %4, i32 %5, i8* %0, i8* %1, i64 %2)
ret i32 %6
}
/* Variables and functions */
int __syscall(int /*<<< orphan*/, int, void *, int);
int read(int fd, void *p, int size) { return __syscall(0, fd, p, size); }


x86 assembly (clang, -O0):
<read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
xor    %edi,%edi
call   1030 <__syscall@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read>:
mov    %edx,%ecx
mov    %rsi,%rdx
mov    %edi,%esi
xor    %edi,%edi
jmp    1030 <__syscall@plt>

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

LLVM IR (-O2):
define i32 @read(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32 @__syscall(i32 0, i32 %0, i8* %1, i32 %2)
ret i32 %4
}
void fa103(int n) {
  {
    int b[n];
  a : {
    int c[n];
    0;
  }
    {
      int d[n];
      0;
    };
    int e[n];
    goto a;
    0;
  };
  {
    int f[n];
    {
      int g[n];
      0;
    };
    {
      int h[n];
      0;
    };
    ;
    int i[n];
    0;
  };
  ;
  int j[n];
  0;
}


x86 assembly (clang, -O0):
<fa103>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x10(%rbp)
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x20(%rbp)
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x30(%rbp)
mov    %rax,-0x38(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rax,-0x40(%rbp)
jmp    111c <fa103+0x1c>

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

LLVM IR (-O0):
define void @fa103(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
%8 = alloca i64
%9 = alloca i64
%10 = alloca i8*
%11 = alloca i64
%12 = alloca i8*
%13 = alloca i64
%14 = alloca i8*
%15 = alloca i64
%16 = alloca i64
%17 = alloca i8*
%18 = alloca i64
store i32 %0, i32* %2
%19 = load i32, i32* %2
%20 = zext i32 %19 to i64
%21 = call i8* @llvm.stacksave()
store i8* %21, i8** %3
%22 = alloca i32, i64 %20
store i64 %20, i64* %4
br label %23
23: ; preds = %23, %1
%24 = load i32, i32* %2
%25 = zext i32 %24 to i64
%26 = call i8* @llvm.stacksave()
store i8* %26, i8** %5
%27 = alloca i32, i64 %25
store i64 %25, i64* %6
%28 = load i8*, i8** %5
%29 = load i32, i32* %2
%30 = zext i32 %29 to i64
%31 = call i8* @llvm.stacksave()
store i8* %31, i8** %7
%32 = alloca i32, i64 %30
store i64 %30, i64* %8
%33 = load i8*, i8** %7
%34 = load i32, i32* %2
%35 = zext i32 %34 to i64
%36 = alloca i32, i64 %35
store i64 %35, i64* %9
br label %23
37: ; No predecessors!
%38 = load i32, i32* %2
%39 = zext i32 %38 to i64
%40 = call i8* @llvm.stacksave()
store i8* %40, i8** %10
%41 = alloca i32, i64 %39
store i64 %39, i64* %11
%42 = load i32, i32* %2
%43 = zext i32 %42 to i64
%44 = call i8* @llvm.stacksave()
store i8* %44, i8** %12
%45 = alloca i32, i64 %43
store i64 %43, i64* %13
%46 = load i8*, i8** %12
%47 = load i32, i32* %2
%48 = zext i32 %47 to i64
%49 = call i8* @llvm.stacksave()
store i8* %49, i8** %14
%50 = alloca i32, i64 %48
store i64 %48, i64* %15
%51 = load i8*, i8** %14
%52 = load i32, i32* %2
%53 = zext i32 %52 to i64
%54 = alloca i32, i64 %53
store i64 %53, i64* %16
%55 = load i8*, i8** %10
%56 = load i32, i32* %2
%57 = zext i32 %56 to i64
%58 = call i8* @llvm.stacksave()
store i8* %58, i8** %17
%59 = alloca i32, i64 %57
store i64 %57, i64* %18
%60 = load i8*, i8** %17
ret void
}

LLVM IR (-O2):
define void @fa103(i32 %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
/* Variables and functions */
int dec(int);
int cal(int a) { return dec(a); }


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

x86 assembly (clang, -O2):
<cal>:
jmp    1030 <dec@plt>

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

LLVM IR (-O2):
define i32 @cal(i32 %0) {
%2 = tail call i32 @dec(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int, int);
void dirreen(void) {
  printf("Welcome to TOS 32-Bit, Version 1.0 ( Tutorial 7 ) - 2014", 12, 8, 0x0,
         0xC);
}


x86 assembly (clang, -O0):
<dirreen>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0xc,%r8d
mov    $0x8,%edx
xor    %ecx,%ecx
mov    %r8d,%esi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<dirreen>:
lea    0xee9(%rip),%rdi
mov    $0xc,%esi
mov    $0x8,%edx
xor    %ecx,%ecx
mov    $0xc,%r8d
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [57 x i8] c"Welcome to TOS 32-Bit, Version 1.0 ( Tutorial 7 ) - 2014\00"
define void @dirreen() {
%1 = call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0), i32 12, i32 8, i32 0, i32 12)
ret void
}

LLVM IR (-O2):
@.str = [57 x i8] c"Welcome to TOS 32-Bit, Version 1.0 ( Tutorial 7 ) - 2014\00"
define void @dirreen() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0), i32 12, i32 8, i32 0, i32 12)
ret void
}
/* Variables and functions */
scalar_t__ check();
int /*<<< orphan*/ printf(char *);
void *MAN(void *arg) {
  int wait_flag = 1;
  while (1) {
    if (check() && wait_flag) {
      printf("DEADLOCK DETECTED\n");
      wait_flag = 0;
    }
    if (!check()) {
      wait_flag = 1;
    }
  }
}


x86 assembly (clang, -O0):
<MAN>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    $0x0,%al
call   1040 <check@plt>
cmp    $0x0,%rax
je     1161 <MAN+0x41>
cmpl   $0x0,-0xc(%rbp)
je     1161 <MAN+0x41>
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0xc(%rbp)
mov    $0x0,%al
call   1040 <check@plt>
cmp    $0x0,%rax
jne    1179 <MAN+0x59>
movl   $0x1,-0xc(%rbp)
jmp    1133 <MAN+0x13>

x86 assembly (clang, -O2):
<MAN>:
push   %rbp
push   %r14
push   %rbx
mov    $0x1,%ebp
lea    0xed0(%rip),%r14
mov    $0x1,%ebx
jmp    114d <MAN+0x2d>
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <check@plt>
test   %rax,%rax
cmove  %ebp,%ebx
xor    %eax,%eax
call   1040 <check@plt>
test   %rax,%rax
je     1140 <MAN+0x20>
test   %ebx,%ebx
je     1140 <MAN+0x20>
mov    %r14,%rdi
call   1030 <puts@plt>
xor    %ebx,%ebx
jmp    1140 <MAN+0x20>

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

LLVM IR (-O2):
@str = [18 x i8] c"DEADLOCK DETECTED\00"
define noalias i8* @MAN(i8* nocapture readnone %0) {
br label %2
2: ; preds = %10, %1
%3 = phi i32 [ 1, %1 ], [ %14, %10 ]
%4 = tail call i64 (...) @check()
%5 = icmp ne i64 %4, 0
%6 = icmp ne i32 %3, 0
%7 = select i1 %5, i1 %6, i1 false
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
br label %10
10: ; preds = %8, %2
%11 = phi i32 [ 0, %8 ], [ %3, %2 ]
%12 = tail call i64 (...) @check()
%13 = icmp eq i64 %12, 0
%14 = select i1 %13, i32 1, i32 %11
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
float get_water_volume_of_profile(char *);
int /*<<< orphan*/ printf(char *, float);
int /*<<< orphan*/ stdin;
int main(int argc, char const *argv[]) {
  char hill_profile[10000 + 1];
  fgets(hill_profile, 10000 + 1, stdin);
  float volume = get_water_volume_of_profile(hill_profile);
  printf("%0.1f\n", volume);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2740,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x2730(%rbp),%rdi
mov    0x2e91(%rip),%rax
mov    (%rax),%edx
mov    $0x2711,%esi
call   1050 <fgets@plt>
lea    -0x2730(%rbp),%rdi
call   1040 <get_water_volume_of_profile@plt>
movss  %xmm0,-0x2734(%rbp)
ff
movss  -0x2734(%rbp),%xmm0
ff
lea    0xe7a(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x2740,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x2720,%rsp
mov    0x2ea9(%rip),%rax
mov    (%rax),%edx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x2711,%esi
call   1050 <fgets@plt>
mov    %rbx,%rdi
call   1040 <get_water_volume_of_profile@plt>
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x2720,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@stdin = global i32 0
@.str = [7 x i8] c"%0.1f\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [10001 x i8]
%7 = alloca float
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = getelementptr inbounds [10001 x i8], [10001 x i8]* %6, i64 0, i64 0
%9 = load i32, i32* @stdin
%10 = call i32 @fgets(i8* %8, i32 10001, i32 %9)
%11 = getelementptr inbounds [10001 x i8], [10001 x i8]* %6, i64 0, i64 0
%12 = call float @get_water_volume_of_profile(i8* %11)
store float %12, float* %7
%13 = load float, float* %7
%14 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), float %13)
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32 0
@.str = [7 x i8] c"%0.1f\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [10001 x i8]
%4 = getelementptr inbounds [10001 x i8], [10001 x i8]* %3, i64 0, i64 0
%5 = load i32, i32* @stdin
%6 = call i32 @fgets(i8* %4, i32 10001, i32 %5)
%7 = call float @get_water_volume_of_profile(i8* %4)
%8 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), float %7)
ret i32 0
}
int execute_sched_getscheduler() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_sched_getscheduler() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isascii(int);
void t_isascii_0xa2() {
  Assert_real((isascii(162) == 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",
              815, ("isascii should be 0 for 0xa2"));
}


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

x86 assembly (clang, -O2):
<t_isascii_0xa2>:
push   %rax
mov    $0xa2,%edi
call   1030 <isascii@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x32f,%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 0xa2\00"
define void @t_isascii_0xa2() {
%1 = call i64 @isascii(i32 162)
%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 815, 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 0xa2\00"
define void @t_isascii_0xa2() {
%1 = tail call i64 @isascii(i32 162)
%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 815, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef scalar_t__ volatile uint8_t;

/* Variables and functions */
uint8_t volatile_fetch_add_u8(volatile uint8_t *dest, uint8_t val) {
  uint8_t result = *dest;
  *dest = result + val;
  return result;
}


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

x86 assembly (clang, -O2):
<volatile_fetch_add_u8>:
mov    %rsi,-0x8(%rsp)
mov    (%rdi),%rax
mov    %rax,-0x10(%rsp)
mov    -0x10(%rsp),%rax
add    -0x8(%rsp),%rax
mov    %rax,(%rdi)
mov    -0x10(%rsp),%rax
ret

LLVM IR (-O0):
define i64 @volatile_fetch_add_u8(i64* %0, i64 %1) {
%3 = alloca i64*
%4 = alloca i64
%5 = alloca i64
store i64* %0, i64** %3
store volatile i64 %1, i64* %4
%6 = load i64*, i64** %3
%7 = load volatile i64, i64* %6
store volatile i64 %7, i64* %5
%8 = load volatile i64, i64* %5
%9 = load volatile i64, i64* %4
%10 = add nsw i64 %8, %9
%11 = load i64*, i64** %3
store volatile i64 %10, i64* %11
%12 = load volatile i64, i64* %5
ret i64 %12
}

LLVM IR (-O2):
define i64 @volatile_fetch_add_u8(i64* %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store volatile i64 %1, i64* %3
%5 = bitcast i64* %4 to i8*
%6 = load volatile i64, i64* %0
store volatile i64 %6, i64* %4
%7 = load volatile i64, i64* %4
%8 = load volatile i64, i64* %3
%9 = add nsw i64 %8, %7
store volatile i64 %9, i64* %0
%10 = load volatile i64, i64* %4
ret i64 %10
}
/* Type definitions */
typedef unsigned long volatile uint32_t;

/* Variables and functions */
void I2CSlaveIntEnable(uint32_t ui32Base, uint32_t ui32IntFlags) {
  uint32_t ui32Val;
  ;

  ;
  ui32Val = (*((volatile unsigned long *)(0x40002000 + 0x0000000C)));
  ui32Val |= ui32IntFlags;
  (*((volatile unsigned long *)(0x40002000 + 0x0000000C))) = ui32Val;
}


x86 assembly (clang, -O0):
<I2CSlaveIntEnable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x4000200c,%eax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%rax
or     %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rcx
mov    $0x4000200c,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<I2CSlaveIntEnable>:
mov    %rdi,-0x8(%rsp)
mov    %rsi,-0x10(%rsp)
mov    0x4000200c,%rax
40
mov    %rax,-0x18(%rsp)
mov    -0x10(%rsp),%rax
or     %rax,-0x18(%rsp)
mov    -0x18(%rsp),%rax
mov    %rax,0x4000200c
40
ret

LLVM IR (-O0):
define void @I2CSlaveIntEnable(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store volatile i64 %0, i64* %3
store volatile i64 %1, i64* %4
%6 = load volatile i64, i64* inttoptr (i64 1073750028 to i64*)
store volatile i64 %6, i64* %5
%7 = load volatile i64, i64* %4
%8 = load volatile i64, i64* %5
%9 = or i64 %8, %7
store volatile i64 %9, i64* %5
%10 = load volatile i64, i64* %5
store volatile i64 %10, i64* inttoptr (i64 1073750028 to i64*)
ret void
}

LLVM IR (-O2):
define void @I2CSlaveIntEnable(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store volatile i64 %0, i64* %3
store volatile i64 %1, i64* %4
%6 = bitcast i64* %5 to i8*
%7 = load volatile i64, i64* inttoptr (i64 1073750028 to i64*)
store volatile i64 %7, i64* %5
%8 = load volatile i64, i64* %4
%9 = load volatile i64, i64* %5
%10 = or i64 %9, %8
store volatile i64 %10, i64* %5
%11 = load volatile i64, i64* %5
store volatile i64 %11, i64* inttoptr (i64 1073750028 to i64*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ alien_offset(int /*<<< orphan*/);
int /*<<< orphan*/ dpeek();
int /*<<< orphan*/ drepl(int /*<<< orphan*/);
int /*<<< orphan*/ from_u16_string(int /*<<< orphan*/);
int /*<<< orphan*/ tag_object(int /*<<< orphan*/);
void primitive_alien_to_u16_string_impl(void) {
  drepl(tag_object(from_u16_string(alien_offset(dpeek()))));
}


x86 assembly (clang, -O0):
<primitive_alien_to_u16_string_impl>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <dpeek@plt>
mov    %eax,%edi
call   1070 <alien_offset@plt>
mov    %eax,%edi
call   1060 <from_u16_string@plt>
mov    %eax,%edi
call   1040 <tag_object@plt>
mov    %eax,%edi
call   1050 <drepl@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<primitive_alien_to_u16_string_impl>:
push   %rax
xor    %eax,%eax
call   1030 <dpeek@plt>
mov    %eax,%edi
call   1070 <alien_offset@plt>
mov    %eax,%edi
call   1060 <from_u16_string@plt>
mov    %eax,%edi
call   1040 <tag_object@plt>
mov    %eax,%edi
pop    %rax
jmp    1050 <drepl@plt>

LLVM IR (-O0):
define void @primitive_alien_to_u16_string_impl() {
%1 = call i32 (...) @dpeek()
%2 = call i32 @alien_offset(i32 %1)
%3 = call i32 @from_u16_string(i32 %2)
%4 = call i32 @tag_object(i32 %3)
%5 = call i32 @drepl(i32 %4)
ret void
}

LLVM IR (-O2):
define void @primitive_alien_to_u16_string_impl() {
%1 = tail call i32 (...) @dpeek()
%2 = tail call i32 @alien_offset(i32 %1)
%3 = tail call i32 @from_u16_string(i32 %2)
%4 = tail call i32 @tag_object(i32 %3)
%5 = tail call i32 @drepl(i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int rand();
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main() {
  int dies = -100;
  srand(time(NULL));
  dies = rand() % 6 + 1;
  printf("Congratulation, you rolled a %d\n", dies);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xffffff9c,-0x8(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1050 <time@plt>
mov    %eax,%edi
call   1040 <srand@plt>
mov    $0x0,%al
call   1060 <rand@plt>
mov    $0x6,%ecx
cltd
idiv   %ecx
add    $0x1,%edx
mov    %edx,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe7b(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1050 <time@plt>
mov    %eax,%edi
call   1040 <srand@plt>
xor    %eax,%eax
call   1060 <rand@plt>
cltq
imul   $0x2aaaaaab,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
add    %edx,%ecx
add    %ecx,%ecx
lea    (%rcx,%rcx,2),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%esi
add    $0x1,%esi
lea    0xe80(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [33 x i8] c"Congratulation, you rolled a %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 -100, i32* %2
%3 = call i32 @time(i32* null)
%4 = call i32 @srand(i32 %3)
%5 = call i32 (...) @rand()
%6 = srem i32 %5, 6
%7 = add nsw i32 %6, 1
store i32 %7, i32* %2
%8 = load i32, i32* %2
%9 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [33 x i8] c"Congratulation, you rolled a %d\0A\00"
define i32 @main() {
%1 = tail call i32 @time(i32* null)
%2 = tail call i32 @srand(i32 %1)
%3 = tail call i32 (...) @rand()
%4 = srem i32 %3, 6
%5 = add nsw i32 %4, 1
%6 = tail call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Write32(void *, int, int);
void omap_dss_init(void) {
  Write32(((void *)0x48050000), 0x010, 1);
  Write32(((void *)0x48050000), 0x040,
          (1 << 6) | (1 << 5) | (1 << 4) | (1 << 3));
}


x86 assembly (clang, -O0):
<omap_dss_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x48050000,%edi
mov    $0x10,%esi
mov    $0x1,%edx
call   1030 <Write32@plt>
mov    $0x48050000,%edi
mov    $0x40,%esi
mov    $0x78,%edx
call   1030 <Write32@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<omap_dss_init>:
push   %rax
mov    $0x48050000,%edi
mov    $0x10,%esi
mov    $0x1,%edx
call   1030 <Write32@plt>
mov    $0x48050000,%edi
mov    $0x40,%esi
mov    $0x78,%edx
pop    %rax
jmp    1030 <Write32@plt>

LLVM IR (-O0):
define void @omap_dss_init() {
%1 = call i32 @Write32(i8* inttoptr (i64 1208287232 to i8*), i32 16, i32 1)
%2 = call i32 @Write32(i8* inttoptr (i64 1208287232 to i8*), i32 64, i32 120)
ret void
}

LLVM IR (-O2):
define void @omap_dss_init() {
%1 = tail call i32 @Write32(i8* inttoptr (i64 1208287232 to i8*), i32 16, i32 1)
%2 = tail call i32 @Write32(i8* inttoptr (i64 1208287232 to i8*), i32 64, i32 120)
ret void
}
unsigned char bcd_to_dec(unsigned char bcd) {
  return (unsigned char)(((((bcd) >> 4) & 0x0F) * 10) + (((bcd)&0x0F)));
}


x86 assembly (clang, -O0):
<bcd_to_dec>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
sar    $0x4,%eax
and    $0xf,%eax
imul   $0xa,%eax,%eax
movzbl -0x1(%rbp),%ecx
and    $0xf,%ecx
add    %ecx,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bcd_to_dec>:
mov    %edi,%eax
shr    $0x4,%al
movzbl %al,%eax
add    %eax,%eax
lea    (%rax,%rax,4),%eax
and    $0xf,%dil
add    %dil,%al
ret

LLVM IR (-O0):
define zeroext i8 @bcd_to_dec(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = ashr i32 %4, 4
%6 = and i32 %5, 15
%7 = mul nsw i32 %6, 10
%8 = load i8, i8* %2
%9 = zext i8 %8 to i32
%10 = and i32 %9, 15
%11 = add nsw i32 %7, %10
%12 = trunc i32 %11 to i8
ret i8 %12
}

LLVM IR (-O2):
define zeroext i8 @bcd_to_dec(i8 zeroext %0) {
%2 = lshr i8 %0, 4
%3 = mul nuw i8 %2, 10
%4 = and i8 %0, 15
%5 = add nuw i8 %3, %4
ret i8 %5
}
void gdk_pixmap_create_from_xpm_d() {}


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

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

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

LLVM IR (-O2):
define void @gdk_pixmap_create_from_xpm_d() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
void FEClrscr() { system("clear"); }


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"clear\00"
define void @FEClrscr() {
%1 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"clear\00"
define void @FEClrscr() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ app();
int main() {
  app();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @app()
ret i32 0
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int send_event;
};
struct TYPE_4__ {
  TYPE_1__ xcreatewindow;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
void set_XEvent_xcreatewindow_send_event(void *_p, int _v) {
  ((XEvent *)_p)->xcreatewindow.send_event = (int)_v;
}


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

x86 assembly (clang, -O2):
<set_XEvent_xcreatewindow_send_event>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i32 }
define void @set_XEvent_xcreatewindow_send_event(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_4__*
%8 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %7, i32 0, i32 0
%9 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %8, i32 0, i32 0
store i32 %5, i32* %9
ret void
}

LLVM IR (-O2):
define void @set_XEvent_xcreatewindow_send_event(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Variables and functions */
int atoi(char const *);
int c_atoi(const char *arg0) { return atoi(arg0); }


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

x86 assembly (clang, -O2):
<c_atoi>:
jmp    1030 <atoi@plt>

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

LLVM IR (-O2):
define i32 @c_atoi(i8* nocapture %0) {
%2 = tail call i32 @atoi(i8* %0)
ret i32 %2
}