xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ foo;
typedef int /*<<< orphan*/ bittest;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  struct {
    unsigned int foo : 7;
  } bittest;
  char foo;
  printf("size struct bittest = %u\n", sizeof(bittest));
  printf("size char foo = %u\n", sizeof(foo));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
lea    0xee3(%rip),%rdi
mov    $0x1,%esi
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    $0x4,%esi
call   1030 <printf@plt>
lea    0xef1(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.anon = type { i8, [3 x i8] }
@.str = [26 x i8] c"size struct bittest = %u\0A\00"
@.str.1 = [20 x i8] c"size char foo = %u\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.anon
%3 = alloca i8
store i32 0, i32* %1
%4 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 4)
%5 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 1)
ret i32 0
}

LLVM IR (-O2):
%struct.anon = type { i8, [3 x i8] }
@.str = [26 x i8] c"size struct bittest = %u\0A\00"
@.str.1 = [20 x i8] c"size char foo = %u\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 4)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 1)
ret i32 0
}
int sn_do_setup_pr(struct sn_context *snc) { return 0; }


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

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

LLVM IR (-O0):
%struct.sn_context = type opaque
define i32 @sn_do_setup_pr(%struct.sn_context* %0) {
%2 = alloca %struct.sn_context*
store %struct.sn_context* %0, %struct.sn_context** %2
ret i32 0
}

LLVM IR (-O2):
%struct.sn_context = type opaque
define i32 @sn_do_setup_pr(%struct.sn_context* nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
int main(void) {
  FILE *out = fopen(".out", "a");
  fprintf(out, "testing testing testing\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    0xec8(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xeb6(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xed6(%rip),%rsi
call   1030 <fopen@plt>
lea    0xecc(%rip),%rdi
mov    $0x18,%esi
mov    $0x1,%edx
mov    %rax,%rcx
call   1040 <fwrite@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i8] c".out\00"
@.str.1 = [2 x i8] c"a\00"
@.str.2 = [25 x i8] c"testing testing testing\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
store i32 0, i32* %1
%3 = call i32* @fopen(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %3, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 @fprintf(i32* %4, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c".out\00"
@.str.1 = [2 x i8] c"a\00"
@.str.2 = [25 x i8] c"testing testing testing\0A\00"
define i32 @main() {
%1 = tail call i32* @fopen(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i64 24, i64 1, i32* %1)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_END;
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char const *, char *);
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, long, int /*<<< orphan*/);
long ftell(int /*<<< orphan*/ *);
long file_length(const char *file_name) {
  FILE *f;
  long flen;
  f = fopen(file_name, "rb");
  fseek(f, 0L, SEEK_END);
  flen = ftell(f);
  fclose(f);
  return flen;
}


x86 assembly (clang, -O0):
<file_length>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xea9(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    0x2e7d(%rip),%rax
mov    (%rax),%edx
xor    %eax,%eax
mov    %eax,%esi
call   1050 <fseek@plt>
mov    -0x10(%rbp),%rdi
call   1040 <ftell@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<file_length>:
push   %r14
push   %rbx
push   %rax
lea    0xeb5(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,%rbx
mov    0x2e8e(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1050 <fseek@plt>
mov    %rbx,%rdi
call   1040 <ftell@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1030 <fclose@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"rb\00"
@SEEK_END = global i32 0
define i64 @file_length(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
%4 = alloca i64
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32* @fopen(i8* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i32* %6, i32** %3
%7 = load i32*, i32** %3
%8 = load i32, i32* @SEEK_END
%9 = call i32 @fseek(i32* %7, i64 0, i32 %8)
%10 = load i32*, i32** %3
%11 = call i64 @ftell(i32* %10)
store i64 %11, i64* %4
%12 = load i32*, i32** %3
%13 = call i32 @fclose(i32* %12)
%14 = load i64, i64* %4
ret i64 %14
}

LLVM IR (-O2):
@.str = [3 x i8] c"rb\00"
@SEEK_END = global i32 0
define i64 @file_length(i8* nocapture %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @SEEK_END
%4 = tail call i32 @fseek(i32* %2, i64 0, i32 %3)
%5 = tail call i64 @ftell(i32* %2)
%6 = tail call i32 @fclose(i32* %2)
ret i64 %5
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t ADC_Five_In(void) {
  (*((volatile uint32_t *)0x400380A0)) =
      ((*((volatile uint32_t *)0x400380A0)) & 0xFFFFFFF0) + 9;
  uint32_t data;
  (*((volatile uint32_t *)0x40038028)) = 0x0008;
  while (((*((volatile uint32_t *)0x40038004)) & 0x08) == 0) {
  };
  data = (*((volatile uint32_t *)0x400380A8)) & 0xFFF;
  (*((volatile uint32_t *)0x4003800C)) = 0x0008;
  return data;
}


x86 assembly (clang, -O0):
<ADC_Five_In>:
push   %rbp
mov    %rsp,%rbp
mov    $0x400380a0,%eax
mov    (%rax),%ecx
and    $0xfffffff0,%ecx
add    $0x9,%ecx
mov    $0x400380a0,%eax
mov    %ecx,(%rax)
mov    $0x40038028,%eax
movl   $0x8,(%rax)
mov    $0x40038004,%eax
mov    (%rax),%eax
and    $0x8,%eax
cmp    $0x0,%eax
jne    113b <ADC_Five_In+0x3b>
jmp    1123 <ADC_Five_In+0x23>
mov    $0x400380a8,%eax
mov    (%rax),%eax
and    $0xfff,%eax
mov    %eax,-0x4(%rbp)
mov    $0x4003800c,%eax
movl   $0x8,(%rax)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ADC_Five_In>:
mov    0x400380a0,%eax
and    $0xfffffff0,%eax
or     $0x9,%eax
mov    %eax,0x400380a0
movl   $0x8,0x40038028
nop
testl  $0x8,0x40038004
je     1120 <ADC_Five_In+0x20>
mov    $0xfff,%eax
and    0x400380a8,%eax
movl   $0x8,0x4003800c
ret

LLVM IR (-O0):
define i32 @ADC_Five_In() {
%1 = alloca i32
%2 = load volatile i32, i32* inttoptr (i64 1073971360 to i32*)
%3 = and i32 %2, -16
%4 = add i32 %3, 9
store volatile i32 %4, i32* inttoptr (i64 1073971360 to i32*)
store volatile i32 8, i32* inttoptr (i64 1073971240 to i32*)
br label %5
5: ; preds = %9, %0
%6 = load volatile i32, i32* inttoptr (i64 1073971204 to i32*)
%7 = and i32 %6, 8
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %5
br label %5
10: ; preds = %5
%11 = load volatile i32, i32* inttoptr (i64 1073971368 to i32*)
%12 = and i32 %11, 4095
store i32 %12, i32* %1
store volatile i32 8, i32* inttoptr (i64 1073971212 to i32*)
%13 = load i32, i32* %1
ret i32 %13
}

LLVM IR (-O2):
define i32 @ADC_Five_In() {
%1 = load volatile i32, i32* inttoptr (i64 1073971360 to i32*)
%2 = and i32 %1, -16
%3 = or i32 %2, 9
store volatile i32 %3, i32* inttoptr (i64 1073971360 to i32*)
store volatile i32 8, i32* inttoptr (i64 1073971240 to i32*)
br label %4
4: ; preds = %4, %0
%5 = load volatile i32, i32* inttoptr (i64 1073971204 to i32*)
%6 = and i32 %5, 8
%7 = icmp eq i32 %6, 0
br i1 %7, label %4, label %8
8: ; preds = %4
%9 = load volatile i32, i32* inttoptr (i64 1073971368 to i32*)
%10 = and i32 %9, 4095
store volatile i32 8, i32* inttoptr (i64 1073971212 to i32*)
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ default_handler();
__attribute__((weak)) void RNG_IRQHandler() { default_handler(); }


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

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

LLVM IR (-O0):
define weak void @RNG_IRQHandler() {
%1 = call i32 (...) @default_handler()
ret void
}

LLVM IR (-O2):
define weak void @RNG_IRQHandler() {
%1 = tail call i32 (...) @default_handler()
ret void
}
void g_date_compare() {}


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

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

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

LLVM IR (-O2):
define void @g_date_compare() {
ret void
}
void data_abort_C(void) {}


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

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

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

LLVM IR (-O2):
define void @data_abort_C() {
ret void
}
int negInstruction(int i) { return (-1) * i; }


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

x86 assembly (clang, -O2):
<negInstruction>:
mov    %edi,%eax
neg    %eax
ret

LLVM IR (-O0):
define i32 @negInstruction(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul nsw i32 -1, %3
ret i32 %4
}

LLVM IR (-O2):
define i32 @negInstruction(i32 %0) {
%2 = sub nsw i32 0, %0
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ __simc(int, int, int /*<<< orphan*/, int /*<<< orphan*/);
void simc_argv(void *buf) { __simc(1002, (int)buf, 0, 0); }


x86 assembly (clang, -O0):
<simc_argv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,%esi
mov    $0x3ea,%edi
xor    %ecx,%ecx
mov    %ecx,%edx
call   1030 <__simc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<simc_argv>:
mov    %rdi,%rsi
mov    $0x3ea,%edi
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <__simc@plt>

LLVM IR (-O0):
define void @simc_argv(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = ptrtoint i8* %3 to i32
%5 = call i32 @__simc(i32 1002, i32 %4, i32 0, i32 0)
ret void
}

LLVM IR (-O2):
define void @simc_argv(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = trunc i64 %2 to i32
%4 = tail call i32 @__simc(i32 1002, i32 %3, i32 0, i32 0)
ret void
}
unsigned int IntMasterStatusGet(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @IntMasterStatusGet() {
ret i32 0
}
int isDM3bin(char *filename) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @isDM3bin(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ _exit(int);
void exit(int status) { _exit(status); }


x86 assembly (clang, -O0):
<exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<exit>:
push   %rax
call   1030 <_exit@plt>

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

LLVM IR (-O2):
define void @exit(i32 %0) {
%2 = tail call i32 @_exit(i32 %0)
unreachable
}
unsigned int GetMaxUnsignedInt(void) { return ((unsigned int)-1); }


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

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

LLVM IR (-O0):
define i32 @GetMaxUnsignedInt() {
ret i32 -1
}

LLVM IR (-O2):
define i32 @GetMaxUnsignedInt() {
ret i32 -1
}
/* Variables and functions */
scalar_t__ sbrk(int /*<<< orphan*/);
char *get_high_address() { return (char *)sbrk(0) + 16384; }


x86 assembly (clang, -O0):
<get_high_address>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <sbrk@plt>
add    $0x4000,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_high_address>:
push   %rax
xor    %edi,%edi
call   1030 <sbrk@plt>
add    $0x4000,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i8* @get_high_address() {
%1 = call i64 @sbrk(i32 0)
%2 = inttoptr i64 %1 to i8*
%3 = getelementptr inbounds i8, i8* %2, i64 16384
ret i8* %3
}

LLVM IR (-O2):
define i8* @get_high_address() {
%1 = tail call i64 @sbrk(i32 0)
%2 = inttoptr i64 %1 to i8*
%3 = getelementptr inbounds i8, i8* %2, i64 16384
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void display(int *number, int length) {
  int i;
  for (i = 0; i < length; i++)
    printf("%d ", number[i]);
  printf("\n");
}


x86 assembly (clang, -O0):
<display>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1159 <display+0x49>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <display+0x16>
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<display>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1157 <display+0x37>
mov    %rdi,%r15
mov    %esi,%r12d
lea    0xec7(%rip),%r14
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <display+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define void @display(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
%14 = tail call i32 @putchar(i32 10)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ GLsizei;
typedef int /*<<< orphan*/ GLbyte;

/* Variables and functions */
int /*<<< orphan*/ GL_BYTE;
int /*<<< orphan*/ glCallLists(int /*<<< orphan*/, int /*<<< orphan*/,
                               int /*<<< orphan*/ *);
int /*<<< orphan*/ strlen(char *);
void printStrokedString(char *s) {
  GLsizei len = strlen(s);
  glCallLists(len, GL_BYTE, (GLbyte *)s);
}


x86 assembly (clang, -O0):
<printStrokedString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
mov    0x2ea6(%rip),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%rdx
call   1040 <glCallLists@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printStrokedString>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    0x2eb8(%rip),%rcx
mov    (%rcx),%esi
mov    %eax,%edi
mov    %rbx,%rdx
pop    %rbx
jmp    1040 <glCallLists@plt>

LLVM IR (-O0):
@GL_BYTE = global i32 0
define void @printStrokedString(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = load i32, i32* @GL_BYTE
%8 = load i8*, i8** %2
%9 = bitcast i8* %8 to i32*
%10 = call i32 @glCallLists(i32 %6, i32 %7, i32* %9)
ret void
}

LLVM IR (-O2):
@GL_BYTE = global i32 0
define void @printStrokedString(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = load i32, i32* @GL_BYTE
%4 = bitcast i8* %0 to i32*
%5 = tail call i32 @glCallLists(i32 %2, i32 %3, i32* %4)
ret void
}
int sgs_getdec(char c) { return c - '0'; }


x86 assembly (clang, -O0):
<sgs_getdec>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
sub    $0x30,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sgs_getdec>:
lea    -0x30(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @sgs_getdec(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = sub nsw i32 %4, 48
ret i32 %5
}

LLVM IR (-O2):
define i32 @sgs_getdec(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = add nsw i32 %2, -48
ret i32 %3
}
/* Variables and functions */
int ig_indirect_table_get(unsigned int, int, unsigned int, int, unsigned int *);
int ig_sc_table_get(unsigned int dev_id, unsigned int index,
                    unsigned int *pentry) {
  if ((index < 0) || (index > 31)) {
    return -1;
  }
  return ig_indirect_table_get(dev_id, 3, index, 4, pentry);
}


x86 assembly (clang, -O0):
<ig_sc_table_get>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
cmpl   $0x0,-0xc(%rbp)
jb     1136 <ig_sc_table_get+0x26>
cmpl   $0x1f,-0xc(%rbp)
jbe    1142 <ig_sc_table_get+0x32>
movl   $0xffffffff,-0x4(%rbp)
jmp    115e <ig_sc_table_get+0x4e>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%r8
mov    $0x3,%esi
mov    $0x4,%ecx
call   1030 <ig_indirect_table_get@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ig_sc_table_get>:
cmp    $0x1f,%esi
jbe    111b <ig_sc_table_get+0xb>
mov    $0xffffffff,%eax
ret
mov    %rdx,%r8
mov    %esi,%edx
mov    $0x3,%esi
mov    $0x4,%ecx
jmp    1030 <ig_indirect_table_get@plt>

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

LLVM IR (-O2):
define i32 @ig_sc_table_get(i32 %0, i32 %1, i32* %2) {
%4 = icmp ugt i32 %1, 31
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = tail call i32 @ig_indirect_table_get(i32 %0, i32 3, i32 %1, i32 4, i32* %2)
br label %7
7: ; preds = %3, %5
%8 = phi i32 [ %6, %5 ], [ -1, %3 ]
ret i32 %8
}
/* Variables and functions */
unsigned int strlen(char *);
char toupper(char);
char *uppercase(char *str) {
  unsigned int i;
  for (i = 0; i < strlen(str); ++i)
    str[i] = toupper(str[i]);
  return str;
}


x86 assembly (clang, -O0):
<uppercase>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
cmp    %ecx,%eax
jae    1179 <uppercase+0x59>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
movsbl (%rax,%rcx,1),%edi
call   1030 <toupper@plt>
mov    %al,%dl
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    %dl,(%rax,%rcx,1)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1133 <uppercase+0x13>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uppercase>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
test   %eax,%eax
je     1161 <uppercase+0x41>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl (%r14,%rbx,1),%edi
call   1030 <toupper@plt>
mov    %al,(%r14,%rbx,1)
add    $0x1,%rbx
mov    %r14,%rdi
call   1040 <strlen@plt>
mov    %eax,%eax
cmp    %rax,%rbx
jb     1140 <uppercase+0x20>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @uppercase(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %20, %1
%5 = load i32, i32* %3
%6 = load i8*, i8** %2
%7 = call i32 @strlen(i8* %6)
%8 = icmp ult i32 %5, %7
br i1 %8, label %9, label %23
9: ; preds = %4
%10 = load i8*, i8** %2
%11 = load i32, i32* %3
%12 = zext i32 %11 to i64
%13 = getelementptr inbounds i8, i8* %10, i64 %12
%14 = load i8, i8* %13
%15 = call signext i8 @toupper(i8 signext %14)
%16 = load i8*, i8** %2
%17 = load i32, i32* %3
%18 = zext i32 %17 to i64
%19 = getelementptr inbounds i8, i8* %16, i64 %18
store i8 %15, i8* %19
br label %20
20: ; preds = %9
%21 = load i32, i32* %3
%22 = add i32 %21, 1
store i32 %22, i32* %3
br label %4
23: ; preds = %4
%24 = load i8*, i8** %2
ret i8* %24
}

LLVM IR (-O2):
define i8* @uppercase(i8* returned %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %9, %4 ], [ 0, %1 ]
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
%8 = tail call signext i8 @toupper(i8 signext %7)
store i8 %8, i8* %6
%9 = add nuw nsw i64 %5, 1
%10 = tail call i32 @strlen(i8* %0)
%11 = zext i32 %10 to i64
%12 = icmp ult i64 %9, %11
br i1 %12, label %4, label %13
13: ; preds = %4, %1
ret i8* %0
}
void USBD_IRQHandler(void) {
  while (1)
    ;
}


x86 assembly (clang, -O0):
<USBD_IRQHandler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <USBD_IRQHandler+0x9>
jmp    1109 <USBD_IRQHandler+0x9>

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

LLVM IR (-O0):
define void @USBD_IRQHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @USBD_IRQHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}
int m_isspace(int ch) {
  if (ch <= 32)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<m_isspace>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x20,-0x8(%rbp)
jg     111d <m_isspace+0x1d>
movl   $0x1,-0x4(%rbp)
jmp    1124 <m_isspace+0x24>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<m_isspace>:
xor    %eax,%eax
cmp    $0x21,%edi
setl   %al
ret

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

LLVM IR (-O2):
define i32 @m_isspace(i32 %0) {
%2 = icmp slt i32 %0, 33
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ atomic_add_uint8_t(int /*<<< orphan*/ *, int);
uint8_t atomic_inc_uint8_t(uint8_t *var) { return atomic_add_uint8_t(var, 1); }


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

x86 assembly (clang, -O2):
<atomic_inc_uint8_t>:
mov    $0x1,%esi
jmp    1030 <atomic_add_uint8_t@plt>

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

LLVM IR (-O2):
define i32 @atomic_inc_uint8_t(i32* %0) {
%2 = tail call i32 @atomic_add_uint8_t(i32* %0, i32 1)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ do_user_input();
int main(int argc, char **argv) {
  do_user_input();
  return 0;
}


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

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

LLVM IR (-O0):
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 (...) @do_user_input()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @do_user_input()
ret i32 0
}
int do_792() { return 792; }


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

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

LLVM IR (-O0):
define i32 @do_792() {
ret i32 792
}

LLVM IR (-O2):
define i32 @do_792() {
ret i32 792
}
void fa188(void) {
P0A:
  goto P0A;
  ({
    P01A:
      goto P01A;
      ({
        P012A:
          goto P012A;
          0;
      });
    P01B:
      goto P01B;
      ({
        P013A:
          goto P013A;
          0;
      });
    P01C:
      goto P01C;
      0;
  });
a:
  ({
    P02A:
      goto P02A;
      ({
        P024A:
          goto P024A;
          0;
      });
    P02B:
      goto P02B;
      ({
        P025A:
          goto P025A;
          0;
      });
    P02C:
      goto P02C;
      0;
  });
P0C:
  goto P0C;
  0;
p0D:
  goto p0D;
  goto a;
P0D:
  goto P0D;
}


x86 assembly (clang, -O0):
<fa188>:
push   %rbp
mov    %rsp,%rbp
jmp    1104 <fa188+0x4>

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

LLVM IR (-O0):
define void @fa188() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
br label %7
7: ; preds = %7, %0
br label %7
8: ; No predecessors!
br label %9
9: ; preds = %9, %8
br label %9
10: ; No predecessors!
br label %11
11: ; preds = %11, %10
br label %11
12: ; preds = %12
br label %12
13: ; No predecessors!
br label %14
14: ; preds = %14, %13
br label %14
15: ; preds = %15
br label %15
16: ; No predecessors!
br label %17
17: ; preds = %17, %16
br label %17
18: ; No predecessors!
br label %19
19: ; preds = %19, %18
br label %19
20: ; preds = %20
br label %20
21: ; No predecessors!
br label %22
22: ; preds = %22, %21
br label %22
23: ; preds = %23
br label %23
24: ; preds = %24
br label %24
25: ; preds = %25
br label %25
26: ; preds = %26
br label %26
}

LLVM IR (-O2):
define void @fa188() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
void puts(char *str) {
  while (*str != 0) {
    putchar(*str);
    str++;
  }
}


x86 assembly (clang, -O0):
<puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1149 <puts+0x39>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <putchar@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <puts+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<puts>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <puts+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <putchar@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <puts+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @puts(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %8, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %14
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = load i8, i8* %9
%11 = call i32 @putchar(i8 signext %10)
%12 = load i8*, i8** %2
%13 = getelementptr inbounds i8, i8* %12, i32 1
store i8* %13, i8** %2
br label %3
14: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @puts(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %9, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = tail call i32 @putchar(i8 signext %5)
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ load_compiler();
int /*<<< orphan*/ pNvCliCompiledProgramFree(char const *);
void NvCliCompiledProgramFree(const char *compiledProgram) {
  load_compiler();
  pNvCliCompiledProgramFree(compiledProgram);
}


x86 assembly (clang, -O0):
<NvCliCompiledProgramFree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <load_compiler@plt>
mov    -0x8(%rbp),%rdi
call   1040 <pNvCliCompiledProgramFree@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<NvCliCompiledProgramFree>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <load_compiler@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <pNvCliCompiledProgramFree@plt>

LLVM IR (-O0):
define void @NvCliCompiledProgramFree(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @load_compiler()
%4 = load i8*, i8** %2
%5 = call i32 @pNvCliCompiledProgramFree(i8* %4)
ret void
}

LLVM IR (-O2):
define void @NvCliCompiledProgramFree(i8* %0) {
%2 = tail call i32 (...) @load_compiler()
%3 = tail call i32 @pNvCliCompiledProgramFree(i8* %0)
ret void
}
void ble_evt_sm_passkey_request(
    const struct ble_msg_sm_passkey_request_evt_t *msg) {}


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

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

LLVM IR (-O0):
%struct.ble_msg_sm_passkey_request_evt_t = type opaque
define void @ble_evt_sm_passkey_request(%struct.ble_msg_sm_passkey_request_evt_t* %0) {
%2 = alloca %struct.ble_msg_sm_passkey_request_evt_t*
store %struct.ble_msg_sm_passkey_request_evt_t* %0, %struct.ble_msg_sm_passkey_request_evt_t** %2
ret void
}

LLVM IR (-O2):
%struct.ble_msg_sm_passkey_request_evt_t = type opaque
define void @ble_evt_sm_passkey_request(%struct.ble_msg_sm_passkey_request_evt_t* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int byte_swap_32(int);
void check_byte_swap(void) { assert(byte_swap_32(0xAABBCCDD) == 0xDDCCBBAA); }


x86 assembly (clang, -O0):
<check_byte_swap>:
push   %rbp
mov    %rsp,%rbp
mov    $0xaabbccdd,%edi
call   1030 <byte_swap_32@plt>
cmp    $0xddccbbaa,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_byte_swap>:
push   %rax
mov    $0xaabbccdd,%edi
call   1030 <byte_swap_32@plt>
xor    %edi,%edi
cmp    $0xddccbbaa,%eax
sete   %dil
pop    %rax
jmp    1040 <assert@plt>

LLVM IR (-O0):
define void @check_byte_swap() {
%1 = call i32 @byte_swap_32(i32 -1430532899)
%2 = icmp eq i32 %1, -573785174
%3 = zext i1 %2 to i32
%4 = call i32 @assert(i32 %3)
ret void
}

LLVM IR (-O2):
define void @check_byte_swap() {
%1 = tail call i32 @byte_swap_32(i32 -1430532899)
%2 = icmp eq i32 %1, -573785174
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ nile_pause();
void nile_Sleep_doze(int npauses) {
  while (npauses--)
    nile_pause();
}


x86 assembly (clang, -O0):
<nile_Sleep_doze>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x4(%rbp)
cmp    $0x0,%eax
je     113b <nile_Sleep_doze+0x2b>
mov    $0x0,%al
call   1030 <nile_pause@plt>
jmp    111b <nile_Sleep_doze+0xb>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nile_Sleep_doze>:
push   %rbx
test   %edi,%edi
je     112c <nile_Sleep_doze+0x1c>
mov    %edi,%ebx
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <nile_pause@plt>
add    $0xffffffff,%ebx
jne    1120 <nile_Sleep_doze+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @nile_Sleep_doze(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %8, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %5, %3 ], [ %0, %1 ]
%5 = add nsw i32 %4, -1
%6 = tail call i32 (...) @nile_pause()
%7 = icmp eq i32 %5, 0
br i1 %7, label %8, label %3
8: ; preds = %3, %1
ret void
}
void to_uns_int_store_4(__float128 a, unsigned int *p) {
  p[4] = (unsigned int)a;
}


x86 assembly (clang, -O0):
<to_uns_int_store_4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movaps %xmm0,-0x10(%rbp)
mov    %rdi,-0x18(%rbp)
movaps -0x10(%rbp),%xmm0
call   1130 <__fixunstfsi>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,0x10(%rax)
add    $0x20,%rsp
pop    %rbp
ret
nopl   0x0(%rax,%rax,1)

x86 assembly (clang, -O2):
<to_uns_int_store_4>:
push   %rbx
mov    %rdi,%rbx
call   1110 <__fixunstfsi>
mov    %eax,0x10(%rbx)
pop    %rbx
ret
xchg   %ax,%ax

LLVM IR (-O0):
define void @to_uns_int_store_4(fp128 %0, i32* %1) {
%3 = alloca fp128
%4 = alloca i32*
store fp128 %0, fp128* %3
store i32* %1, i32** %4
%5 = load fp128, fp128* %3
%6 = fptoui fp128 %5 to i32
%7 = load i32*, i32** %4
%8 = getelementptr inbounds i32, i32* %7, i64 4
store i32 %6, i32* %8
ret void
}

LLVM IR (-O2):
define void @to_uns_int_store_4(fp128 %0, i32* nocapture writeonly %1) {
%3 = fptoui fp128 %0 to i32
%4 = getelementptr inbounds i32, i32* %1, i64 4
store i32 %3, i32* %4
ret void
}
int main(void) {
  int a;
  &a - 1;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = getelementptr inbounds i32, i32* %1, i64 -1
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
long set_mempolicy(int mode, unsigned long *nmask, unsigned long maxnode) {
  return 0;
}


x86 assembly (clang, -O0):
<set_mempolicy>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i64 @set_mempolicy(i32 %0, i64* nocapture readnone %1, i64 %2) {
ret i64 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int Delete(int argc, char **argv) {
  printf("Calling from Delete\n");
  return 1;
}


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

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

LLVM IR (-O0):
@.str = [21 x i8] c"Calling from Delete\0A\00"
define i32 @Delete(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@str = [20 x i8] c"Calling from Delete\00"
define i32 @Delete(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret i32 1
}
int ft_str_is_lowercase(char *str) {
  int i;
  i = 0;
  while (str[i] != '\0') {
    if (str[i] < 'a' || str[i] > 'z')
      return (0);
    i++;
  }
  return (1);
}


x86 assembly (clang, -O0):
<ft_str_is_lowercase>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1168 <ft_str_is_lowercase+0x68>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x61,%eax
jl     114e <ft_str_is_lowercase+0x4e>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x7a,%eax
jle    115a <ft_str_is_lowercase+0x5a>
movl   $0x0,-0x4(%rbp)
jmp    116f <ft_str_is_lowercase+0x6f>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    110f <ft_str_is_lowercase+0xf>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_str_is_lowercase>:
mov    (%rdi),%cl
mov    $0x1,%eax
test   %cl,%cl
je     1123 <ft_str_is_lowercase+0x23>
add    $0x1,%rdi
nop
add    $0x85,%cl
cmp    $0xe5,%cl
jbe    1124 <ft_str_is_lowercase+0x24>
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <ft_str_is_lowercase+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @ft_str_is_lowercase(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %8
4: ; preds = %8
%5 = getelementptr inbounds i8, i8* %0, i64 %13
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
br i1 %7, label %14, label %8
8: ; preds = %1, %4
%9 = phi i64 [ %13, %4 ], [ 0, %1 ]
%10 = phi i8 [ %6, %4 ], [ %2, %1 ]
%11 = add i8 %10, -123
%12 = icmp ult i8 %11, -26
%13 = add nuw i64 %9, 1
br i1 %12, label %14, label %4
14: ; preds = %8, %4, %1
%15 = phi i32 [ 1, %1 ], [ 1, %4 ], [ 0, %8 ]
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ MixerSettingsHandle();
int /*<<< orphan*/ UAVObjRequestUpdate(int /*<<< orphan*/);
void MixerSettingsRequestUpdate() {
  UAVObjRequestUpdate(MixerSettingsHandle());
}


x86 assembly (clang, -O0):
<MixerSettingsRequestUpdate>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <MixerSettingsHandle@plt>
mov    %eax,%edi
call   1040 <UAVObjRequestUpdate@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<MixerSettingsRequestUpdate>:
push   %rax
xor    %eax,%eax
call   1030 <MixerSettingsHandle@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <UAVObjRequestUpdate@plt>

LLVM IR (-O0):
define void @MixerSettingsRequestUpdate() {
%1 = call i32 (...) @MixerSettingsHandle()
%2 = call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}

LLVM IR (-O2):
define void @MixerSettingsRequestUpdate() {
%1 = tail call i32 (...) @MixerSettingsHandle()
%2 = tail call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fn_b();
int /*<<< orphan*/ printf(char *);
int main() {
  printf("main() called\n");
  fn_b();
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [14 x i8] c"main() called\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @fn_b()
ret i32 0
}
__attribute__((visibility("default"))) void *objc_readClassPair() { return 0; }


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

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

LLVM IR (-O0):
define i8* @objc_readClassPair() {
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @objc_readClassPair() {
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ _mm_stream_si32(void *, int);
void test_stream_si32(int x, void *y) { _mm_stream_si32(y, x); }


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

x86 assembly (clang, -O2):
<test_stream_si32>:
mov    %edi,%eax
mov    %rsi,%rdi
mov    %eax,%esi
jmp    1030 <_mm_stream_si32@plt>

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

LLVM IR (-O2):
define void @test_stream_si32(i32 %0, i8* %1) {
%3 = tail call i32 @_mm_stream_si32(i8* %1, i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_dbllist2str();
int /*<<< orphan*/ test_intlist2str();
int main(int argc, char *argv[]) {
  test_intlist2str();
  test_dbllist2str();
  return 0;
}


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

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

LLVM IR (-O0):
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 (...) @test_intlist2str()
%7 = call i32 (...) @test_dbllist2str()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @test_intlist2str()
%4 = tail call i32 (...) @test_dbllist2str()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ setfont(int);
int /*<<< orphan*/ skip();
void n_caseft(void) {
  skip();
  setfont(1);
}


x86 assembly (clang, -O0):
<n_caseft>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <skip@plt>
mov    $0x1,%edi
call   1040 <setfont@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<n_caseft>:
push   %rax
xor    %eax,%eax
call   1030 <skip@plt>
mov    $0x1,%edi
pop    %rax
jmp    1040 <setfont@plt>

LLVM IR (-O0):
define void @n_caseft() {
%1 = call i32 (...) @skip()
%2 = call i32 @setfont(i32 1)
ret void
}

LLVM IR (-O2):
define void @n_caseft() {
%1 = tail call i32 (...) @skip()
%2 = tail call i32 @setfont(i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0xe5() {
  Assert_real((islower(229) == 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_islower.c",
              1150, ("islower should be 0 for 0xe5"));
}


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

x86 assembly (clang, -O2):
<t_islower_0xe5>:
push   %rax
mov    $0xe5,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x47e,%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_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0xe5\00"
define void @t_islower_0xe5() {
%1 = call i64 @islower(i32 229)
%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 1150, 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_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0xe5\00"
define void @t_islower_0xe5() {
%1 = tail call i64 @islower(i32 229)
%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 1150, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}