xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ make_filename(long, char *, char *);
long umfpack_dl_save_symbolic(void *, char *);
void umf4ssym_(void **Symbolic, long *filenum, long *status) {
  char filename[200];
  make_filename(*filenum, "s", filename);
  *status = umfpack_dl_save_symbolic(*Symbolic, filename);
}


x86 assembly (clang, -O0):
<umf4ssym_>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    -0xe0(%rbp),%rdx
lea    0xeb4(%rip),%rsi
call   1030 <make_filename@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
lea    -0xe0(%rbp),%rsi
call   1040 <umfpack_dl_save_symbolic@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<umf4ssym_>:
push   %r15
push   %r14
push   %rbx
sub    $0xd0,%rsp
mov    %rdx,%r14
mov    %rdi,%rbx
mov    (%rsi),%rdi
lea    0xec4(%rip),%rsi
mov    %rsp,%r15
mov    %r15,%rdx
call   1030 <make_filename@plt>
mov    (%rbx),%rdi
mov    %r15,%rsi
call   1040 <umfpack_dl_save_symbolic@plt>
mov    %rax,(%r14)
add    $0xd0,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [2 x i8] c"s\00"
define void @umf4ssym_(i8** %0, i64* %1, i64* %2) {
%4 = alloca i8**
%5 = alloca i64*
%6 = alloca i64*
%7 = alloca [200 x i8]
store i8** %0, i8*** %4
store i64* %1, i64** %5
store i64* %2, i64** %6
%8 = load i64*, i64** %5
%9 = load i64, i64* %8
%10 = getelementptr inbounds [200 x i8], [200 x i8]* %7, i64 0, i64 0
%11 = call i32 @make_filename(i64 %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* %10)
%12 = load i8**, i8*** %4
%13 = load i8*, i8** %12
%14 = getelementptr inbounds [200 x i8], [200 x i8]* %7, i64 0, i64 0
%15 = call i64 @umfpack_dl_save_symbolic(i8* %13, i8* %14)
%16 = load i64*, i64** %6
store i64 %15, i64* %16
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"s\00"
define void @umf4ssym_(i8** nocapture %0, i64* nocapture %1, i64* nocapture writeonly %2) {
%4 = alloca [200 x i8]
%5 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 0
%6 = load i64, i64* %1
%7 = call i32 @make_filename(i64 %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* %5)
%8 = load i8*, i8** %0
%9 = call i64 @umfpack_dl_save_symbolic(i8* %8, i8* %5)
store i64 %9, i64* %2
ret void
}
/* Variables and functions */
int atoi(char *);
int /*<<< orphan*/ printf(char *, unsigned short);
int main(int argc, char **argv) {
  short s1 = (argc > 120) ? atoi(argv[1]) : -769;
  unsigned short us2 = (unsigned short)s1;
  printf("us2  = %u\n", us2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x78,-0x8(%rbp)
jle    1155 <main+0x35>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <atoi@plt>
mov    %eax,-0x18(%rbp)
jmp    1162 <main+0x42>
mov    $0xfffffcff,%eax
mov    %eax,-0x18(%rbp)
jmp    1162 <main+0x42>
mov    -0x18(%rbp),%eax
mov    %ax,-0x12(%rbp)
mov    -0x12(%rbp),%ax
mov    %ax,-0x14(%rbp)
lea    0xe88(%rip),%rdi
movzwl -0x14(%rbp),%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xfcff,%ax
cmp    $0x79,%edi
jl     1133 <main+0x13>
mov    0x8(%rsi),%rdi
call   1040 <atoi@plt>
movzwl %ax,%esi
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"us2 = %u\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i16
%7 = alloca i16
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i32, i32* %4
%9 = icmp sgt i32 %8, 120
br i1 %9, label %10, label %15
10: ; preds = %2
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 1
%13 = load i8*, i8** %12
%14 = call i32 @atoi(i8* %13)
br label %16
15: ; preds = %2
br label %16
16: ; preds = %15, %10
%17 = phi i32 [ %14, %10 ], [ -769, %15 ]
%18 = trunc i32 %17 to i16
store i16 %18, i16* %6
%19 = load i16, i16* %6
store i16 %19, i16* %7
%20 = load i16, i16* %7
%21 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i16 zeroext %20)
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"us2 = %u\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 120
br i1 %3, label %4, label %9
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @atoi(i8* %6)
%8 = trunc i32 %7 to i16
br label %9
9: ; preds = %2, %4
%10 = phi i16 [ %8, %4 ], [ -769, %2 ]
%11 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i16 zeroext %10)
ret i32 0
}
void autonomous9() {}


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

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

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

LLVM IR (-O2):
define void @autonomous9() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SPI_LEDS_DisableRxInt();
int /*<<< orphan*/ SPI_LEDS_DisableTxInt();
void SPI_LEDS_DisableInt(void) {
  SPI_LEDS_DisableTxInt();
  SPI_LEDS_DisableRxInt();
}


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

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

LLVM IR (-O0):
define void @SPI_LEDS_DisableInt() {
%1 = call i32 (...) @SPI_LEDS_DisableTxInt()
%2 = call i32 (...) @SPI_LEDS_DisableRxInt()
ret void
}

LLVM IR (-O2):
define void @SPI_LEDS_DisableInt() {
%1 = tail call i32 (...) @SPI_LEDS_DisableTxInt()
%2 = tail call i32 (...) @SPI_LEDS_DisableRxInt()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void handler(int signo __attribute__((unused))) { printf("Caught signal\n"); }


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

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

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

LLVM IR (-O2):
@str = [14 x i8] c"Caught signal\00"
define void @handler(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fputs(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void blob_panic(void) {
  static const char zErrMsg[] = "out of memory\n";
  fputs(zErrMsg, stderr);
  exit(1);
}


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

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

LLVM IR (-O0):
@blob_panic.zErrMsg = internal constant [15 x i8] c"out of memory\0A\00"
@stderr = global i32 0
define void @blob_panic() {
%1 = load i32, i32* @stderr
%2 = call i32 @fputs(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @blob_panic.zErrMsg, i64 0, i64 0), i32 %1)
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@blob_panic.zErrMsg = internal constant [15 x i8] c"out of memory\0A\00"
@stderr = global i32 0
define void @blob_panic() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @blob_panic.zErrMsg, i64 0, i64 0), i32 %1)
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ asprintf(char **, char *, void *);
const char *defaultPayloadStringify(void *payload) {
  char *retVal;
  asprintf(&retVal, "%p", payload);
  return retVal;
}


x86 assembly (clang, -O0):
<defaultPayloadStringify>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
lea    -0x10(%rbp),%rdi
lea    0xed5(%rip),%rsi
call   1030 <asprintf@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<defaultPayloadStringify>:
push   %rax
mov    %rdi,%rdx
lea    0xee5(%rip),%rsi
mov    %rsp,%rdi
call   1030 <asprintf@plt>
mov    (%rsp),%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%p\00"
define i8* @defaultPayloadStringify(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @asprintf(i8** %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i8*, i8** %3
ret i8* %6
}

LLVM IR (-O2):
@.str = [3 x i8] c"%p\00"
define i8* @defaultPayloadStringify(i8* %0) {
%2 = alloca i8*
%3 = bitcast i8** %2 to i8*
%4 = call i32 @asprintf(i8** %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = load i8*, i8** %2
ret i8* %5
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_SET;
int fgetc(int /*<<< orphan*/ *);
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, size_t, int /*<<< orphan*/);
size_t ftell(int /*<<< orphan*/ *);
int read_char(FILE *fp, size_t *index) {
  fseek(fp, *index, SEEK_SET);
  int c = fgetc(fp);
  *index = ftell(fp);
  return c;
}


x86 assembly (clang, -O0):
<read_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
mov    0x2e8e(%rip),%rax
mov    (%rax),%edx
call   1050 <fseek@plt>
mov    -0x8(%rbp),%rdi
call   1030 <fgetc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <ftell@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_char>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
mov    (%rsi),%rsi
mov    0x2e9c(%rip),%rax
mov    (%rax),%edx
call   1050 <fseek@plt>
mov    %rbx,%rdi
call   1030 <fgetc@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1040 <ftell@plt>
mov    %rax,(%r14)
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@SEEK_SET = global i32 0
define i32 @read_char(i32* %0, i64* %1) {
%3 = alloca i32*
%4 = alloca i64*
%5 = alloca i32
store i32* %0, i32** %3
store i64* %1, i64** %4
%6 = load i32*, i32** %3
%7 = load i64*, i64** %4
%8 = load i64, i64* %7
%9 = load i32, i32* @SEEK_SET
%10 = call i32 @fseek(i32* %6, i64 %8, i32 %9)
%11 = load i32*, i32** %3
%12 = call i32 @fgetc(i32* %11)
store i32 %12, i32* %5
%13 = load i32*, i32** %3
%14 = call i64 @ftell(i32* %13)
%15 = load i64*, i64** %4
store i64 %14, i64* %15
%16 = load i32, i32* %5
ret i32 %16
}

LLVM IR (-O2):
@SEEK_SET = global i32 0
define i32 @read_char(i32* nocapture %0, i64* nocapture %1) {
%3 = load i64, i64* %1
%4 = load i32, i32* @SEEK_SET
%5 = tail call i32 @fseek(i32* %0, i64 %3, i32 %4)
%6 = tail call i32 @fgetc(i32* %0)
%7 = tail call i64 @ftell(i32* %0)
store i64 %7, i64* %1
ret i32 %6
}
/* Type definitions */
struct libipc_conn {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ conn_cleanup(struct libipc_conn *);
int /*<<< orphan*/ free(struct libipc_conn *);
void conn_free(struct libipc_conn *conn) {
  if (conn) {
    conn_cleanup(conn);
    free(conn);
  }
}


x86 assembly (clang, -O0):
<conn_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1149 <conn_free+0x29>
mov    -0x8(%rbp),%rdi
call   1030 <conn_cleanup@plt>
mov    -0x8(%rbp),%rdi
call   1040 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<conn_free>:
test   %rdi,%rdi
je     1137 <conn_free+0x17>
push   %rbx
mov    %rdi,%rbx
call   1030 <conn_cleanup@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <free@plt>
ret

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

LLVM IR (-O2):
%struct.libipc_conn = type { i32 }
define void @conn_free(%struct.libipc_conn* %0) {
%2 = icmp eq %struct.libipc_conn* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i32 @conn_cleanup(%struct.libipc_conn* %0)
%5 = tail call i32 @free(%struct.libipc_conn* %0)
br label %6
6: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ xor_swap(int *, int *);
int main() {
  int a = 10, b = 15;
  printf("Before swapping: A = %d and B = %d\n", a, b);
  xor_swap(&a, &b);
  printf("After swapping: A = %d and B = %d\n", a, b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
movl   $0xf,-0xc(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
lea    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <xor_swap@plt>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0xa,0x4(%rsp)
movl   $0xf,(%rsp)
lea    0xec9(%rip),%rdi
mov    $0xa,%esi
mov    $0xf,%edx
call   1030 <printf@plt>
lea    0x4(%rsp),%rdi
mov    %rsp,%rsi
call   1040 <xor_swap@plt>
mov    0x4(%rsp),%esi
mov    (%rsp),%edx
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [36 x i8] c"Before swapping: A = %d and B = %d\0A\00"
@.str.1 = [35 x i8] c"After swapping: A = %d and B = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 10, i32* %2
store i32 15, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* %3
%6 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %5)
%7 = call i32 @xor_swap(i32* %2, i32* %3)
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0), i32 %8, i32 %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [36 x i8] c"Before swapping: A = %d and B = %d\0A\00"
@.str.1 = [35 x i8] c"After swapping: A = %d and B = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
store i32 10, i32* %1
%4 = bitcast i32* %2 to i8*
store i32 15, i32* %2
%5 = tail call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 10, i32 15)
%6 = call i32 @xor_swap(i32* %1, i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0), i32 %7, i32 %8)
ret i32 0
}
/* Variables and functions */
char *_eat_whitespace(char *s) {
  if (!s)
    return NULL;
  while (*s) {
    if (*s != ' ')
      break;
    s++;
  }
  return s;
}


x86 assembly (clang, -O0):
<_eat_whitespace>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1120 <_eat_whitespace+0x20>
movq   $0x0,-0x8(%rbp)
jmp    1160 <_eat_whitespace+0x60>
jmp    1125 <_eat_whitespace+0x25>
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1158 <_eat_whitespace+0x58>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
je     1147 <_eat_whitespace+0x47>
jmp    1158 <_eat_whitespace+0x58>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1125 <_eat_whitespace+0x25>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_eat_whitespace>:
test   %rdi,%rdi
je     111e <_eat_whitespace+0x1e>
add    $0xffffffffffffffff,%rdi
nopl   0x0(%rax)
lea    0x1(%rdi),%rax
cmpb   $0x20,0x1(%rdi)
mov    %rax,%rdi
je     1110 <_eat_whitespace+0x10>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i8* @_eat_whitespace(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = icmp ne i8* %4, null
br i1 %5, label %7, label %6
6: ; preds = %1
store i8* null, i8** %2
br label %23
7: ; preds = %1
br label %8
8: ; preds = %18, %7
%9 = load i8*, i8** %3
%10 = load i8, i8* %9
%11 = icmp ne i8 %10, 0
br i1 %11, label %12, label %21
12: ; preds = %8
%13 = load i8*, i8** %3
%14 = load i8, i8* %13
%15 = sext i8 %14 to i32
%16 = icmp ne i32 %15, 32
br i1 %16, label %17, label %18
17: ; preds = %12
br label %21
18: ; preds = %12
%19 = load i8*, i8** %3
%20 = getelementptr inbounds i8, i8* %19, i32 1
store i8* %20, i8** %3
br label %8
21: ; preds = %17, %8
%22 = load i8*, i8** %3
store i8* %22, i8** %2
br label %23
23: ; preds = %21, %6
%24 = load i8*, i8** %2
ret i8* %24
}

LLVM IR (-O2):
define i8* @_eat_whitespace(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %8, label %3
3: ; preds = %1, %3
%4 = phi i8* [ %7, %3 ], [ %0, %1 ]
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 32
%7 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %6, label %3, label %8
8: ; preds = %3, %1
%9 = phi i8* [ null, %1 ], [ %4, %3 ]
ret i8* %9
}
/* Variables and functions */
int /*<<< orphan*/ panic(char *, char *, int /*<<< orphan*/);
void int_14(void) { panic("Page Fault", "#PF", 0); }


x86 assembly (clang, -O0):
<int_14>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xee9(%rip),%rsi
xor    %edx,%edx
call   1030 <panic@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<int_14>:
lea    0xee9(%rip),%rdi
lea    0xeed(%rip),%rsi
xor    %edx,%edx
jmp    1030 <panic@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"Page Fault\00"
@.str.1 = [4 x i8] c"#PF\00"
define void @int_14() {
%1 = call i32 @panic(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 0)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"Page Fault\00"
@.str.1 = [4 x i8] c"#PF\00"
define void @int_14() {
%1 = tail call i32 @panic(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 0)
ret void
}
int get_lowbyte(int word) {
  unsigned short temp;
  temp = word & 0xff;
  return (int)temp;
}


x86 assembly (clang, -O0):
<get_lowbyte>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff,%eax
mov    %ax,-0x6(%rbp)
movzwl -0x6(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_lowbyte>:
movzbl %dil,%eax
ret

LLVM IR (-O0):
define i32 @get_lowbyte(i32 %0) {
%2 = alloca i32
%3 = alloca i16
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = and i32 %4, 255
%6 = trunc i32 %5 to i16
store i16 %6, i16* %3
%7 = load i16, i16* %3
%8 = zext i16 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @get_lowbyte(i32 %0) {
%2 = and i32 %0, 255
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ EV_KEY;
int /*<<< orphan*/ EV_SYN;
unsigned int SYN_REPORT;
int /*<<< orphan*/ send_event(int /*<<< orphan*/, unsigned int, int);
void output_char(unsigned int code) {
  send_event(EV_KEY, code, 1);
  send_event(EV_KEY, code, 0);
  send_event(EV_SYN, SYN_REPORT, 0);
}


x86 assembly (clang, -O0):
<output_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ebe(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%esi
mov    $0x1,%edx
call   1030 <send_event@plt>
mov    0x2ea8(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%esi
xor    %edx,%edx
call   1030 <send_event@plt>
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
mov    0x2e84(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <send_event@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<output_char>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
mov    0x2ec3(%rip),%r14
mov    (%r14),%edi
mov    %ebx,%esi
mov    $0x1,%edx
call   1030 <send_event@plt>
mov    (%r14),%edi
mov    %ebx,%esi
xor    %edx,%edx
call   1030 <send_event@plt>
mov    0x2eb1(%rip),%rax
mov    (%rax),%edi
mov    0x2e90(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <send_event@plt>

LLVM IR (-O0):
@EV_KEY = global i32 0
@EV_SYN = global i32 0
@SYN_REPORT = global i32 0
define void @output_char(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @EV_KEY
%4 = load i32, i32* %2
%5 = call i32 @send_event(i32 %3, i32 %4, i32 1)
%6 = load i32, i32* @EV_KEY
%7 = load i32, i32* %2
%8 = call i32 @send_event(i32 %6, i32 %7, i32 0)
%9 = load i32, i32* @EV_SYN
%10 = load i32, i32* @SYN_REPORT
%11 = call i32 @send_event(i32 %9, i32 %10, i32 0)
ret void
}

LLVM IR (-O2):
@EV_KEY = global i32 0
@EV_SYN = global i32 0
@SYN_REPORT = global i32 0
define void @output_char(i32 %0) {
%2 = load i32, i32* @EV_KEY
%3 = tail call i32 @send_event(i32 %2, i32 %0, i32 1)
%4 = load i32, i32* @EV_KEY
%5 = tail call i32 @send_event(i32 %4, i32 %0, i32 0)
%6 = load i32, i32* @EV_SYN
%7 = load i32, i32* @SYN_REPORT
%8 = tail call i32 @send_event(i32 %6, i32 %7, i32 0)
ret void
}
int exe$setdfprot(struct _fab *fab, void *err, void *suc) {
  printk("not implemented\n");
}


x86 assembly (clang, -O0):
<exe$setdfprot>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
lea    0xed5(%rip),%rdi
mov    $0x0,%al
call   1030 <printk@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exe$setdfprot>:
lea    0xee9(%rip),%rdi
xor    %eax,%eax
jmp    1030 <printk@plt>

LLVM IR (-O0):
%struct._fab = type opaque
@.str = [17 x i8] c"not implemented\0A\00"
define i32 @"exe$setdfprot"(%struct._fab* %0, i8* %1, i8* %2) {
%4 = alloca i32
%5 = alloca %struct._fab*
%6 = alloca i8*
%7 = alloca i8*
store %struct._fab* %0, %struct._fab** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
%8 = call i32 (i8*, ...) bitcast (i32 (...)* @printk to i32 (i8*, ...)*)(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%9 = load i32, i32* %4
ret i32 %9
}

LLVM IR (-O2):
%struct._fab = type opaque
@.str = [17 x i8] c"not implemented\0A\00"
define i32 @"exe$setdfprot"(%struct._fab* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2) {
%4 = tail call i32 (i8*, ...) bitcast (i32 (...)* @printk to i32 (i8*, ...)*)(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int errno;
int getErrno(void) { return errno; }


x86 assembly (clang, -O0):
<getErrno>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ed5(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getErrno>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%eax
ret

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

LLVM IR (-O2):
@errno = global i32 0
define i32 @getErrno() {
%1 = load i32, i32* @errno
ret i32 %1
}
/* Variables and functions */
int exact_square(int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int num1, done;
  scanf("%d", &num1);
  done = exact_square(num1);
  printf("\n%d", done);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xebb(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1040 <exact_square@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xe9c(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec9(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
call   1040 <exact_square@plt>
lea    0xeae(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"\0A%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
%6 = call i32 @exact_square(i32 %5)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"\0A%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @exact_square(i32 %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Variables and functions */
int EXIT_FAILURE;
int EXIT_SUCCESS;
int close(int);
int main(void) {
  if (close(42) != -1)
    return (EXIT_FAILURE);
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x2a,%edi
call   1030 <close@plt>
cmp    $0xffffffff,%eax
je     1143 <main+0x33>
mov    0x2ea7(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    114f <main+0x3f>
mov    0x2e8e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x2a,%edi
call   1030 <close@plt>
cmp    $0xffffffff,%eax
jne    1129 <main+0x19>
mov    0x2eb1(%rip),%rax
jmp    1130 <main+0x20>
mov    0x2eb0(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @close(i32 42)
%3 = icmp ne i32 %2, -1
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = load i32, i32* @EXIT_FAILURE
store i32 %5, i32* %1
br label %8
6: ; preds = %0
%7 = load i32, i32* @EXIT_SUCCESS
store i32 %7, i32* %1
br label %8
8: ; preds = %6, %4
%9 = load i32, i32* %1
ret i32 %9
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i32 @close(i32 42)
%2 = icmp eq i32 %1, -1
%3 = load i32, i32* @EXIT_SUCCESS
%4 = load i32, i32* @EXIT_FAILURE
%5 = select i1 %2, i32 %3, i32 %4
ret i32 %5
}
void Zip_Interrupt_CPU_Enable(void) { return; }


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

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

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

LLVM IR (-O2):
define void @Zip_Interrupt_CPU_Enable() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *prog) {
  fprintf(
      stderr,
      "usage: %s [-V] [-n] [-e] [-r[r]] [-f[f[f]]] [-v] [-a|-s subdb] dbpath\n",
      prog);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e8c(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [71 x i8] c"usage: %s [-V] [-n] [-e] [-r[r]] [-f[f[f]]] [-v] [-a|-s subdb] dbpath\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @EXIT_FAILURE
%7 = call i32 @exit(i32 %6)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [71 x i8] c"usage: %s [-V] [-n] [-e] [-r[r]] [-f[f[f]]] [-v] [-a|-s subdb] dbpath\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @exit(i32 %4)
unreachable
}
void gtk_widget_style_get() {}


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

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

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

LLVM IR (-O2):
define void @gtk_widget_style_get() {
ret void
}
int real2tp(int rk) { return (rk + (4 * 5000)) / 4 - 5000; }


x86 assembly (clang, -O0):
<real2tp>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x4e20,%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
sub    $0x1388,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<real2tp>:
lea    0x4e20(%rdi),%ecx
lea    0x4e23(%rdi),%eax
test   %ecx,%ecx
cmovns %ecx,%eax
sar    $0x2,%eax
add    $0xffffec78,%eax
ret

LLVM IR (-O0):
define i32 @real2tp(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 20000
%5 = sdiv i32 %4, 4
%6 = sub nsw i32 %5, 5000
ret i32 %6
}

LLVM IR (-O2):
define i32 @real2tp(i32 %0) {
%2 = add nsw i32 %0, 20000
%3 = sdiv i32 %2, 4
%4 = add nsw i32 %3, -5000
ret i32 %4
}
unsigned rotate_right(unsigned x, int n) {
  int z_mask = -!n;
  unsigned right = x >> n;
  unsigned left = x << ((sizeof(unsigned) << 3) - n);
  return (z_mask & x) | (~z_mask & (left | right));
}


x86 assembly (clang, -O0):
<rotate_right>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shr    %cl,%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
movslq -0x8(%rbp),%rdx
mov    $0x20,%ecx
sub    %rdx,%rcx
shl    %cl,%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
and    -0x4(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
mov    -0x14(%rbp),%edx
or     -0x10(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rotate_right>:
mov    %esi,%ecx
mov    %edi,%eax
ror    %cl,%eax
ret

LLVM IR (-O0):
define i32 @rotate_right(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%8 = load i32, i32* %4
%9 = icmp ne i32 %8, 0
%10 = xor i1 %9, true
%11 = zext i1 %10 to i32
%12 = sub nsw i32 0, %11
store i32 %12, i32* %5
%13 = load i32, i32* %3
%14 = load i32, i32* %4
%15 = lshr i32 %13, %14
store i32 %15, i32* %6
%16 = load i32, i32* %3
%17 = load i32, i32* %4
%18 = sext i32 %17 to i64
%19 = sub i64 32, %18
%20 = trunc i64 %19 to i32
%21 = shl i32 %16, %20
store i32 %21, i32* %7
%22 = load i32, i32* %5
%23 = load i32, i32* %3
%24 = and i32 %22, %23
%25 = load i32, i32* %5
%26 = xor i32 %25, -1
%27 = load i32, i32* %7
%28 = load i32, i32* %6
%29 = or i32 %27, %28
%30 = and i32 %26, %29
%31 = or i32 %24, %30
ret i32 %31
}

LLVM IR (-O2):
define i32 @rotate_right(i32 %0, i32 %1) {
%3 = tail call i32 @llvm.fshr.i32(i32 %0, i32 %0, i32 %1)
ret i32 %3
}
const char *cfg_file_find(void) { return "/etc/usbwall.cfg"; }


x86 assembly (clang, -O0):
<cfg_file_find>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cfg_file_find>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [17 x i8] c"/etc/usbwall.cfg\00"
define i8* @cfg_file_find() {
ret i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [17 x i8] c"/etc/usbwall.cfg\00"
define i8* @cfg_file_find() {
ret i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0)
}
int aa() { return (1); }


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

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

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

LLVM IR (-O2):
define i32 @aa() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ doSleep();
int /*<<< orphan*/ doTick();
void loop() {
  while (1) {
    doTick();
    for (unsigned char i = 0; i < 1; i++)
      doSleep();
  }
}


x86 assembly (clang, -O0):
<loop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <doTick@plt>
movb   $0x0,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
cmp    $0x1,%eax
jge    1154 <loop+0x34>
mov    $0x0,%al
call   1040 <doSleep@plt>
mov    -0x1(%rbp),%al
add    $0x1,%al
mov    %al,-0x1(%rbp)
jmp    1133 <loop+0x13>
jmp    1128 <loop+0x8>

x86 assembly (clang, -O2):
<loop>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <doTick@plt>
xor    %eax,%eax
call   1040 <doSleep@plt>
jmp    1130 <loop+0x10>

LLVM IR (-O0):
define void @loop() {
%1 = alloca i8
br label %2
2: ; preds = %0, %13
%3 = call i32 (...) @doTick()
store i8 0, i8* %1
br label %4
4: ; preds = %10, %2
%5 = load i8, i8* %1
%6 = zext i8 %5 to i32
%7 = icmp slt i32 %6, 1
br i1 %7, label %8, label %13
8: ; preds = %4
%9 = call i32 (...) @doSleep()
br label %10
10: ; preds = %8
%11 = load i8, i8* %1
%12 = add i8 %11, 1
store i8 %12, i8* %1
br label %4
13: ; preds = %4
br label %2
}

LLVM IR (-O2):
define void @loop() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 (...) @doTick()
%3 = tail call i32 (...) @doSleep()
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ wNotYet(char *);
int /*<<< orphan*/ wPushNumber(int /*<<< orphan*/);
void wBasRun() {
  wNotYet("Run");
  wPushNumber(0);
}


x86 assembly (clang, -O0):
<wBasRun>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <wNotYet@plt>
xor    %edi,%edi
call   1030 <wPushNumber@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<wBasRun>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <wNotYet@plt>
xor    %edi,%edi
pop    %rax
jmp    1030 <wPushNumber@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"Run\00"
define void @wBasRun() {
%1 = tail call i32 @wNotYet(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @wPushNumber(i32 0)
ret void
}
int index_2d(int a, int b, int length2) { return b + length2 * (a); }


x86 assembly (clang, -O0):
<index_2d>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
imul   -0x4(%rbp),%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<index_2d>:
imul   %edx,%edi
lea    (%rdi,%rsi,1),%eax
ret

LLVM IR (-O0):
define i32 @index_2d(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %5
%8 = load i32, i32* %6
%9 = load i32, i32* %4
%10 = mul nsw i32 %8, %9
%11 = add nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @index_2d(i32 %0, i32 %1, i32 %2) {
%4 = mul nsw i32 %2, %0
%5 = add nsw i32 %4, %1
ret i32 %5
}
int function_w() { return 4; }


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

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

LLVM IR (-O0):
define i32 @function_w() {
ret i32 4
}

LLVM IR (-O2):
define i32 @function_w() {
ret i32 4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ get_port(int /*<<< orphan*/, int, int);
uint8_t io_get_interrupt_defaults(uint8_t port) {
  return get_port(port, 0x06, 0x07);
}


x86 assembly (clang, -O0):
<io_get_interrupt_defaults>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x6,%esi
mov    $0x7,%edx
call   1030 <get_port@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<io_get_interrupt_defaults>:
mov    $0x6,%esi
mov    $0x7,%edx
jmp    1030 <get_port@plt>

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

LLVM IR (-O2):
define i32 @io_get_interrupt_defaults(i32 %0) {
%2 = tail call i32 @get_port(i32 %0, i32 6, i32 7)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ USBFS_ReInitComponent();
void USBFS_BUS_RESET_ISR(void) {
  do {
  } while (0);
  USBFS_ReInitComponent();
}


x86 assembly (clang, -O0):
<USBFS_BUS_RESET_ISR>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <USBFS_BUS_RESET_ISR+0x9>
jmp    111e <USBFS_BUS_RESET_ISR+0xe>
mov    $0x0,%al
call   1030 <USBFS_ReInitComponent@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @USBFS_BUS_RESET_ISR() {
br label %1
1: ; preds = %0
br label %2
2: ; preds = %1
%3 = call i32 (...) @USBFS_ReInitComponent()
ret void
}

LLVM IR (-O2):
define void @USBFS_BUS_RESET_ISR() {
%1 = tail call i32 (...) @USBFS_ReInitComponent()
ret void
}
int get_ssi_clk_src(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @get_ssi_clk_src() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ iscntrl(int);
void t_iscntrl_0xe1() {
  Assert_real((iscntrl(225) == 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_iscntrl.c",
              1130, ("iscntrl should be 0 for 0xe1"));
}


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

x86 assembly (clang, -O2):
<t_iscntrl_0xe1>:
push   %rax
mov    $0xe1,%edi
call   1030 <iscntrl@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x46a,%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_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 0 for 0xe1\00"
define void @t_iscntrl_0xe1() {
%1 = call i64 @iscntrl(i32 225)
%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 1130, 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_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 0 for 0xe1\00"
define void @t_iscntrl_0xe1() {
%1 = tail call i64 @iscntrl(i32 225)
%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 1130, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void clear() { printf("\e[H\e[2J"); }


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

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

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

LLVM IR (-O2):
@.str = [8 x i8] c"\1B[H\1B[2J\00"
define void @clear() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct crk5_exl_tim {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct crk5_exl_tim *);
void crk5_exl_tim_delete(struct crk5_exl_tim *exl) {
  if (!exl)
    return;
  free(exl);
}


x86 assembly (clang, -O0):
<crk5_exl_tim_delete>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    112c <crk5_exl_tim_delete+0x1c>
jmp    1135 <crk5_exl_tim_delete+0x25>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<crk5_exl_tim_delete>:
test   %rdi,%rdi
je     111a <crk5_exl_tim_delete+0xa>
jmp    1030 <free@plt>
ret

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

LLVM IR (-O2):
%struct.crk5_exl_tim = type { i32 }
define void @crk5_exl_tim_delete(%struct.crk5_exl_tim* %0) {
%2 = icmp eq %struct.crk5_exl_tim* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(%struct.crk5_exl_tim* %0)
br label %5
5: ; preds = %1, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ c40_putchar(char);
void putstr(char *buf) {
  int i;
  for (i = 0; buf[i] != '\0'; i++)
    c40_putchar(buf[i]);
}


x86 assembly (clang, -O0):
<putstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1157 <putstr+0x47>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <c40_putchar@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <putstr+0x13>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @putstr(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %8, %4 ], [ 0, %1 ]
%6 = phi i8 [ %10, %4 ], [ %2, %1 ]
%7 = tail call i32 @c40_putchar(i8 signext %6)
%8 = add nuw i64 %5, 1
%9 = getelementptr inbounds i8, i8* %0, i64 %8
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
ret void
}
/* Type definitions */
struct sockaddr {
  int dummy;
};
typedef int /*<<< orphan*/ socklen_t;

/* Variables and functions */
int recvfrom(int, void *, size_t, int, struct sockaddr *, int /*<<< orphan*/ *);
int plat_recvfrom(int s, void *buf, size_t len, int flags,
                  struct sockaddr *from, socklen_t *fromlen) {
  return (recvfrom(s, buf, len, flags, from, fromlen));
}


x86 assembly (clang, -O0):
<plat_recvfrom>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%r9
call   1030 <recvfrom@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<plat_recvfrom>:
jmp    1030 <recvfrom@plt>

LLVM IR (-O0):
%struct.sockaddr = type { i32 }
define i32 @plat_recvfrom(i32 %0, i8* %1, i64 %2, i32 %3, %struct.sockaddr* %4, i32* %5) {
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i64
%10 = alloca i32
%11 = alloca %struct.sockaddr*
%12 = alloca i32*
store i32 %0, i32* %7
store i8* %1, i8** %8
store i64 %2, i64* %9
store i32 %3, i32* %10
store %struct.sockaddr* %4, %struct.sockaddr** %11
store i32* %5, i32** %12
%13 = load i32, i32* %7
%14 = load i8*, i8** %8
%15 = load i64, i64* %9
%16 = load i32, i32* %10
%17 = load %struct.sockaddr*, %struct.sockaddr** %11
%18 = load i32*, i32** %12
%19 = call i32 @recvfrom(i32 %13, i8* %14, i64 %15, i32 %16, %struct.sockaddr* %17, i32* %18)
ret i32 %19
}

LLVM IR (-O2):
%struct.sockaddr = type { i32 }
define i32 @plat_recvfrom(i32 %0, i8* %1, i64 %2, i32 %3, %struct.sockaddr* %4, i32* %5) {
%7 = tail call i32 @recvfrom(i32 %0, i8* %1, i64 %2, i32 %3, %struct.sockaddr* %4, i32* %5)
ret i32 %7
}
/* Variables and functions */
float cos(float);
float cosf(float angle) { return cos(angle); }


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

x86 assembly (clang, -O2):
<cosf>:
jmp    1030 <cos@plt>

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

LLVM IR (-O2):
define float @cosf(float %0) {
%2 = tail call float @cos(float %0)
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int display_introduction(void) {
  printf("Programming Assignment 2 - Modular Equation Evaluator\n\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [56 x i8] c"Programming Assignment 2 - Modular Equation Evaluator\0A\0A\00"
define i32 @display_introduction() {
%1 = call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [55 x i8] c"Programming Assignment 2 - Modular Equation Evaluator\0A\00"
define i32 @display_introduction() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @str, i64 0, i64 0))
ret i32 0
}