xunge/DecIR huggingface dataset:
void lockd_free_vg_final(struct cmd_context *cmd, struct volume_group *vg) {
  return;
}


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

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

LLVM IR (-O0):
%struct.cmd_context = type opaque
%struct.volume_group = type opaque
define void @lockd_free_vg_final(%struct.cmd_context* %0, %struct.volume_group* %1) {
%3 = alloca %struct.cmd_context*
%4 = alloca %struct.volume_group*
store %struct.cmd_context* %0, %struct.cmd_context** %3
store %struct.volume_group* %1, %struct.volume_group** %4
ret void
}

LLVM IR (-O2):
%struct.cmd_context = type opaque
%struct.volume_group = type opaque
define void @lockd_free_vg_final(%struct.cmd_context* nocapture %0, %struct.volume_group* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(float *);
scalar_t__ malloc(int);
scalar_t__ realloc(float *, int);
void common_realloc_leak2() {
  float *p, *q;
  p = (float *)malloc(sizeof(float));
  q = (float *)realloc(p, sizeof(float) * 42);
  if (q != NULL)
    free(q);
}


x86 assembly (clang, -O0):
<common_realloc_leak2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0xa8,%esi
call   1050 <realloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     116c <common_realloc_leak2+0x3c>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<common_realloc_leak2>:
push   %rax
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,%rdi
mov    $0xa8,%esi
call   1050 <realloc@plt>
test   %rax,%rax
je     1156 <common_realloc_leak2+0x26>
mov    %rax,%rdi
pop    %rax
jmp    1030 <free@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @common_realloc_leak2() {
%1 = alloca float*
%2 = alloca float*
%3 = call i64 @malloc(i32 4)
%4 = inttoptr i64 %3 to float*
store float* %4, float** %1
%5 = load float*, float** %1
%6 = call i64 @realloc(float* %5, i32 168)
%7 = inttoptr i64 %6 to float*
store float* %7, float** %2
%8 = load float*, float** %2
%9 = icmp ne float* %8, null
br i1 %9, label %10, label %13
10: ; preds = %0
%11 = load float*, float** %2
%12 = call i32 @free(float* %11)
br label %13
13: ; preds = %10, %0
ret void
}

LLVM IR (-O2):
define void @common_realloc_leak2() {
%1 = tail call i64 @malloc(i32 4)
%2 = inttoptr i64 %1 to float*
%3 = tail call i64 @realloc(float* %2, i32 168)
%4 = icmp eq i64 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %0
%6 = inttoptr i64 %3 to float*
%7 = tail call i32 @free(float* %6)
br label %8
8: ; preds = %5, %0
ret void
}
/* Variables and functions */
double scalbn(double, int);
double test7(double x, int exp) { return scalbn(x, exp); }


x86 assembly (clang, -O0):
<test7>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0xc(%rbp),%edi
call   1030 <scalbn@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test7>:
jmp    1030 <scalbn@plt>

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

LLVM IR (-O2):
define double @test7(double %0, i32 %1) {
%3 = tail call double @scalbn(double %0, i32 %1)
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int, int);
int /*<<< orphan*/ system(char *);
void Focus(int focuscmd, int focusspd) {
  char cmdstr[256];
  sprintf(cmdstr, "setfocus %d %d", focuscmd, focusspd);
  system(cmdstr);
}


x86 assembly (clang, -O0):
<Focus>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
lea    -0x110(%rbp),%rdi
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%ecx
lea    0xebb(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x110(%rbp),%rdi
call   1030 <system@plt>
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Focus>:
push   %rbx
sub    $0x100,%rsp
mov    %esi,%ecx
mov    %edi,%edx
lea    0xecd(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <system@plt>
add    $0x100,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [15 x i8] c"setfocus %d %d\00"
define void @Focus(i32 %0, i32 %1) {
%3 = alloca [256 x i8]
%4 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%5 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
%6 = call i32 @system(i8* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_eval(int /*<<< orphan*/);
scalar_t__ isgraph(char);
int /*<<< orphan*/ isprint(int);
void test_isgraph_isprint(int x) {
  char y = x;
  if (isgraph(y))
    clang_analyzer_eval(isprint(x));
}


x86 assembly (clang, -O0):
<test_isgraph_isprint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%edi
call   1050 <isgraph@plt>
cmp    $0x0,%rax
je     1163 <test_isgraph_isprint+0x33>
mov    -0x4(%rbp),%edi
call   1030 <isprint@plt>
mov    %eax,%edi
call   1040 <clang_analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_isgraph_isprint>:
push   %rbx
mov    %edi,%ebx
movsbl %bl,%edi
call   1050 <isgraph@plt>
test   %rax,%rax
je     114f <test_isgraph_isprint+0x1f>
mov    %ebx,%edi
call   1030 <isprint@plt>
mov    %eax,%edi
pop    %rbx
jmp    1040 <clang_analyzer_eval@plt>
pop    %rbx
ret

LLVM IR (-O0):
define void @test_isgraph_isprint(i32 %0) {
%2 = alloca i32
%3 = alloca i8
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = trunc i32 %4 to i8
store i8 %5, i8* %3
%6 = load i8, i8* %3
%7 = call i64 @isgraph(i8 signext %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %1
%10 = load i32, i32* %2
%11 = call i32 @isprint(i32 %10)
%12 = call i32 @clang_analyzer_eval(i32 %11)
br label %13
13: ; preds = %9, %1
ret void
}

LLVM IR (-O2):
define void @test_isgraph_isprint(i32 %0) {
%2 = trunc i32 %0 to i8
%3 = tail call i64 @isgraph(i8 signext %2)
%4 = icmp eq i64 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = tail call i32 @isprint(i32 %0)
%7 = tail call i32 @clang_analyzer_eval(i32 %6)
br label %8
8: ; preds = %5, %1
ret void
}
/* Variables and functions */
unsigned short vx86_NBSB_Read16(int, unsigned char);
unsigned short sb1_Read16(unsigned char offset) {
  return vx86_NBSB_Read16(3, offset);
}


x86 assembly (clang, -O0):
<sb1_Read16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x3,%edi
movzbl -0x1(%rbp),%esi
call   1030 <vx86_NBSB_Read16@plt>
movzwl %ax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sb1_Read16>:
mov    %edi,%esi
mov    $0x3,%edi
jmp    1030 <vx86_NBSB_Read16@plt>

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

LLVM IR (-O2):
define zeroext i16 @sb1_Read16(i8 zeroext %0) {
%2 = tail call zeroext i16 @vx86_NBSB_Read16(i32 3, i8 zeroext %0)
ret i16 %2
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
int infoBeacons() {
  system("./ibeacon_scan.sh");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [18 x i8] c"./ibeacon_scan.sh\00"
define i32 @infoBeacons() {
%1 = call i32 @system(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [18 x i8] c"./ibeacon_scan.sh\00"
define i32 @infoBeacons() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ LOG_ERR;
int /*<<< orphan*/ errno;
int /*<<< orphan*/ report(int /*<<< orphan*/, char *, int /*<<< orphan*/);
int /*<<< orphan*/ strerror(int /*<<< orphan*/);
void log_fork(void) { report(LOG_ERR, "Error in fork(): %s", strerror(errno)); }


x86 assembly (clang, -O0):
<log_fork>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ea1(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
call   1040 <strerror@plt>
mov    -0x4(%rbp),%edi
mov    %eax,%edx
lea    0xeb2(%rip),%rsi
call   1030 <report@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log_fork>:
push   %rbx
mov    0x2ea8(%rip),%rax
mov    (%rax),%ebx
mov    0x2eaf(%rip),%rax
mov    (%rax),%edi
call   1040 <strerror@plt>
lea    0xec1(%rip),%rsi
mov    %ebx,%edi
mov    %eax,%edx
pop    %rbx
jmp    1030 <report@plt>

LLVM IR (-O0):
@LOG_ERR = global i32 0
@.str = [20 x i8] c"Error in fork(): %s\00"
@errno = global i32 0
define void @log_fork() {
%1 = load i32, i32* @LOG_ERR
%2 = load i32, i32* @errno
%3 = call i32 @strerror(i32 %2)
%4 = call i32 @report(i32 %1, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@LOG_ERR = global i32 0
@.str = [20 x i8] c"Error in fork(): %s\00"
@errno = global i32 0
define void @log_fork() {
%1 = load i32, i32* @LOG_ERR
%2 = load i32, i32* @errno
%3 = tail call i32 @strerror(i32 %2)
%4 = tail call i32 @report(i32 %1, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}
/* Variables and functions */
char *realloc(char *, size_t);
size_t strlen(char *);
int /*<<< orphan*/ strncat(char *, char *, size_t);
char *lake_str_append(char *s1, char *s2) {
  size_t n2 = strlen(s2);
  s1 = realloc(s1, strlen(s1) + n2 + 1);
  strncat(s1, s2, n2);
  return s1;
}


x86 assembly (clang, -O0):
<lake_str_append>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x20(%rbp),%rdi
mov    %rax,%rsi
add    -0x18(%rbp),%rsi
add    $0x1,%rsi
call   1050 <realloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <strncat@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lake_str_append>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    %rax,%r15
mov    %rbx,%rdi
call   1030 <strlen@plt>
lea    (%r15,%rax,1),%rsi
add    $0x1,%rsi
mov    %rbx,%rdi
call   1050 <realloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1040 <strncat@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @lake_str_append(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = call i64 @strlen(i8* %6)
store i64 %7, i64* %5
%8 = load i8*, i8** %3
%9 = load i8*, i8** %3
%10 = call i64 @strlen(i8* %9)
%11 = load i64, i64* %5
%12 = add i64 %10, %11
%13 = add i64 %12, 1
%14 = call i8* @realloc(i8* %8, i64 %13)
store i8* %14, i8** %3
%15 = load i8*, i8** %3
%16 = load i8*, i8** %4
%17 = load i64, i64* %5
%18 = call i32 @strncat(i8* %15, i8* %16, i64 %17)
%19 = load i8*, i8** %3
ret i8* %19
}

LLVM IR (-O2):
define i8* @lake_str_append(i8* nocapture %0, i8* %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%4 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%5 = add i64 %3, 1
%6 = add i64 %5, %4
%7 = tail call i8* @realloc(i8* %0, i64 %6)
%8 = tail call i32 @strncat(i8* %7, i8* %1, i64 %3)
ret i8* %7
}
/* Variables and functions */
void *malloc(size_t);
void *xmalloc_fatal(size_t);
void *xmalloc(size_t size) {
  void *ptr = malloc(size);
  if (ptr == NULL) {
    return xmalloc_fatal(size);
  }
  return ptr;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1156 <xmalloc+0x36>
mov    -0x10(%rbp),%rdi
call   1040 <xmalloc_fatal@plt>
mov    %rax,-0x8(%rbp)
jmp    115e <xmalloc+0x3e>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %rbx
mov    %rdi,%rbx
call   1030 <malloc@plt>
test   %rax,%rax
je     1130 <xmalloc+0x10>
pop    %rbx
ret
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <xmalloc_fatal@plt>

LLVM IR (-O0):
define i8* @xmalloc(i64 %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = alloca i8*
store i64 %0, i64* %3
%5 = load i64, i64* %3
%6 = call i8* @malloc(i64 %5)
store i8* %6, i8** %4
%7 = load i8*, i8** %4
%8 = icmp eq i8* %7, null
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = load i64, i64* %3
%11 = call i8* @xmalloc_fatal(i64 %10)
store i8* %11, i8** %2
br label %14
12: ; preds = %1
%13 = load i8*, i8** %4
store i8* %13, i8** %2
br label %14
14: ; preds = %12, %9
%15 = load i8*, i8** %2
ret i8* %15
}

LLVM IR (-O2):
define i8* @xmalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i8* @xmalloc_fatal(i64 %0)
br label %6
6: ; preds = %1, %4
%7 = phi i8* [ %5, %4 ], [ %2, %1 ]
ret i8* %7
}
/* Variables and functions */
unsigned long htonl(unsigned long);
int /*<<< orphan*/ write(int, unsigned long *, int);
void emit_4(unsigned long val) {
  val = htonl(val);
  write(1, &val, 4);
}


x86 assembly (clang, -O0):
<emit_4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <htonl@plt>
mov    %rax,-0x8(%rbp)
mov    $0x1,%edi
lea    -0x8(%rbp),%rsi
mov    $0x4,%edx
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<emit_4>:
push   %rax
call   1040 <htonl@plt>
mov    %rax,(%rsp)
mov    %rsp,%rsi
mov    $0x1,%edi
mov    $0x4,%edx
call   1030 <write@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @emit_4(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i64 @htonl(i64 %3)
store i64 %4, i64* %2
%5 = call i32 @write(i32 1, i64* %2, i32 4)
ret void
}

LLVM IR (-O2):
define void @emit_4(i64 %0) {
%2 = alloca i64
%3 = tail call i64 @htonl(i64 %0)
store i64 %3, i64* %2
%4 = call i32 @write(i32 1, i64* %2, i32 4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ funb();
int /*<<< orphan*/ printf(char *);
void funa() {
  printf("funa\n");
  funb();
  return;
}


x86 assembly (clang, -O0):
<funa>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <funb@plt>
pop    %rbp
ret

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

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

LLVM IR (-O2):
@str = [5 x i8] c"funa\00"
define void @funa() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @funb()
ret void
}
/* Variables and functions */
int atoi(char *);
int /*<<< orphan*/ markovChain(int, int, int, int);
int main(int argc, char **argv) {
  int n_side;
  int Tsteps;
  int n_steps;
  int numT;
  n_side = atoi(argv[1]);
  n_steps = n_side * n_side * 10;
  for (numT = 1; numT < Tsteps; numT++) {
    markovChain(numT + 1, n_side, n_steps, numT);
  }
  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)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
imul   -0x14(%rbp),%eax
imul   $0xa,%eax,%eax
mov    %eax,-0x1c(%rbp)
movl   $0x1,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    1188 <main+0x68>
mov    -0x20(%rbp),%edi
add    $0x1,%edi
mov    -0x14(%rbp),%esi
mov    -0x1c(%rbp),%edx
mov    -0x20(%rbp),%ecx
call   1040 <markovChain@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    115a <main+0x3a>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int bmm050_compensate_Y(short, unsigned short);
signed int bmm050_compensate_Y_s32(signed short mdata_y,
                                   unsigned short data_R) {
  signed int retval;
  retval = bmm050_compensate_Y(mdata_y, data_R);
  if (retval == -32768) {
    retval = ((signed int)(-2147483647 - 1));
  }
  return retval;
}


x86 assembly (clang, -O0):
<bmm050_compensate_Y_s32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
mov    -0x2(%rbp),%ax
movswl %ax,%edi
movzwl -0x4(%rbp),%esi
call   1030 <bmm050_compensate_Y@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0xffff8000,-0x8(%rbp)
jne    114d <bmm050_compensate_Y_s32+0x3d>
movl   $0x80000000,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bmm050_compensate_Y_s32>:
push   %rax
call   1030 <bmm050_compensate_Y@plt>
cmp    $0xffff8000,%eax
mov    $0x80000000,%ecx
cmove  %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @bmm050_compensate_Y_s32(i16 signext %0, i16 zeroext %1) {
%3 = alloca i16
%4 = alloca i16
%5 = alloca i32
store i16 %0, i16* %3
store i16 %1, i16* %4
%6 = load i16, i16* %3
%7 = load i16, i16* %4
%8 = call i32 @bmm050_compensate_Y(i16 signext %6, i16 zeroext %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = icmp eq i32 %9, -32768
br i1 %10, label %11, label %12
11: ; preds = %2
store i32 -2147483648, i32* %5
br label %12
12: ; preds = %11, %2
%13 = load i32, i32* %5
ret i32 %13
}

LLVM IR (-O2):
define i32 @bmm050_compensate_Y_s32(i16 signext %0, i16 zeroext %1) {
%3 = tail call i32 @bmm050_compensate_Y(i16 signext %0, i16 zeroext %1)
%4 = icmp eq i32 %3, -32768
%5 = select i1 %4, i32 -2147483648, i32 %3
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ foo();
void bar(int a) {
  if (a == 16 || a == 23)
    foo();
  if (a == -110 || a == -128)
    foo();
}


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
je     112f <bar+0x1f>
cmpl   $0x17,-0x4(%rbp)
jne    1136 <bar+0x26>
mov    $0x0,%al
call   1030 <foo@plt>
cmpl   $0xffffff92,-0x4(%rbp)
je     114a <bar+0x3a>
cmpl   $0xffffff80,-0x4(%rbp)
jne    1151 <bar+0x41>
mov    $0x0,%al
call   1030 <foo@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
cmp    $0xf,%edi
jg     1121 <bar+0x11>
cmp    $0xffffff80,%edi
je     112b <bar+0x1b>
cmp    $0xffffff92,%edi
je     112b <bar+0x1b>
jmp    1132 <bar+0x22>
cmp    $0x17,%edi
je     112b <bar+0x1b>
cmp    $0x10,%edi
jne    1132 <bar+0x22>
xor    %eax,%eax
jmp    1030 <foo@plt>
ret

LLVM IR (-O0):
define void @bar(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 16
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 23
br i1 %7, label %8, label %10
8: ; preds = %5, %1
%9 = call i32 (...) @foo()
br label %10
10: ; preds = %8, %5
%11 = load i32, i32* %2
%12 = icmp eq i32 %11, -110
br i1 %12, label %16, label %13
13: ; preds = %10
%14 = load i32, i32* %2
%15 = icmp eq i32 %14, -128
br i1 %15, label %16, label %18
16: ; preds = %13, %10
%17 = call i32 (...) @foo()
br label %18
18: ; preds = %16, %13
ret void
}

LLVM IR (-O2):
define void @bar(i32 %0) {
switch i32 %0, label %4 [
i32 23, label %2
i32 16, label %2
i32 -110, label %2
i32 -128, label %2
]
2: ; preds = %1, %1, %1, %1
%3 = tail call i32 (...) @foo()
br label %4
4: ; preds = %2, %1
ret void
}
const char *db_list_users_report_sql(void) {
  static const char *query = "SELECT"
                             "  id AS 'User ID',"
                             "  user_name AS 'Username',"
                             "  first_name AS 'First Name',"
                             "  last_name AS 'Last Name',"
                             "  CASE enabled"
                             "    WHEN TRUE"
                             "      THEN 'Yes'"
                             "    WHEN FALSE"
                             "      THEN 'No'"
                             "    ELSE 'Unknown'"
                             "  END"
                             "    AS 'Enabled?'"
                             "  FROM users"
                             "  ORDER BY id";
  return query;
}


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

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

LLVM IR (-O0):
@db_list_users_report_sql.query = internal global i8* getelementptr inbounds ([244 x i8], [244 x i8]* @.str, i32 0, i32 0)
@.str = [244 x i8] c"SELECT id AS 'User ID', user_name AS 'Username', first_name AS 'First Name', last_name AS 'Last Name', CASE enabled WHEN TRUE THEN 'Yes' WHEN FALSE THEN 'No' ELSE 'Unknown' END AS 'Enabled?' FROM users ORDER BY id\00"
define i8* @db_list_users_report_sql() {
%1 = load i8*, i8** @db_list_users_report_sql.query
ret i8* %1
}

LLVM IR (-O2):
@.str = [244 x i8] c"SELECT id AS 'User ID', user_name AS 'Username', first_name AS 'First Name', last_name AS 'Last Name', CASE enabled WHEN TRUE THEN 'Yes' WHEN FALSE THEN 'No' ELSE 'Unknown' END AS 'Enabled?' FROM users ORDER BY id\00"
define i8* @db_list_users_report_sql() {
ret i8* getelementptr inbounds ([244 x i8], [244 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ auth_db_close();
void destroy(void) { auth_db_close(); }


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

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

LLVM IR (-O0):
define void @destroy() {
%1 = call i32 (...) @auth_db_close()
ret void
}

LLVM IR (-O2):
define void @destroy() {
%1 = tail call i32 (...) @auth_db_close()
ret void
}
void f() {
  struct A {
    struct B {
      int a;
      float b;
    };
  };
  struct {
    struct {
      int foo;
      int bar;
    };
  };
  struct {
    int a;
    struct {
      struct {
        int x;
        int y;
      };
      float c;
    };
    float b;
  };
}


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

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

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

LLVM IR (-O2):
define void @f() {
ret void
}
/* Variables and functions */
char *mem_begin(char *);
char *str_insert(char *, char *);
size_t str_len(char *);
char *str_append(char *dst, char *src) {
  char *str = NULL;
  char *dst_begin = mem_begin(dst);
  size_t len_dst = str_len(dst_begin);
  char *dst_end = dst_begin + len_dst;
  str = str_insert(dst_end, src);
  return (str);
}


x86 assembly (clang, -O0):
<str_append>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <mem_begin@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
call   1050 <str_len@plt>
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
add    -0x28(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <str_insert@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_append>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
call   1040 <mem_begin@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1050 <str_len@plt>
add    %rax,%rbx
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <str_insert@plt>

LLVM IR (-O0):
define i8* @str_append(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
store i8* null, i8** %5
%9 = load i8*, i8** %3
%10 = call i8* @mem_begin(i8* %9)
store i8* %10, i8** %6
%11 = load i8*, i8** %6
%12 = call i64 @str_len(i8* %11)
store i64 %12, i64* %7
%13 = load i8*, i8** %6
%14 = load i64, i64* %7
%15 = getelementptr inbounds i8, i8* %13, i64 %14
store i8* %15, i8** %8
%16 = load i8*, i8** %8
%17 = load i8*, i8** %4
%18 = call i8* @str_insert(i8* %16, i8* %17)
store i8* %18, i8** %5
%19 = load i8*, i8** %5
ret i8* %19
}

LLVM IR (-O2):
define i8* @str_append(i8* %0, i8* %1) {
%3 = tail call i8* @mem_begin(i8* %0)
%4 = tail call i64 @str_len(i8* %3)
%5 = getelementptr inbounds i8, i8* %3, i64 %4
%6 = tail call i8* @str_insert(i8* %5, i8* %1)
ret i8* %6
}
/* Variables and functions */
size_t str_len(char const *);
char str_tail(const char *str) {
  size_t len;
  len = str_len(str);
  return len ? str[len - 1] : '\0';
}


x86 assembly (clang, -O0):
<str_tail>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <str_len@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     114c <str_tail+0x3c>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    $0x1,%rcx
movsbl (%rax,%rcx,1),%eax
mov    %eax,-0x14(%rbp)
jmp    1156 <str_tail+0x46>
xor    %eax,%eax
mov    %eax,-0x14(%rbp)
jmp    1156 <str_tail+0x46>
mov    -0x14(%rbp),%eax
movsbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_tail>:
push   %rbx
mov    %rdi,%rbx
call   1030 <str_len@plt>
test   %rax,%rax
je     1124 <str_tail+0x14>
mov    -0x1(%rax,%rbx,1),%al
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define signext i8 @str_tail(i8* %0) {
%2 = tail call i64 @str_len(i8* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = add i64 %2, -1
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
br label %8
8: ; preds = %1, %4
%9 = phi i8 [ %7, %4 ], [ 0, %1 ]
ret i8 %9
}
int my_rbrace(struct jslex *lexer) { return 1; }


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

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

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

LLVM IR (-O2):
%struct.jslex = type opaque
define i32 @my_rbrace(%struct.jslex* nocapture readnone %0) {
ret i32 1
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
bool encoding_guess_is_ascii_text(uint8_t c) {
  return (c >= 0x20 && c < 0x7f) || (c >= 0x09 && c < 0x0e);
}


x86 assembly (clang, -O0):
<encoding_guess_is_ascii_text>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x20,-0x4(%rbp)
jl     1120 <encoding_guess_is_ascii_text+0x20>
mov    $0x1,%al
cmpl   $0x7f,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     113f <encoding_guess_is_ascii_text+0x3f>
xor    %eax,%eax
cmpl   $0x9,-0x4(%rbp)
mov    %al,-0x6(%rbp)
jl     1139 <encoding_guess_is_ascii_text+0x39>
cmpl   $0xe,-0x4(%rbp)
setl   %al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<encoding_guess_is_ascii_text>:
lea    -0x20(%rdi),%eax
cmp    $0x5f,%eax
setb   %al
add    $0xfffffff7,%edi
cmp    $0x5,%edi
setb   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @encoding_guess_is_ascii_text(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 32
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 127
br i1 %7, label %16, label %8
8: ; preds = %5, %1
%9 = load i32, i32* %2
%10 = icmp sge i32 %9, 9
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = load i32, i32* %2
%13 = icmp slt i32 %12, 14
br label %14
14: ; preds = %11, %8
%15 = phi i1 [ false, %8 ], [ %13, %11 ]
br label %16
16: ; preds = %14, %5
%17 = phi i1 [ true, %5 ], [ %15, %14 ]
%18 = zext i1 %17 to i32
ret i32 %18
}

LLVM IR (-O2):
define i32 @encoding_guess_is_ascii_text(i32 %0) {
%2 = add i32 %0, -32
%3 = icmp ult i32 %2, 95
%4 = add i32 %0, -9
%5 = icmp ult i32 %4, 5
%6 = or i1 %3, %5
%7 = zext i1 %6 to i32
ret i32 %7
}
int __attribute__((no)) sub(int a, int b) { return a - b; }


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

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

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

LLVM IR (-O2):
define i32 @sub(i32 %0, i32 %1) {
%3 = sub nsw i32 %0, %1
ret i32 %3
}
/* Variables and functions */
int kwait(int *);
int /*<<< orphan*/ printf(char *, int, int);
int do_wait() {
  int pid, status;
  pid = kwait(&status);
  printf("pid = %d, exitVal = %d\n", pid, status);
}


x86 assembly (clang, -O0):
<do_wait>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0xc(%rbp),%rdi
call   1040 <kwait@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xebf(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_wait>:
push   %rax
lea    0x4(%rsp),%rdi
call   1040 <kwait@plt>
mov    0x4(%rsp),%edx
lea    0xeca(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [24 x i8] c"pid = %d, exitVal = %d\0A\00"
define i32 @do_wait() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @kwait(i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %4)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ test_parser_sourcefile(char *, char *);
int /*<<< orphan*/ test_parser_verify_parse(int /*<<< orphan*/, char *, char *,
                                            char *, int /*<<< orphan*/);
void test_scheme_comments() {
  test_parser_verify_parse(test_parser_sourcefile("scheme", " ;;; comment"),
                           "scheme", "", ";;; comment", 0);
}


x86 assembly (clang, -O0):
<test_scheme_comments>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xed5(%rip),%rsi
call   1030 <test_parser_sourcefile@plt>
mov    %eax,%edi
lea    0xec0(%rip),%rsi
lea    0xebf(%rip),%rdx
lea    0xeba(%rip),%rcx
xor    %r8d,%r8d
call   1040 <test_parser_verify_parse@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_scheme_comments>:
push   %rbx
lea    0xed8(%rip),%rbx
lea    0xed8(%rip),%rsi
mov    %rbx,%rdi
call   1030 <test_parser_sourcefile@plt>
lea    0xec8(%rip),%rdx
lea    0xec3(%rip),%rcx
mov    %eax,%edi
mov    %rbx,%rsi
xor    %r8d,%r8d
pop    %rbx
jmp    1040 <test_parser_verify_parse@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"scheme\00"
@.str.1 = [13 x i8] c" ;;; comment\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [12 x i8] c";;; comment\00"
define void @test_scheme_comments() {
%1 = call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 @test_parser_verify_parse(i32 %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i32 0)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"scheme\00"
@.str.1 = [13 x i8] c" ;;; comment\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [12 x i8] c";;; comment\00"
define void @test_scheme_comments() {
%1 = tail call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @test_parser_verify_parse(i32 %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void grpcsharp_completion_queue_create_sync() {
  fprintf(stderr, "Should never reach here");
  abort();
}


x86 assembly (clang, -O0):
<grpcsharp_completion_queue_create_sync>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [24 x i8] c"Should never reach here\00"
define void @grpcsharp_completion_queue_create_sync() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [24 x i8] c"Should never reach here\00"
define void @grpcsharp_completion_queue_create_sync() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char, int);
int main(void) {
  char c = 'c';
  int flag;
  if ((c) >= 65 && (c) <= 90) {
    (flag) = 1;
  } else {
    (flag) = 0;
  }
  if ((flag) == 2) {
    if ((c) >= 97 && (c) <= 122) {
      (flag) = 1;
    } else {
      (flag) = 0;
    }
  }
  printf("\'%c\' = %i | 1 = alphabetic, 0 = non-alphabetic\n", c, flag);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x63,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x41,%eax
jl     1149 <main+0x39>
movsbl -0x5(%rbp),%eax
cmp    $0x5a,%eax
jg     1149 <main+0x39>
movl   $0x1,-0xc(%rbp)
jmp    1150 <main+0x40>
movl   $0x0,-0xc(%rbp)
cmpl   $0x2,-0xc(%rbp)
jne    118c <main+0x7c>
movsbl -0x5(%rbp),%eax
cmp    $0x61,%eax
jl     1180 <main+0x70>
movsbl -0x5(%rbp),%eax
cmp    $0x7a,%eax
jg     1180 <main+0x70>
movl   $0x1,-0xc(%rbp)
jmp    1187 <main+0x77>
movl   $0x0,-0xc(%rbp)
jmp    118c <main+0x7c>
mov    -0x5(%rbp),%al
mov    -0xc(%rbp),%edx
lea    0xe67(%rip),%rdi
movsbl %al,%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    $0x63,%esi
xor    %edx,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [48 x i8] c"'%c' = %i | 1 = alphabetic, 0 = non-alphabetic\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i32
store i32 0, i32* %1
store i8 99, i8* %2
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 65
br i1 %6, label %7, label %12
7: ; preds = %0
%8 = load i8, i8* %2
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 90
br i1 %10, label %11, label %12
11: ; preds = %7
store i32 1, i32* %3
br label %13
12: ; preds = %7, %0
store i32 0, i32* %3
br label %13
13: ; preds = %12, %11
%14 = load i32, i32* %3
%15 = icmp eq i32 %14, 2
br i1 %15, label %16, label %27
16: ; preds = %13
%17 = load i8, i8* %2
%18 = sext i8 %17 to i32
%19 = icmp sge i32 %18, 97
br i1 %19, label %20, label %25
20: ; preds = %16
%21 = load i8, i8* %2
%22 = sext i8 %21 to i32
%23 = icmp sle i32 %22, 122
br i1 %23, label %24, label %25
24: ; preds = %20
store i32 1, i32* %3
br label %26
25: ; preds = %20, %16
store i32 0, i32* %3
br label %26
26: ; preds = %25, %24
br label %27
27: ; preds = %26, %13
%28 = load i8, i8* %2
%29 = load i32, i32* %3
%30 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i8 signext %28, i32 %29)
ret i32 0
}

LLVM IR (-O2):
@.str = [48 x i8] c"'%c' = %i | 1 = alphabetic, 0 = non-alphabetic\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i8 signext 99, i32 0)
ret i32 0
}
void ppu_2C02_reset(struct _2C02 *ppu) { (void)ppu; }


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

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

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

LLVM IR (-O2):
%struct._2C02 = type opaque
define void @ppu_2C02_reset(%struct._2C02* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ scanf(char *, char *);
void limparscanf(char c) {
  while (c != '\n')
    scanf("%c", &c);
}


x86 assembly (clang, -O0):
<limparscanf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0xa,%eax
je     1140 <limparscanf+0x30>
lea    0xece(%rip),%rdi
lea    -0x1(%rbp),%rsi
call   1030 <scanf@plt>
jmp    111e <limparscanf+0xe>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<limparscanf>:
push   %r14
push   %rbx
push   %rax
mov    %dil,0x7(%rsp)
cmp    $0xa,%dil
je     1142 <limparscanf+0x32>
lea    0xeda(%rip),%r14
lea    0x7(%rsp),%rbx
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <scanf@plt>
cmpb   $0xa,0x7(%rsp)
jne    1130 <limparscanf+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%c\00"
define void @limparscanf(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
br label %3
3: ; preds = %7, %1
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
%6 = icmp ne i32 %5, 10
br i1 %6, label %7, label %9
7: ; preds = %3
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
br label %3
9: ; preds = %3
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define void @limparscanf(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = icmp eq i8 %0, 10
br i1 %3, label %8, label %4
4: ; preds = %1, %4
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%6 = load i8, i8* %2
%7 = icmp eq i8 %6, 10
br i1 %7, label %8, label %4
8: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int help2() {
  printf("Usage: readInput <Dict-file> <Input-file> <Labels-file> "
         "<Sequence-file>\n");
  return 1;
}


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

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

LLVM IR (-O0):
@.str = [73 x i8] c"Usage: readInput <Dict-file> <Input-file> <Labels-file> <Sequence-file>\0A\00"
define i32 @help2() {
%1 = call i32 @printf(i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@str = [72 x i8] c"Usage: readInput <Dict-file> <Input-file> <Labels-file> <Sequence-file>\00"
define i32 @help2() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([72 x i8], [72 x i8]* @str, i64 0, i64 0))
ret i32 1
}
do_eof(fd) int fd;
{
  char buf[] = {0x0a, 0x00, 0x00, 0x00};
  write(fd, buf, 4);
}


x86 assembly (clang, -O0):
<do_eof>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    0xedf(%rip),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
lea    -0xc(%rbp),%rsi
mov    $0x4,%edx
mov    $0x0,%al
call   1030 <write@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_eof>:
push   %rax
movl   $0xa,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x4,%edx
xor    %eax,%eax
call   1030 <write@plt>
pop    %rcx
ret

LLVM IR (-O0):
@__const.do_eof.buf = [4 x i8] c"\0A\00\00\00"
define i32 @do_eof(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca [4 x i8]
store i32 %0, i32* %3
%5 = bitcast [4 x i8]* %4 to i8*
%6 = load i32, i32* %3
%7 = getelementptr inbounds [4 x i8], [4 x i8]* %4, i64 0, i64 0
%8 = call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @write to i32 (i32, i8*, i32, ...)*)(i32 %6, i8* %7, i32 4)
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
define i32 @do_eof(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 10, i32* %2
%4 = call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @write to i32 (i32, i8*, i32, ...)*)(i32 %0, i8* %3, i32 4)
ret i32 undef
}
void _M2_boxes_finish(__attribute__((unused)) int argc,
                      __attribute__((unused)) char *argv[]) {}


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

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

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

LLVM IR (-O2):
define void @_M2_boxes_finish(i32 %0, i8** nocapture %1) {
ret void
}
short internal_round_s(short value) { return value; }


x86 assembly (clang, -O0):
<internal_round_s>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define signext i16 @internal_round_s(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
ret i16 %3
}

LLVM IR (-O2):
define signext i16 @internal_round_s(i16 returned signext %0) {
ret i16 %0
}
void nats_sslRegisterThreadForCleanup(void) {}


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

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

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

LLVM IR (-O2):
define void @nats_sslRegisterThreadForCleanup() {
ret void
}
/* Type definitions */
struct gear_vert {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ tooth(struct gear_vert *, float, float, float, int, float,
                         int);
void fill_tooth_vertices(struct gear_vert *buf, float inner_radius,
                         float outer_radius, float width, int teeth,
                         float tooth_depth) {
  tooth(buf, inner_radius, outer_radius, width, teeth, tooth_depth, -1);
}


x86 assembly (clang, -O0):
<fill_tooth_vertices>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
movss  %xmm1,-0x10(%rbp)
movss  %xmm2,-0x14(%rbp)
mov    %esi,-0x18(%rbp)
movss  %xmm3,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
movss  -0xc(%rbp),%xmm0
movss  -0x10(%rbp),%xmm1
movss  -0x14(%rbp),%xmm2
mov    -0x18(%rbp),%esi
movss  -0x1c(%rbp),%xmm3
mov    $0xffffffff,%edx
call   1030 <tooth@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fill_tooth_vertices>:
mov    $0xffffffff,%edx
jmp    1030 <tooth@plt>

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

LLVM IR (-O2):
%struct.gear_vert = type { i32 }
define void @fill_tooth_vertices(%struct.gear_vert* %0, float %1, float %2, float %3, i32 %4, float %5) {
%7 = tail call i32 @tooth(%struct.gear_vert* %0, float %1, float %2, float %3, i32 %4, float %5, i32 -1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ read(int /*<<< orphan*/, char *, int);
int main() {
  char buf[10];
  read(0, buf, 1);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xe(%rsp),%rsi
xor    %edi,%edi
mov    $0x1,%edx
call   1030 <read@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x i8]
store i32 0, i32* %1
%3 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%4 = call i32 @read(i32 0, i8* %3, i32 1)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [10 x i8]
%2 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
%3 = call i32 @read(i32 0, i8* %2, i32 1)
ret i32 0
}
int StrHashGetTableSize() { return 617; }


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

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

LLVM IR (-O0):
define i32 @StrHashGetTableSize() {
ret i32 617
}

LLVM IR (-O2):
define i32 @StrHashGetTableSize() {
ret i32 617
}