xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void write_err(void) {
  printf("\nError: write error; probably out of disk space\n\n");
  exit(1);
}


x86 assembly (clang, -O0):
<write_err>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<write_err>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [50 x i8] c"\0AError: write error; probably out of disk space\0A\0A\00"
define void @write_err() {
%1 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [49 x i8] c"\0AError: write error; probably out of disk space\0A\00"
define void @write_err() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
unsigned char proto_assembleFrame(unsigned char *, unsigned short *,
                                  unsigned char *, int, int, int /*<<< orphan*/,
                                  int /*<<< orphan*/ *);
unsigned char protoR_GPRSParam(unsigned char *buf, unsigned short *bufSize,
                               unsigned char *gatewayId) {
  return proto_assembleFrame(buf, bufSize, gatewayId, 0x00, 0x90, 0, NULL);
}


x86 assembly (clang, -O0):
<protoR_GPRSParam>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
xor    %r9d,%r9d
mov    $0x90,%r8d
xor    %eax,%eax
mov    %r9d,%ecx
movq   $0x0,(%rsp)
call   1030 <proto_assembleFrame@plt>
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<protoR_GPRSParam>:
push   %rax
movq   $0x0,(%rsp)
xor    %ecx,%ecx
mov    $0x90,%r8d
xor    %r9d,%r9d
call   1030 <proto_assembleFrame@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define zeroext i8 @protoR_GPRSParam(i8* %0, i16* %1, i8* %2) {
%4 = tail call zeroext i8 @proto_assembleFrame(i8* %0, i16* %1, i8* %2, i32 0, i32 144, i32 0, i32* null)
ret i8 %4
}
double vde_chain_nm9_sq(double x) { return x * x; }


x86 assembly (clang, -O0):
<vde_chain_nm9_sq>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<vde_chain_nm9_sq>:
mulsd  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @vde_chain_nm9_sq(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = fmul double %3, %4
ret double %5
}

LLVM IR (-O2):
define double @vde_chain_nm9_sq(double %0) {
%2 = fmul double %0, %0
ret double %2
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
scalar_t__ random();
int /*<<< orphan*/ srandom(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main() {
  uint32_t r;
  srandom(time(NULL));
  r = (uint32_t)random();
  printf("%u\n", r);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1050 <time@plt>
mov    %eax,%edi
call   1030 <srandom@plt>
mov    $0x0,%al
call   1060 <random@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe8d(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1050 <time@plt>
mov    %eax,%edi
call   1030 <srandom@plt>
xor    %eax,%eax
call   1060 <random@plt>
lea    0xea3(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%u\0A\00"
define i32 @main() {
%1 = tail call i32 @time(i32* null)
%2 = tail call i32 @srandom(i32 %1)
%3 = tail call i64 (...) @random()
%4 = trunc i64 %3 to i32
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}
/* Variables and functions */
scalar_t__ ctype_alpha(int);
scalar_t__ ctype_digit(int);
scalar_t__ strchr(char *, int);
int ctype_domainunquoted(int c) {
  return ctype_alpha(c) || ctype_digit(c) || (strchr("-_/+", c) != 0);
}


x86 assembly (clang, -O0):
<ctype_domainunquoted>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <ctype_alpha@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
jne    1188 <ctype_domainunquoted+0x58>
mov    -0x4(%rbp),%edi
call   1050 <ctype_digit@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
jne    1188 <ctype_domainunquoted+0x58>
mov    -0x4(%rbp),%esi
lea    0xe87(%rip),%rdi
call   1030 <strchr@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ctype_domainunquoted>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
call   1040 <ctype_alpha@plt>
mov    $0x1,%ebx
test   %rax,%rax
jne    1166 <ctype_domainunquoted+0x36>
mov    %ebp,%edi
call   1050 <ctype_digit@plt>
test   %rax,%rax
jne    1166 <ctype_domainunquoted+0x36>
lea    0xea9(%rip),%rdi
mov    %ebp,%esi
call   1030 <strchr@plt>
xor    %ebx,%ebx
test   %rax,%rax
setne  %bl
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [5 x i8] c"-_/+\00"
define i32 @ctype_domainunquoted(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @ctype_alpha(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %14, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = call i64 @ctype_digit(i32 %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %14, label %10
10: ; preds = %6
%11 = load i32, i32* %2
%12 = call i64 @strchr(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = icmp ne i64 %12, 0
br label %14
14: ; preds = %10, %6, %1
%15 = phi i1 [ true, %6 ], [ true, %1 ], [ %13, %10 ]
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
@.str = [5 x i8] c"-_/+\00"
define i32 @ctype_domainunquoted(i32 %0) {
%2 = tail call i64 @ctype_alpha(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %11
4: ; preds = %1
%5 = tail call i64 @ctype_digit(i32 %0)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %4
%8 = tail call i64 @strchr(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %0)
%9 = icmp ne i64 %8, 0
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %7, %4, %1
%12 = phi i32 [ 1, %4 ], [ 1, %1 ], [ %10, %7 ]
ret i32 %12
}
void addReplyStatus(void) {
  _serverPanic("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/"
               "heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c",
               30, "Function '%s' is disabled.", __func__);
}


x86 assembly (clang, -O0):
<addReplyStatus>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x1e,%esi
lea    0xf79(%rip),%rdx
lea    0xf8d(%rip),%rcx
mov    $0x0,%al
call   1030 <_serverPanic@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<addReplyStatus>:
lea    0xee9(%rip),%rdi
lea    0xf82(%rip),%rdx
lea    0xf96(%rip),%rcx
mov    $0x1e,%esi
xor    %eax,%eax
jmp    1030 <_serverPanic@plt>

LLVM IR (-O0):
@.str = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c\00"
@.str.1 = [27 x i8] c"Function '%s' is disabled.\00"
@__func__.addReplyStatus = [15 x i8] c"addReplyStatus\00"
define void @addReplyStatus() {
%1 = call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @_serverPanic to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str, i64 0, i64 0), i32 30, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__func__.addReplyStatus, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c\00"
@.str.1 = [27 x i8] c"Function '%s' is disabled.\00"
@__func__.addReplyStatus = [15 x i8] c"addReplyStatus\00"
define void @addReplyStatus() {
%1 = tail call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @_serverPanic to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str, i64 0, i64 0), i32 30, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__func__.addReplyStatus, i64 0, i64 0))
ret void
}
void RSA_sign(void) {}


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

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

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

LLVM IR (-O2):
define void @RSA_sign() {
ret void
}
/* Variables and functions */
char *UTIL_mallocStr(size_t);
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int strlen(char *);
char *C_mkOneLineComments(char *comments) {
  size_t length = strlen(comments) + 5;
  char *commentsText = UTIL_mallocStr(length);
  strcpy(commentsText, "// ");
  strcat(commentsText, comments);
  return commentsText;
}


x86 assembly (clang, -O0):
<C_mkOneLineComments>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
add    $0x5,%eax
cltq
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <UTIL_mallocStr@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xe8a(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1060 <strcat@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<C_mkOneLineComments>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
add    $0x5,%eax
movslq %eax,%rdi
call   1050 <UTIL_mallocStr@plt>
mov    %rax,%rbx
lea    0xe9f(%rip),%rsi
mov    %rax,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1060 <strcat@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [4 x i8] c"// \00"
define i8* @C_mkOneLineComments(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @strlen(i8* %5)
%7 = add nsw i32 %6, 5
%8 = sext i32 %7 to i64
store i64 %8, i64* %3
%9 = load i64, i64* %3
%10 = call i8* @UTIL_mallocStr(i64 %9)
store i8* %10, i8** %4
%11 = load i8*, i8** %4
%12 = call i32 @strcpy(i8* %11, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%13 = load i8*, i8** %4
%14 = load i8*, i8** %2
%15 = call i32 @strcat(i8* %13, i8* %14)
%16 = load i8*, i8** %4
ret i8* %16
}

LLVM IR (-O2):
@.str = [4 x i8] c"// \00"
define i8* @C_mkOneLineComments(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add nsw i32 %2, 5
%4 = sext i32 %3 to i64
%5 = tail call i8* @UTIL_mallocStr(i64 %4)
%6 = tail call i32 @strcpy(i8* %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @strcat(i8* %5, i8* %0)
ret i8* %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ cpu_nswap64p(int /*<<< orphan*/ *, int /*<<< orphan*/);
void cpu_to_le64p(uint64_t *outp, uint64_t in) { cpu_nswap64p(outp, in); }


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

x86 assembly (clang, -O2):
<cpu_to_le64p>:
jmp    1030 <cpu_nswap64p@plt>

LLVM IR (-O0):
define void @cpu_to_le64p(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 = call i32 @cpu_nswap64p(i32* %5, i32 %6)
ret void
}

LLVM IR (-O2):
define void @cpu_to_le64p(i32* %0, i32 %1) {
%3 = tail call i32 @cpu_nswap64p(i32* %0, i32 %1)
ret void
}
float pm25pcs2ugm3(float concentration_pcs) {
  double pi = 3.14159;
  double density = 1.65 * pow(10, 12);
  double r25 = 0.44 * pow(10, -6);
  double vol25 = (4 / 3) * pi * pow(r25, 3);
  double mass25 = density * vol25;
  double K = 3531.5;
  return (concentration_pcs)*K * mass25;
}


x86 assembly (clang, -O0):
<pm25pcs2ugm3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movss  %xmm0,-0x4(%rbp)
movsd  0xf1b(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xeee(%rip),%xmm0
movsd  0xefe(%rip),%xmm1
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  0xee6(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xec5(%rip),%xmm0
movsd  0xec5(%rip),%xmm1
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  0xea5(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xe8c(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  0xe6d(%rip),%xmm1
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x40(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xe38(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  -0x38(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pm25pcs2ugm3>:
cvtss2sd %xmm0,%xmm0
mulsd  0xef4(%rip),%xmm0
mulsd  0xef4(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @pm25pcs2ugm3(float %0) {
%2 = alloca float
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store float %0, float* %2
store double 3.141590e+00, double* %3
%9 = call double @pow(double 1.000000e+01, double 1.200000e+01)
%10 = fmul double 1.650000e+00, %9
store double %10, double* %4
%11 = call double @pow(double 1.000000e+01, double -6.000000e+00)
%12 = fmul double 4.400000e-01, %11
store double %12, double* %5
%13 = load double, double* %3
%14 = fmul double 1.000000e+00, %13
%15 = load double, double* %5
%16 = call double @pow(double %15, double 3.000000e+00)
%17 = fmul double %14, %16
store double %17, double* %6
%18 = load double, double* %4
%19 = load double, double* %6
%20 = fmul double %18, %19
store double %20, double* %7
store double 3.531500e+03, double* %8
%21 = load float, float* %2
%22 = fpext float %21 to double
%23 = load double, double* %8
%24 = fmul double %22, %23
%25 = load double, double* %7
%26 = fmul double %24, %25
%27 = fptrunc double %26 to float
ret float %27
}

LLVM IR (-O2):
define float @pm25pcs2ugm3(float %0) {
%2 = fpext float %0 to double
%3 = fmul double %2, 3.531500e+03
%4 = fmul double %3, 0x3E9DA1F943B91ABF
%5 = fptrunc double %4 to float
ret float %5
}
void m_end(void) {}


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

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

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

LLVM IR (-O2):
define void @m_end() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mpi();
int main() { mpi(); }


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @mpi()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @mpi()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void hugo_print(char *a) { printf(a); }


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

x86 assembly (clang, -O2):
<hugo_print>:
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
define void @hugo_print(i8* nocapture %0) {
%2 = tail call i32 @printf(i8* dereferenceable(1) %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bit_view(char);
int main(int argc, char *argv[]) {
  char *str = "hello world!";
  do {
    bit_view(*str);
    str++;
  } while (*str != 0);
  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)
lea    0xed3(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%edi
call   1030 <bit_view@plt>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1131 <main+0x21>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x68,%edi
call   1030 <bit_view@plt>
mov    $0x65,%edi
call   1030 <bit_view@plt>
mov    $0x6c,%edi
call   1030 <bit_view@plt>
mov    $0x6c,%edi
call   1030 <bit_view@plt>
mov    $0x6f,%edi
call   1030 <bit_view@plt>
mov    $0x20,%edi
call   1030 <bit_view@plt>
mov    $0x77,%edi
call   1030 <bit_view@plt>
mov    $0x6f,%edi
call   1030 <bit_view@plt>
mov    $0x72,%edi
call   1030 <bit_view@plt>
mov    $0x6c,%edi
call   1030 <bit_view@plt>
mov    $0x64,%edi
call   1030 <bit_view@plt>
mov    $0x21,%edi
call   1030 <bit_view@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"hello world!\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8** %6
br label %7
7: ; preds = %13, %2
%8 = load i8*, i8** %6
%9 = load i8, i8* %8
%10 = call i32 @bit_view(i8 signext %9)
%11 = load i8*, i8** %6
%12 = getelementptr inbounds i8, i8* %11, i32 1
store i8* %12, i8** %6
br label %13
13: ; preds = %7
%14 = load i8*, i8** %6
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = icmp ne i32 %16, 0
br i1 %17, label %7, label %18
18: ; preds = %13
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @bit_view(i8 signext 104)
%4 = tail call i32 @bit_view(i8 signext 101)
%5 = tail call i32 @bit_view(i8 signext 108)
%6 = tail call i32 @bit_view(i8 signext 108)
%7 = tail call i32 @bit_view(i8 signext 111)
%8 = tail call i32 @bit_view(i8 signext 32)
%9 = tail call i32 @bit_view(i8 signext 119)
%10 = tail call i32 @bit_view(i8 signext 111)
%11 = tail call i32 @bit_view(i8 signext 114)
%12 = tail call i32 @bit_view(i8 signext 108)
%13 = tail call i32 @bit_view(i8 signext 100)
%14 = tail call i32 @bit_view(i8 signext 33)
ret i32 0
}
char foo(char a, char b) {
  int local_a;
  int local_b;
  return a + b;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movsbl -0x1(%rbp),%eax
movsbl -0x2(%rbp),%ecx
add    %ecx,%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
lea    (%rsi,%rdi,1),%eax
ret

LLVM IR (-O0):
define signext i8 @foo(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
%7 = load i8, i8* %3
%8 = sext i8 %7 to i32
%9 = load i8, i8* %4
%10 = sext i8 %9 to i32
%11 = add nsw i32 %8, %10
%12 = trunc i32 %11 to i8
ret i8 %12
}

LLVM IR (-O2):
define signext i8 @foo(i8 signext %0, i8 signext %1) {
%3 = add i8 %1, %0
ret i8 %3
}
long long longlong_ignoring_unsignedlongint(long long x, unsigned long int y) {
  return x;
}


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

x86 assembly (clang, -O2):
<longlong_ignoring_unsignedlongint>:
mov    %rdi,%rax
ret

LLVM IR (-O0):
define i64 @longlong_ignoring_unsignedlongint(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
ret i64 %5
}

LLVM IR (-O2):
define i64 @longlong_ignoring_unsignedlongint(i64 returned %0, i64 %1) {
ret i64 %0
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(unsigned char *, char const *, int);
double get_double_le(const char *cp) {
  double ret;
  unsigned char *dp = (unsigned char *)&ret;
  if (NULL == cp)
    return 0.0;
  memcpy(dp, cp, 8);
  return ret;
}


x86 assembly (clang, -O0):
<get_double_le>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
lea    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
xor    %eax,%eax
cmp    -0x10(%rbp),%rax
jne    113d <get_double_le+0x2d>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1159 <get_double_le+0x49>
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x8,%edx
call   1030 <memcpy@plt>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_double_le>:
test   %rdi,%rdi
je     1130 <get_double_le+0x20>
push   %rax
mov    %rdi,%rsi
mov    %rsp,%rdi
mov    $0x8,%edx
call   1030 <memcpy@plt>
movsd  (%rsp),%xmm0
add    $0x8,%rsp
ret
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @get_double_le(i8* %0) {
%2 = alloca double
%3 = alloca i8*
%4 = alloca double
%5 = alloca i8*
store i8* %0, i8** %3
%6 = bitcast double* %4 to i8*
store i8* %6, i8** %5
%7 = load i8*, i8** %3
%8 = icmp eq i8* null, %7
br i1 %8, label %9, label %10
9: ; preds = %1
store double 0.000000e+00, double* %2
br label %15
10: ; preds = %1
%11 = load i8*, i8** %5
%12 = load i8*, i8** %3
%13 = call i32 @memcpy(i8* %11, i8* %12, i32 8)
%14 = load double, double* %4
store double %14, double* %2
br label %15
15: ; preds = %10, %9
%16 = load double, double* %2
ret double %16
}

LLVM IR (-O2):
define double @get_double_le(i8* %0) {
%2 = alloca double
%3 = bitcast double* %2 to i8*
%4 = icmp eq i8* %0, null
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = call i32 @memcpy(i8* %3, i8* %0, i32 8)
%7 = load double, double* %2
br label %8
8: ; preds = %1, %5
%9 = phi double [ %7, %5 ], [ 0.000000e+00, %1 ]
ret double %9
}
/* Variables and functions */
int /*<<< orphan*/ DrawBox(double, double, double, double);
int /*<<< orphan*/ InitGraphics();
main() {
  InitGraphics();
  DrawBox(0.5, 0.5, 1.0, 1.0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <InitGraphics@plt>
movsd  0xecd(%rip),%xmm1
movsd  0xecd(%rip),%xmm3
movaps %xmm1,%xmm0
movaps %xmm3,%xmm2
call   1040 <DrawBox@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <InitGraphics@plt>
movsd  0xed0(%rip),%xmm0
movsd  0xed0(%rip),%xmm2
movaps %xmm0,%xmm1
movaps %xmm2,%xmm3
call   1040 <DrawBox@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @InitGraphics()
%2 = call i32 @DrawBox(double 5.000000e-01, double 5.000000e-01, double 1.000000e+00, double 1.000000e+00)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @InitGraphics()
%2 = tail call i32 @DrawBox(double 5.000000e-01, double 5.000000e-01, double 1.000000e+00, double 1.000000e+00)
ret i32 0
}
int ptrace_sandbox_get_socketcall_arg(struct pt_sandbox *p_sandbox, int arg,
                                      unsigned long *p_out) {
  (void)p_sandbox;
  (void)arg;
  (void)p_out;
  return -1;
}


x86 assembly (clang, -O0):
<ptrace_sandbox_get_socketcall_arg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.pt_sandbox = type opaque
define i32 @ptrace_sandbox_get_socketcall_arg(%struct.pt_sandbox* %0, i32 %1, i64* %2) {
%4 = alloca %struct.pt_sandbox*
%5 = alloca i32
%6 = alloca i64*
store %struct.pt_sandbox* %0, %struct.pt_sandbox** %4
store i32 %1, i32* %5
store i64* %2, i64** %6
%7 = load %struct.pt_sandbox*, %struct.pt_sandbox** %4
%8 = load i32, i32* %5
%9 = load i64*, i64** %6
ret i32 -1
}

LLVM IR (-O2):
%struct.pt_sandbox = type opaque
define i32 @ptrace_sandbox_get_socketcall_arg(%struct.pt_sandbox* nocapture readnone %0, i32 %1, i64* nocapture readnone %2) {
ret i32 -1
}
void foo674() {}


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

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

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

LLVM IR (-O2):
define void @foo674() {
ret void
}
int main(void) {
  int a = 1, b = 2, c = 3;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
movl   $0x3,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
void XShapeCombineRectangles() {}


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

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

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

LLVM IR (-O2):
define void @XShapeCombineRectangles() {
ret void
}
unsigned hashFunction(char *key) {
  unsigned rv;
  char *p;
  for (p = key, rv = 0; *p != '\0'; rv += (unsigned)*p++)
    ;
  return (rv % (20 * 1024));
}


x86 assembly (clang, -O0):
<hashFunction>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1149 <hashFunction+0x49>
jmp    112c <hashFunction+0x2c>
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x18(%rbp)
movsbl (%rax),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1117 <hashFunction+0x17>
mov    -0xc(%rbp),%eax
mov    $0x5000,%ecx
xor    %edx,%edx
div    %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hashFunction>:
mov    (%rdi),%cl
test   %cl,%cl
je     1138 <hashFunction+0x38>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
movsbl %cl,%ecx
add    %ecx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <hashFunction+0x10>
mov    %eax,%ecx
mov    $0xcccccccd,%edx
imul   %rcx,%rdx
shr    $0x2e,%rdx
shl    $0xc,%edx
lea    (%rdx,%rdx,4),%ecx
sub    %ecx,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @hashFunction(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %15, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %11, %4 ], [ %2, %1 ]
%6 = phi i8* [ %9, %4 ], [ %0, %1 ]
%7 = phi i32 [ %10, %4 ], [ 0, %1 ]
%8 = sext i8 %5 to i32
%9 = getelementptr inbounds i8, i8* %6, i64 1
%10 = add i32 %7, %8
%11 = load i8, i8* %9
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %4
%14 = urem i32 %10, 20480
br label %15
15: ; preds = %13, %1
%16 = phi i32 [ 0, %1 ], [ %14, %13 ]
ret i32 %16
}
void sub0(int i) {
  extern int sub(int);
  sub(i);
}


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

x86 assembly (clang, -O2):
<sub0>:
jmp    1030 <sub@plt>

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

LLVM IR (-O2):
define void @sub0(i32 %0) {
%2 = tail call i32 @sub(i32 %0)
ret void
}
/* Variables and functions */
char getch_(int);
char getche() { return getch_(1); }


x86 assembly (clang, -O0):
<getche>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <getch_@plt>
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getche>:
mov    $0x1,%edi
jmp    1030 <getch_@plt>

LLVM IR (-O0):
define signext i8 @getche() {
%1 = call signext i8 @getch_(i32 1)
ret i8 %1
}

LLVM IR (-O2):
define signext i8 @getche() {
%1 = tail call signext i8 @getch_(i32 1)
ret i8 %1
}
int strangeOrder(int a, int b) {
  if (a == 0 || b == 0) {
    return 0;
  } else {
    return a % b;
  }
}


x86 assembly (clang, -O0):
<strangeOrder>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     111e <strangeOrder+0x1e>
cmpl   $0x0,-0xc(%rbp)
jne    112a <strangeOrder+0x2a>
movl   $0x0,-0x4(%rbp)
jmp    1134 <strangeOrder+0x34>
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strangeOrder>:
xor    %eax,%eax
test   %edi,%edi
je     1111 <strangeOrder+0x11>
test   %esi,%esi
je     1111 <strangeOrder+0x11>
mov    %edi,%eax
cltd
idiv   %esi
mov    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @strangeOrder(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 0
%4 = icmp eq i32 %1, 0
%5 = or i1 %3, %4
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = srem i32 %0, %1
br label %8
8: ; preds = %2, %6
%9 = phi i32 [ %7, %6 ], [ 0, %2 ]
ret i32 %9
}
void NMI_Handler() {
  for (;;)
    ;
}


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

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

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

LLVM IR (-O2):
define void @NMI_Handler() {
br label %1
1: ; preds = %1, %0
br label %1
}
unsigned int array_uint32_word_be(const unsigned char data[]) {
  return data[1] + (data[0] << 8) + (data[3] << 16) + (data[2] << 24);
}


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

x86 assembly (clang, -O2):
<array_uint32_word_be>:
movzwl (%rdi),%eax
shl    $0x10,%eax
bswap  %eax
movzbl 0x3(%rdi),%ecx
shl    $0x10,%ecx
or     %eax,%ecx
movzbl 0x2(%rdi),%eax
shl    $0x18,%eax
or     %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @array_uint32_word_be(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 1
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = load i8, i8* %0
%6 = zext i8 %5 to i32
%7 = shl nuw nsw i32 %6, 8
%8 = or i32 %7, %4
%9 = getelementptr inbounds i8, i8* %0, i64 3
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = shl nuw nsw i32 %11, 16
%13 = or i32 %8, %12
%14 = getelementptr inbounds i8, i8* %0, i64 2
%15 = load i8, i8* %14
%16 = zext i8 %15 to i32
%17 = shl nuw i32 %16, 24
%18 = or i32 %13, %17
ret i32 %18
}
/* Variables and functions */
int /*<<< orphan*/ err(int, char *, char const *);
long check(long res, const char *msg) {
  if (res == -1) {
    err(1, "%s", msg);
  }
  return res;
}


x86 assembly (clang, -O0):
<check>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0xffffffffffffffff,-0x8(%rbp)
jne    1140 <check+0x30>
mov    -0x10(%rbp),%rdx
mov    $0x1,%edi
lea    0xec5(%rip),%rsi
call   1030 <err@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check>:
push   %rbx
mov    %rdi,%rbx
cmp    $0xffffffffffffffff,%rdi
jne    112e <check+0x1e>
mov    %rsi,%rdx
lea    0xedc(%rip),%rsi
mov    $0x1,%edi
call   1030 <err@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i64 @check(i64 returned %0, i8* %1) {
%3 = icmp eq i64 %0, -1
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @err(i32 1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
br label %6
6: ; preds = %4, %2
ret i64 %0
}
/* Variables and functions */
int /*<<< orphan*/ _I8080_DI();
void do0xF3() { _I8080_DI(); }


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

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

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

LLVM IR (-O2):
define void @do0xF3() {
%1 = tail call i32 (...) @_I8080_DI()
ret void
}
/* Variables and functions */
scalar_t__ EOF;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
scalar_t__ scanf(char *, float *);
float get_float() {
  float x;
  if (scanf("%f", &x) == EOF) {
    exit(0);
  }
  return x;
}


x86 assembly (clang, -O0):
<get_float>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1030 <scanf@plt>
mov    0x2ea9(%rip),%rcx
cmp    (%rcx),%rax
jne    114f <get_float+0x2f>
xor    %edi,%edi
call   1040 <exit@plt>
movss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_float>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1030 <scanf@plt>
mov    0x2eaf(%rip),%rcx
cmp    (%rcx),%rax
je     1146 <get_float+0x26>
movss  0x4(%rsp),%xmm0
pop    %rax
ret
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%f\00"
@EOF = global i64 0
define float @get_float() {
%1 = alloca float
%2 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %1)
%3 = load i64, i64* @EOF
%4 = icmp eq i64 %2, %3
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 @exit(i32 0)
unreachable
7: ; preds = %0
%8 = load float, float* %1
ret float %8
}

LLVM IR (-O2):
@.str = [3 x i8] c"%f\00"
@EOF = global i64 0
define float @get_float() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %1)
%4 = load i64, i64* @EOF
%5 = icmp eq i64 %3, %4
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 @exit(i32 0)
unreachable
8: ; preds = %0
%9 = load float, float* %1
ret float %9
}
/* Variables and functions */
int term();
int sub(int x) { return x - term(); }


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

x86 assembly (clang, -O2):
<sub>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <term@plt>
sub    %eax,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @sub(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 (...) @term()
%5 = sub nsw i32 %3, %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @sub(i32 %0) {
%2 = tail call i32 (...) @term()
%3 = sub nsw i32 %0, %2
ret i32 %3
}
/* Type definitions */
struct histogram {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *path_common(struct histogram *, int);
char *string_format(char *, char *);
char *path_of_table(struct histogram *h, int only_base_name) {
  char *common = path_common(h, only_base_name);
  char *path = string_format("%s_table.data", common);
  free(common);
  return path;
}


x86 assembly (clang, -O0):
<path_of_table>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1050 <path_common@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xea6(%rip),%rdi
call   1040 <string_format@plt>
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<path_of_table>:
push   %r14
push   %rbx
push   %rax
call   1050 <path_common@plt>
mov    %rax,%rbx
lea    0xebd(%rip),%rdi
mov    %rax,%rsi
call   1040 <string_format@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.histogram = type { i32 }
@.str = [14 x i8] c"%s_table.data\00"
define i8* @path_of_table(%struct.histogram* %0, i32 %1) {
%3 = alloca %struct.histogram*
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
store %struct.histogram* %0, %struct.histogram** %3
store i32 %1, i32* %4
%7 = load %struct.histogram*, %struct.histogram** %3
%8 = load i32, i32* %4
%9 = call i8* @path_common(%struct.histogram* %7, i32 %8)
store i8* %9, i8** %5
%10 = load i8*, i8** %5
%11 = call i8* @string_format(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %10)
store i8* %11, i8** %6
%12 = load i8*, i8** %5
%13 = call i32 @free(i8* %12)
%14 = load i8*, i8** %6
ret i8* %14
}

LLVM IR (-O2):
%struct.histogram = type { i32 }
@.str = [14 x i8] c"%s_table.data\00"
define i8* @path_of_table(%struct.histogram* %0, i32 %1) {
%3 = tail call i8* @path_common(%struct.histogram* %0, i32 %1)
%4 = tail call i8* @string_format(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = tail call i32 @free(i8* %3)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ dmmadd_(int *, int *, double *, double *, int *, double *,
                           double *, int *);
void wcc_dmmadd_(int *M, int *N, char *ALPHA, char *A, int *LDA, char *BETA,
                 char *B, int *LDB) {
  dmmadd_(M, N, (double *)ALPHA, (double *)A, LDA, (double *)BETA, (double *)B,
          LDB);
}


x86 assembly (clang, -O0):
<wcc_dmmadd_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%r9
mov    0x10(%rbp),%r10
mov    0x18(%rbp),%rax
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1030 <dmmadd_@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wcc_dmmadd_>:
jmp    1030 <dmmadd_@plt>

LLVM IR (-O0):
define void @wcc_dmmadd_(i32* %0, i32* %1, i8* %2, i8* %3, i32* %4, i8* %5, i8* %6, i32* %7) {
%9 = alloca i32*
%10 = alloca i32*
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i32*
%14 = alloca i8*
%15 = alloca i8*
%16 = alloca i32*
store i32* %0, i32** %9
store i32* %1, i32** %10
store i8* %2, i8** %11
store i8* %3, i8** %12
store i32* %4, i32** %13
store i8* %5, i8** %14
store i8* %6, i8** %15
store i32* %7, i32** %16
%17 = load i32*, i32** %9
%18 = load i32*, i32** %10
%19 = load i8*, i8** %11
%20 = bitcast i8* %19 to double*
%21 = load i8*, i8** %12
%22 = bitcast i8* %21 to double*
%23 = load i32*, i32** %13
%24 = load i8*, i8** %14
%25 = bitcast i8* %24 to double*
%26 = load i8*, i8** %15
%27 = bitcast i8* %26 to double*
%28 = load i32*, i32** %16
%29 = call i32 @dmmadd_(i32* %17, i32* %18, double* %20, double* %22, i32* %23, double* %25, double* %27, i32* %28)
ret void
}

LLVM IR (-O2):
define void @wcc_dmmadd_(i32* %0, i32* %1, i8* %2, i8* %3, i32* %4, i8* %5, i8* %6, i32* %7) {
%9 = bitcast i8* %2 to double*
%10 = bitcast i8* %3 to double*
%11 = bitcast i8* %5 to double*
%12 = bitcast i8* %6 to double*
%13 = tail call i32 @dmmadd_(i32* %0, i32* %1, double* %9, double* %10, i32* %4, double* %11, double* %12, i32* %7)
ret void
}
/* Variables and functions */
void *calloc(size_t, size_t);
int /*<<< orphan*/ eprintf(char *);
void *ecalloc(size_t nmemb, size_t size) {
  void *p;
  p = calloc(nmemb, size);
  if (!p)
    eprintf("calloc: out of memory\n");
  return p;
}


x86 assembly (clang, -O0):
<ecalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <calloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1158 <ecalloc+0x38>
lea    0xead(%rip),%rdi
call   1040 <eprintf@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ecalloc>:
push   %rbx
call   1030 <calloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113a <ecalloc+0x1a>
lea    0xecb(%rip),%rdi
call   1040 <eprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [23 x i8] c"calloc: out of memory\0A\00"
define i8* @ecalloc(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i8*
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %3
%7 = load i64, i64* %4
%8 = call i8* @calloc(i64 %6, i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp ne i8* %9, null
br i1 %10, label %13, label %11
11: ; preds = %2
%12 = call i32 @eprintf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
br label %13
13: ; preds = %11, %2
%14 = load i8*, i8** %5
ret i8* %14
}

LLVM IR (-O2):
@.str = [23 x i8] c"calloc: out of memory\0A\00"
define noalias i8* @ecalloc(i64 %0, i64 %1) {
%3 = tail call i8* @calloc(i64 %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @eprintf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %2
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ ft_strcpy(char *, char const *);
char *ft_strcat(char *s1, const char *s2) {
  char *s3;
  s3 = s1;
  while (*s1)
    s1++;
  ft_strcpy(s1, s2);
  return (s3);
}


x86 assembly (clang, -O0):
<ft_strcat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1146 <ft_strcat+0x36>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1128 <ft_strcat+0x18>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <ft_strcpy@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_strcat>:
push   %rbx
mov    %rdi,%rbx
add    $0xffffffffffffffff,%rdi
nopl   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rdi)
lea    0x1(%rdi),%rdi
jne    1120 <ft_strcat+0x10>
call   1030 <ft_strcpy@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @ft_strcat(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
store i8* %6, i8** %5
br label %7
7: ; preds = %11, %2
%8 = load i8*, i8** %3
%9 = load i8, i8* %8
%10 = icmp ne i8 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %7
%12 = load i8*, i8** %3
%13 = getelementptr inbounds i8, i8* %12, i32 1
store i8* %13, i8** %3
br label %7
14: ; preds = %7
%15 = load i8*, i8** %3
%16 = load i8*, i8** %4
%17 = call i32 @ft_strcpy(i8* %15, i8* %16)
%18 = load i8*, i8** %5
ret i8* %18
}

LLVM IR (-O2):
define i8* @ft_strcat(i8* returned %0, i8* %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %7, %3 ]
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %6, label %8, label %3
8: ; preds = %3
%9 = tail call i32 @ft_strcpy(i8* %4, i8* %1)
ret i8* %0
}
/* Forward declarations */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  long quot;
  long rem;
};
typedef TYPE_1__ ldiv_t;

/* Variables and functions */
ldiv_t ldiv(long int numerator, long int denominator) {
  ldiv_t x;
  x.quot = numerator / denominator;
  x.rem = numerator - x.quot * denominator;
  ;
  return x;
}


x86 assembly (clang, -O0):
<ldiv>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x18(%rbp)
mov    %rsi,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%rcx
cqto
idiv   %rcx
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    -0x20(%rbp),%rdx
imul   %rdx,%rcx
sub    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
pop    %rbp
ret

x86 assembly (clang, -O2):
<ldiv>:
mov    %rdi,%rax
mov    %rdi,%rcx
or     %rsi,%rcx
shr    $0x20,%rcx
je     1115 <ldiv+0x15>
cqto
idiv   %rsi
ret
xor    %edx,%edx
div    %esi
ret

LLVM IR (-O0):
%struct.TYPE_3__ = type { i64, i64 }
define { i64, i64 } @ldiv(i64 %0, i64 %1) {
%3 = alloca %struct.TYPE_3__
%4 = alloca i64
%5 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
%6 = load i64, i64* %4
%7 = load i64, i64* %5
%8 = sdiv i64 %6, %7
%9 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %3, i32 0, i32 0
store i64 %8, i64* %9
%10 = load i64, i64* %4
%11 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %3, i32 0, i32 0
%12 = load i64, i64* %11
%13 = load i64, i64* %5
%14 = mul nsw i64 %12, %13
%15 = sub nsw i64 %10, %14
%16 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %3, i32 0, i32 1
store i64 %15, i64* %16
%17 = bitcast %struct.TYPE_3__* %3 to { i64, i64 }*
%18 = load { i64, i64 }, { i64, i64 }* %17
ret { i64, i64 } %18
}

LLVM IR (-O2):
define { i64, i64 } @ldiv(i64 %0, i64 %1) {
%3 = sdiv i64 %0, %1
%4 = mul nsw i64 %3, %1
%5 = srem i64 %0, %1
%6 = insertvalue { i64, i64 } poison, i64 %3, 0
%7 = insertvalue { i64, i64 } %6, i64 %5, 1
ret { i64, i64 } %7
}