xunge/DecIR huggingface dataset:
/* Type definitions */
typedef scalar_t__ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ STDERR_FILENO;
scalar_t__ fsync(int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char const *);
scalar_t__ write(int /*<<< orphan*/, char const *, int /*<<< orphan*/);
void ERR(const char *s) {
  if (!s) {
    ERR("(null)");
    return;
  }
  ssize_t ret = write(STDERR_FILENO, s, strlen(s));
  ((void)ret);
  ret = fsync(STDERR_FILENO);
  ((void)ret);
}


x86 assembly (clang, -O0):
<ERR>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1168 <ERR+0x28>
lea    0xea2(%rip),%rdi
call   1060 <ERR@plt>
jmp    11a9 <ERR+0x69>
mov    0x2e71(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1030 <write@plt>
mov    %rax,-0x10(%rbp)
mov    0x2e42(%rip),%rax
mov    (%rax),%edi
call   1050 <fsync@plt>
mov    %rax,-0x10(%rbp)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ERR>:
push   %rbp
push   %r14
push   %rbx
test   %rdi,%rdi
mov    0x2ea2(%rip),%r14
mov    (%r14),%ebp
lea    0xeb8(%rip),%rbx
cmovne %rdi,%rbx
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <write@plt>
mov    (%r14),%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1050 <fsync@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"(null)\00"
@STDERR_FILENO = global i32 0
define void @ERR(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = icmp ne i8* %4, null
br i1 %5, label %7, label %6
6: ; preds = %1
br label %17
7: ; preds = %1
%8 = load i32, i32* @STDERR_FILENO
%9 = load i8*, i8** %2
%10 = load i8*, i8** %2
%11 = call i32 @strlen(i8* %10)
%12 = call i64 @write(i32 %8, i8* %9, i32 %11)
store i64 %12, i64* %3
%13 = load i64, i64* %3
%14 = load i32, i32* @STDERR_FILENO
%15 = call i64 @fsync(i32 %14)
store i64 %15, i64* %3
%16 = load i64, i64* %3
br label %17
17: ; preds = %7, %6
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"(null)\00"
@STDERR_FILENO = global i32 0
define void @ERR(i8* %0) {
%2 = icmp eq i8* %0, null
%3 = load i32, i32* @STDERR_FILENO
%4 = select i1 %2, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %0
%5 = tail call i32 @strlen(i8* %4)
%6 = tail call i64 @write(i32 %3, i8* %4, i32 %5)
%7 = load i32, i32* @STDERR_FILENO
%8 = tail call i64 @fsync(i32 %7)
ret void
}
/* Variables and functions */
float sqrt(int);
float circularEaseInf(float p) { return 1 - sqrt(1 - (p * p)); }


x86 assembly (clang, -O0):
<circularEaseInf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x4(%rbp),%xmm1
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mulss  %xmm1,%xmm0
movss  0xec0(%rip),%xmm1
addss  %xmm1,%xmm0
cvttss2si %xmm0,%edi
call   1030 <sqrt@plt>
movaps %xmm0,%xmm1
movss  0xea8(%rip),%xmm0
subss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<circularEaseInf>:
push   %rax
mulss  %xmm0,%xmm0
movss  0xee3(%rip),%xmm1
subss  %xmm0,%xmm1
cvttss2si %xmm1,%edi
call   1030 <sqrt@plt>
movss  0xece(%rip),%xmm1
subss  %xmm0,%xmm1
movaps %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @circularEaseInf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = load float, float* %2
%5 = fneg float %3
%6 = call float @llvm.fmuladd.f32(float %5, float %4, float 1.000000e+00)
%7 = fptosi float %6 to i32
%8 = call float @sqrt(i32 %7)
%9 = fsub float 1.000000e+00, %8
ret float %9
}

LLVM IR (-O2):
define float @circularEaseInf(float %0) {
%2 = fneg float %0
%3 = tail call float @llvm.fmuladd.f32(float %2, float %0, float 1.000000e+00)
%4 = fptosi float %3 to i32
%5 = tail call float @sqrt(i32 %4)
%6 = fsub float 1.000000e+00, %5
ret float %6
}
/* Variables and functions */
int /*<<< orphan*/ bench_file_depth(char const *, int);
void bench_file(const char *filename) { bench_file_depth(filename, 6); }


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

x86 assembly (clang, -O2):
<bench_file>:
mov    $0x6,%esi
jmp    1030 <bench_file_depth@plt>

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

LLVM IR (-O2):
define void @bench_file(i8* %0) {
%2 = tail call i32 @bench_file_depth(i8* %0, i32 6)
ret void
}
/* Variables and functions */
char ql_readbyte(unsigned long);
char GetMemB(unsigned long address) { return (ql_readbyte(address)); }


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

x86 assembly (clang, -O2):
<GetMemB>:
jmp    1030 <ql_readbyte@plt>

LLVM IR (-O0):
define signext i8 @GetMemB(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call signext i8 @ql_readbyte(i64 %3)
ret i8 %4
}

LLVM IR (-O2):
define signext i8 @GetMemB(i64 %0) {
%2 = tail call signext i8 @ql_readbyte(i64 %0)
ret i8 %2
}
/* Type definitions */
struct refcounter {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ RC_freeObj(struct refcounter *);
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int /*<<< orphan*/ free(struct refcounter *);
void RC_free(struct refcounter *r) {
  assert(r != NULL);
  RC_freeObj(r);
  free(r);
}


x86 assembly (clang, -O0):
<RC_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x8(%rbp),%rdi
call   1050 <RC_freeObj@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RC_free>:
push   %rbx
mov    %rdi,%rbx
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
call   1040 <assert@plt>
mov    %rbx,%rdi
call   1050 <RC_freeObj@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.refcounter = type { i32 }
define void @RC_free(%struct.refcounter* %0) {
%2 = alloca %struct.refcounter*
store %struct.refcounter* %0, %struct.refcounter** %2
%3 = load %struct.refcounter*, %struct.refcounter** %2
%4 = icmp ne %struct.refcounter* %3, null
%5 = zext i1 %4 to i32
%6 = call i32 @assert(i32 %5)
%7 = load %struct.refcounter*, %struct.refcounter** %2
%8 = call i32 @RC_freeObj(%struct.refcounter* %7)
%9 = load %struct.refcounter*, %struct.refcounter** %2
%10 = call i32 @free(%struct.refcounter* %9)
ret void
}

LLVM IR (-O2):
%struct.refcounter = type { i32 }
define void @RC_free(%struct.refcounter* %0) {
%2 = icmp ne %struct.refcounter* %0, null
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = tail call i32 @RC_freeObj(%struct.refcounter* %0)
%6 = tail call i32 @free(%struct.refcounter* %0)
ret void
}
/* 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_tex_comments() {
  test_parser_verify_parse(test_parser_sourcefile("tex", " %comment"), "tex",
                           "", "%comment", 0);
}


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"tex\00"
@.str.1 = [10 x i8] c" %comment\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [9 x i8] c"%comment\00"
define void @test_tex_comments() {
%1 = call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 @test_parser_verify_parse(i32 %1, i8* getelementptr inbounds ([4 x i8], [4 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 ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 0)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"tex\00"
@.str.1 = [10 x i8] c" %comment\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [9 x i8] c"%comment\00"
define void @test_tex_comments() {
%1 = tail call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @test_parser_verify_parse(i32 %1, i8* getelementptr inbounds ([4 x i8], [4 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 ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 0)
ret void
}
float foo002(float a, float b, double c) { return (a - b * c); }


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movsd  %xmm2,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  -0x10(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
cvtss2sd %xmm0,%xmm0
cvtss2sd %xmm1,%xmm1
mulsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @foo002(float %0, float %1, double %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca double
store float %0, float* %4
store float %1, float* %5
store double %2, double* %6
%7 = load float, float* %4
%8 = fpext float %7 to double
%9 = load float, float* %5
%10 = fpext float %9 to double
%11 = load double, double* %6
%12 = fneg double %10
%13 = call double @llvm.fmuladd.f64(double %12, double %11, double %8)
%14 = fptrunc double %13 to float
ret float %14
}

LLVM IR (-O2):
define float @foo002(float %0, float %1, double %2) {
%4 = fpext float %0 to double
%5 = fpext float %1 to double
%6 = fneg double %5
%7 = tail call double @llvm.fmuladd.f64(double %6, double %2, double %4)
%8 = fptrunc double %7 to float
ret float %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  int a;
  for (a = 0; a < 2; a++) {
    int b = a;
  }
  printf("it's all good\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    1144 <main+0x34>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [15 x i8] c"it's all good\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %4
4: ; preds = %9, %0
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 2
br i1 %6, label %7, label %12
7: ; preds = %4
%8 = load i32, i32* %2
store i32 %8, i32* %3
br label %9
9: ; preds = %7
%10 = load i32, i32* %2
%11 = add nsw i32 %10, 1
store i32 %11, i32* %2
br label %4
12: ; preds = %4
%13 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [14 x i8] c"it's all good\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ FOURCC(char, char, char, char);
int /*<<< orphan*/ NodeUnRegisterClass(int /*<<< orphan*/);
void Video_Done() { NodeUnRegisterClass(FOURCC('V', 'I', 'D', 'E')); }


x86 assembly (clang, -O0):
<Video_Done>:
push   %rbp
mov    %rsp,%rbp
mov    $0x56,%edi
mov    $0x49,%esi
mov    $0x44,%edx
mov    $0x45,%ecx
call   1030 <FOURCC@plt>
mov    %eax,%edi
call   1040 <NodeUnRegisterClass@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Video_Done>:
push   %rax
mov    $0x56,%edi
mov    $0x49,%esi
mov    $0x44,%edx
mov    $0x45,%ecx
call   1030 <FOURCC@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <NodeUnRegisterClass@plt>

LLVM IR (-O0):
define void @Video_Done() {
%1 = call i32 @FOURCC(i8 signext 86, i8 signext 73, i8 signext 68, i8 signext 69)
%2 = call i32 @NodeUnRegisterClass(i32 %1)
ret void
}

LLVM IR (-O2):
define void @Video_Done() {
%1 = tail call i32 @FOURCC(i8 signext 86, i8 signext 73, i8 signext 68, i8 signext 69)
%2 = tail call i32 @NodeUnRegisterClass(i32 %1)
ret void
}
void print_char(int c) { c = 4; }


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

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

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

LLVM IR (-O2):
define void @print_char(i32 %0) {
ret void
}
void foo404() {}


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

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

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

LLVM IR (-O2):
define void @foo404() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ destroy();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void signal_callback_handler(int signum) {
  destroy();
  exit(0);
}


x86 assembly (clang, -O0):
<signal_callback_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <destroy@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<signal_callback_handler>:
push   %rax
xor    %eax,%eax
call   1030 <destroy@plt>
xor    %edi,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
define void @signal_callback_handler(i32 %0) {
%2 = tail call i32 (...) @destroy()
%3 = tail call i32 @exit(i32 0)
unreachable
}
int fixed_point2int(int x) { return x / (1 << 14); }


x86 assembly (clang, -O0):
<fixed_point2int>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x4000,%ecx
cltd
idiv   %ecx
pop    %rbp
ret

x86 assembly (clang, -O2):
<fixed_point2int>:
lea    0x3fff(%rdi),%eax
test   %edi,%edi
cmovns %edi,%eax
sar    $0xe,%eax
ret

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

LLVM IR (-O2):
define i32 @fixed_point2int(i32 %0) {
%2 = sdiv i32 %0, 16384
ret i32 %2
}
void expand(dst, c) char *dst;
int c;
{
  if (isprint(c)) {
    dst[0] = c;
    dst[1] = '\0';
  } else
    (void)sprintf(dst, "%#.3o", (unsigned int)c);
}


x86 assembly (clang, -O0):
<expand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <isprint@plt>
cmp    $0x0,%eax
je     1158 <expand+0x38>
mov    -0xc(%rbp),%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
movb   $0x0,0x1(%rax)
jmp    116d <expand+0x4d>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
lea    0xe9a(%rip),%rsi
mov    $0x0,%al
call   1040 <sprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<expand>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
mov    %esi,%edi
call   1030 <isprint@plt>
test   %eax,%eax
je     1144 <expand+0x24>
mov    %bl,(%r14)
movb   $0x0,0x1(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
lea    0xeb5(%rip),%rsi
mov    %r14,%rdi
mov    %ebx,%edx
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <sprintf@plt>

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

LLVM IR (-O2):
@.str = [6 x i8] c"%#.3o\00"
define void @expand(i8* nocapture writeonly %0, i32 %1) {
%3 = tail call i32 @isprint(i32 %1)
%4 = icmp eq i32 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = trunc i32 %1 to i8
store i8 %6, i8* %0
%7 = getelementptr inbounds i8, i8* %0, i64 1
store i8 0, i8* %7
br label %10
8: ; preds = %2
%9 = tail call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %1)
br label %10
10: ; preds = %8, %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_aws_sigv4_create_hashed_canonical_request();
int /*<<< orphan*/ test_aws_sigv4_create_signature();
int /*<<< orphan*/ test_aws_sigv4_create_string_to_sign();
int /*<<< orphan*/ test_aws_sigv4_derive_signing_key();
int main(int argc, char *argv[]) {
  test_aws_sigv4_create_hashed_canonical_request();
  test_aws_sigv4_create_string_to_sign();
  test_aws_sigv4_derive_signing_key();
  test_aws_sigv4_create_signature();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <test_aws_sigv4_create_hashed_canonical_request@plt>
xor    %eax,%eax
call   1030 <test_aws_sigv4_create_string_to_sign@plt>
xor    %eax,%eax
call   1060 <test_aws_sigv4_derive_signing_key@plt>
xor    %eax,%eax
call   1050 <test_aws_sigv4_create_signature@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @test_aws_sigv4_create_hashed_canonical_request()
%7 = call i32 (...) @test_aws_sigv4_create_string_to_sign()
%8 = call i32 (...) @test_aws_sigv4_derive_signing_key()
%9 = call i32 (...) @test_aws_sigv4_create_signature()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @test_aws_sigv4_create_hashed_canonical_request()
%4 = tail call i32 (...) @test_aws_sigv4_create_string_to_sign()
%5 = tail call i32 (...) @test_aws_sigv4_derive_signing_key()
%6 = tail call i32 (...) @test_aws_sigv4_create_signature()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ eb__dep_munny(int);
int /*<<< orphan*/ eb__display_money();
int /*<<< orphan*/ reset_total_cash();
void eb__deposit_money() {
  eb__dep_munny(6);
  eb__dep_munny(5);
  eb__dep_munny(4);
  reset_total_cash();
  eb__display_money();
}


x86 assembly (clang, -O0):
<eb__deposit_money>:
push   %rbp
mov    %rsp,%rbp
mov    $0x6,%edi
call   1050 <eb__dep_munny@plt>
mov    $0x5,%edi
call   1050 <eb__dep_munny@plt>
mov    $0x4,%edi
call   1050 <eb__dep_munny@plt>
mov    $0x0,%al
call   1040 <reset_total_cash@plt>
mov    $0x0,%al
call   1030 <eb__display_money@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<eb__deposit_money>:
push   %rax
mov    $0x6,%edi
call   1050 <eb__dep_munny@plt>
mov    $0x5,%edi
call   1050 <eb__dep_munny@plt>
mov    $0x4,%edi
call   1050 <eb__dep_munny@plt>
xor    %eax,%eax
call   1040 <reset_total_cash@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <eb__display_money@plt>

LLVM IR (-O0):
define void @eb__deposit_money() {
%1 = call i32 @eb__dep_munny(i32 6)
%2 = call i32 @eb__dep_munny(i32 5)
%3 = call i32 @eb__dep_munny(i32 4)
%4 = call i32 (...) @reset_total_cash()
%5 = call i32 (...) @eb__display_money()
ret void
}

LLVM IR (-O2):
define void @eb__deposit_money() {
%1 = tail call i32 @eb__dep_munny(i32 6)
%2 = tail call i32 @eb__dep_munny(i32 5)
%3 = tail call i32 @eb__dep_munny(i32 4)
%4 = tail call i32 (...) @reset_total_cash()
%5 = tail call i32 (...) @eb__display_money()
ret void
}
/* Variables and functions */
double fabs(double);
bool dEquality(double a, double b, double epsilon) {
  return fabs(a - b) < epsilon;
}


x86 assembly (clang, -O0):
<dEquality>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm1
subsd  -0x10(%rbp),%xmm1
movaps 0xedc(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dEquality>:
subsd  %xmm1,%xmm0
andpd  0xef4(%rip),%xmm0
xor    %eax,%eax
ucomisd %xmm0,%xmm2
seta   %al
ret

LLVM IR (-O0):
define i32 @dEquality(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %4
%8 = load double, double* %5
%9 = fsub double %7, %8
%10 = call double @llvm.fabs.f64(double %9)
%11 = load double, double* %6
%12 = fcmp olt double %10, %11
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @dEquality(double %0, double %1, double %2) {
%4 = fsub double %0, %1
%5 = tail call double @llvm.fabs.f64(double %4)
%6 = fcmp olt double %5, %2
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Type definitions */
typedef int u_int8_t;
typedef int u_int32_t;
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ write(int, int *, int);
ssize_t be_write24(int fd, u_int32_t word) {
  u_int8_t buf[3];
  buf[2] = word & 0xff;
  buf[1] = (word & 0xff00) >> 8;
  buf[0] = (word & 0xff0000) >> 16;
  return write(fd, buf, 3);
}


x86 assembly (clang, -O0):
<be_write24>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0xff,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
and    $0xff00,%eax
sar    $0x8,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
and    $0xff0000,%eax
sar    $0x10,%eax
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x14(%rbp),%rsi
mov    $0x3,%edx
call   1030 <write@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<be_write24>:
sub    $0x18,%rsp
mov    %esi,%eax
movzbl %al,%ecx
mov    %ecx,0x14(%rsp)
movzbl %ah,%ecx
mov    %ecx,0x10(%rsp)
shr    $0x10,%eax
movzbl %al,%eax
mov    %eax,0xc(%rsp)
lea    0xc(%rsp),%rsi
mov    $0x3,%edx
call   1030 <write@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @be_write24(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca [3 x i32]
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = and i32 %6, 255
%8 = getelementptr inbounds [3 x i32], [3 x i32]* %5, i64 0, i64 2
store i32 %7, i32* %8
%9 = load i32, i32* %4
%10 = and i32 %9, 65280
%11 = ashr i32 %10, 8
%12 = getelementptr inbounds [3 x i32], [3 x i32]* %5, i64 0, i64 1
store i32 %11, i32* %12
%13 = load i32, i32* %4
%14 = and i32 %13, 16711680
%15 = ashr i32 %14, 16
%16 = getelementptr inbounds [3 x i32], [3 x i32]* %5, i64 0, i64 0
store i32 %15, i32* %16
%17 = load i32, i32* %3
%18 = getelementptr inbounds [3 x i32], [3 x i32]* %5, i64 0, i64 0
%19 = call i32 @write(i32 %17, i32* %18, i32 3)
ret i32 %19
}

LLVM IR (-O2):
define i32 @be_write24(i32 %0, i32 %1) {
%3 = alloca [3 x i32]
%4 = bitcast [3 x i32]* %3 to i8*
%5 = and i32 %1, 255
%6 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 2
store i32 %5, i32* %6
%7 = lshr i32 %1, 8
%8 = and i32 %7, 255
%9 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 1
store i32 %8, i32* %9
%10 = lshr i32 %1, 16
%11 = and i32 %10, 255
%12 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
store i32 %11, i32* %12
%13 = call i32 @write(i32 %0, i32* %12, i32 3)
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ __builtin_aarch64_set_fpcr(int);
void f2(int *x) { __builtin_aarch64_set_fpcr(*x); }


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

x86 assembly (clang, -O2):
<f2>:
mov    (%rdi),%edi
jmp    1030 <__builtin_aarch64_set_fpcr@plt>

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

LLVM IR (-O2):
define void @f2(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @__builtin_aarch64_set_fpcr(i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ m2_gfx_call_handler(int);
void m2_gfx_end(void) { m2_gfx_call_handler(2); }


x86 assembly (clang, -O0):
<m2_gfx_end>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
call   1030 <m2_gfx_call_handler@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<m2_gfx_end>:
mov    $0x2,%edi
jmp    1030 <m2_gfx_call_handler@plt>

LLVM IR (-O0):
define void @m2_gfx_end() {
%1 = call i32 @m2_gfx_call_handler(i32 2)
ret void
}

LLVM IR (-O2):
define void @m2_gfx_end() {
%1 = tail call i32 @m2_gfx_call_handler(i32 2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
void addlen(size_t len, char **buf, size_t *buflen) {
  assert(len <= *buflen);
  *buf += len;
  *buflen -= len;
}


x86 assembly (clang, -O0):
<addlen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%rax
setbe  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%rcx
mov    -0x10(%rbp),%rax
add    (%rax),%rcx
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rdx
mov    -0x18(%rbp),%rax
mov    (%rax),%rcx
sub    %rdx,%rcx
mov    %rcx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<addlen>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r15
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %edi,%edi
cmp    %rbx,(%rdx)
setae  %dil
call   1030 <assert@plt>
add    %rbx,(%r14)
sub    %rbx,(%r15)
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @addlen(i64 %0, i8** %1, i64* %2) {
%4 = alloca i64
%5 = alloca i8**
%6 = alloca i64*
store i64 %0, i64* %4
store i8** %1, i8*** %5
store i64* %2, i64** %6
%7 = load i64, i64* %4
%8 = load i64*, i64** %6
%9 = load i64, i64* %8
%10 = icmp ule i64 %7, %9
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
%13 = load i64, i64* %4
%14 = load i8**, i8*** %5
%15 = load i8*, i8** %14
%16 = getelementptr inbounds i8, i8* %15, i64 %13
store i8* %16, i8** %14
%17 = load i64, i64* %4
%18 = load i64*, i64** %6
%19 = load i64, i64* %18
%20 = sub i64 %19, %17
store i64 %20, i64* %18
ret void
}

LLVM IR (-O2):
define void @addlen(i64 %0, i8** nocapture %1, i64* nocapture %2) {
%4 = load i64, i64* %2
%5 = icmp uge i64 %4, %0
%6 = zext i1 %5 to i32
%7 = tail call i32 @assert(i32 %6)
%8 = load i8*, i8** %1
%9 = getelementptr inbounds i8, i8* %8, i64 %0
store i8* %9, i8** %1
%10 = load i64, i64* %2
%11 = sub i64 %10, %0
store i64 %11, i64* %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ MS_BIND;
scalar_t__ mount(char *, char *, char *, int /*<<< orphan*/,
                 int /*<<< orphan*/ *);
int /*<<< orphan*/ perror(char *);
int main() {
  if (mount("README.md", "Readme.md", "none", MS_BIND, NULL) != 0) {
    perror("cannot mount");
  };
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eb2(%rip),%rax
mov    (%rax),%ecx
lea    0xec1(%rip),%rdi
lea    0xec4(%rip),%rsi
lea    0xec7(%rip),%rdx
xor    %eax,%eax
mov    %eax,%r8d
call   1030 <mount@plt>
cmp    $0x0,%rax
je     116d <main+0x4d>
lea    0xeb1(%rip),%rdi
call   1040 <perror@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%ecx
lea    0xecf(%rip),%rdi
lea    0xed2(%rip),%rsi
lea    0xed5(%rip),%rdx
xor    %r8d,%r8d
call   1030 <mount@plt>
test   %rax,%rax
jne    1150 <main+0x30>
xor    %eax,%eax
pop    %rcx
ret
lea    0xec2(%rip),%rdi
call   1040 <perror@plt>
jmp    114c <main+0x2c>

LLVM IR (-O0):
@.str = [10 x i8] c"README.md\00"
@.str.1 = [10 x i8] c"Readme.md\00"
@.str.2 = [5 x i8] c"none\00"
@MS_BIND = global i32 0
@.str.3 = [13 x i8] c"cannot mount\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @MS_BIND
%3 = call i64 @mount(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %2, i32* null)
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 @perror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0))
br label %7
7: ; preds = %5, %0
%8 = load i32, i32* %1
ret i32 %8
}

LLVM IR (-O2):
@.str = [10 x i8] c"README.md\00"
@.str.1 = [10 x i8] c"Readme.md\00"
@.str.2 = [5 x i8] c"none\00"
@MS_BIND = global i32 0
@.str.3 = [13 x i8] c"cannot mount\00"
define i32 @main() {
%1 = load i32, i32* @MS_BIND
%2 = tail call i64 @mount(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %1, i32* null)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %0
%5 = tail call i32 @perror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0))
br label %6
6: ; preds = %4, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char *);
int /*<<< orphan*/ strlen(char *);
void strsplit5(char *string, char sep, char *first, char *second) {
  char temp[strlen(string) + 1];
  strcpy(temp, string);
}


x86 assembly (clang, -O0):
<strsplit5>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
add    $0x1,%eax
mov    %rsp,%rcx
mov    %rcx,-0x28(%rbp)
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,%rsp
mov    %rax,-0x30(%rbp)
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x28(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strsplit5>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1040 <strlen@plt>
add    $0x1,%eax
mov    %rsp,%rdi
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rdi
mov    %rdi,%rsp
mov    %rbx,%rsi
call   1030 <strcpy@plt>
lea    -0x8(%rbp),%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @strsplit5(i8* %0, i8 signext %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i64
store i8* %0, i8** %5
store i8 %1, i8* %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%11 = load i8*, i8** %5
%12 = call i32 @strlen(i8* %11)
%13 = add nsw i32 %12, 1
%14 = zext i32 %13 to i64
%15 = call i8* @llvm.stacksave()
store i8* %15, i8** %9
%16 = alloca i8, i64 %14
store i64 %14, i64* %10
%17 = load i8*, i8** %5
%18 = call i32 @strcpy(i8* %16, i8* %17)
%19 = load i8*, i8** %9
ret void
}

LLVM IR (-O2):
define void @strsplit5(i8* %0, i8 signext %1, i8* nocapture readnone %2, i8* nocapture readnone %3) {
%5 = tail call i32 @strlen(i8* %0)
%6 = add nsw i32 %5, 1
%7 = zext i32 %6 to i64
%8 = alloca i8, i64 %7
%9 = call i32 @strcpy(i8* %8, i8* %0)
ret void
}
/* Variables and functions */
scalar_t__ bme280_read(int, unsigned char, char *, unsigned char);
int bme280_get_callib(int file, char *dig, unsigned char first,
                      unsigned char last) {
  if (bme280_read(file, first, dig, last + 1 - first)) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<bme280_get_callib>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %cl,%al
mov    %dl,%cl
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %cl,-0x11(%rbp)
mov    %al,-0x12(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x11(%rbp),%cl
mov    -0x10(%rbp),%rdx
movzbl -0x12(%rbp),%eax
add    $0x1,%eax
movzbl -0x11(%rbp),%esi
sub    %esi,%eax
movzbl %cl,%esi
movzbl %al,%ecx
call   1030 <bme280_read@plt>
cmp    $0x0,%rax
je     1161 <bme280_get_callib+0x51>
movl   $0x1,-0x4(%rbp)
jmp    1168 <bme280_get_callib+0x58>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bme280_get_callib>:
push   %rax
mov    %rsi,%rax
sub    %dl,%cl
add    $0x1,%cl
movzbl %cl,%ecx
mov    %edx,%esi
mov    %rax,%rdx
call   1030 <bme280_read@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @bme280_get_callib(i32 %0, i8* %1, i8 zeroext %2, i8 zeroext %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8
%9 = alloca i8
store i32 %0, i32* %6
store i8* %1, i8** %7
store i8 %2, i8* %8
store i8 %3, i8* %9
%10 = load i32, i32* %6
%11 = load i8, i8* %8
%12 = load i8*, i8** %7
%13 = load i8, i8* %9
%14 = zext i8 %13 to i32
%15 = add nsw i32 %14, 1
%16 = load i8, i8* %8
%17 = zext i8 %16 to i32
%18 = sub nsw i32 %15, %17
%19 = trunc i32 %18 to i8
%20 = call i64 @bme280_read(i32 %10, i8 zeroext %11, i8* %12, i8 zeroext %19)
%21 = icmp ne i64 %20, 0
br i1 %21, label %22, label %23
22: ; preds = %4
store i32 1, i32* %5
br label %24
23: ; preds = %4
store i32 0, i32* %5
br label %24
24: ; preds = %23, %22
%25 = load i32, i32* %5
ret i32 %25
}

LLVM IR (-O2):
define i32 @bme280_get_callib(i32 %0, i8* %1, i8 zeroext %2, i8 zeroext %3) {
%5 = sub i8 1, %2
%6 = add i8 %5, %3
%7 = tail call i64 @bme280_read(i32 %0, i8 zeroext %2, i8* %1, i8 zeroext %6)
%8 = icmp ne i64 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}
void gtk_table_set_col_spacing() {}


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

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

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

LLVM IR (-O2):
define void @gtk_table_set_col_spacing() {
ret void
}
int debug(const char *format, ...) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @debug(i8* nocapture readnone %0, ...) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ __emit_expression_range(int /*<<< orphan*/, char *);
const char *test_multiline_token(void) {
  __emit_expression_range(0, "foobarbaz");
}


x86 assembly (clang, -O0):
<test_multiline_token>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %edi,%edi
lea    0xedf(%rip),%rsi
call   1030 <__emit_expression_range@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_multiline_token>:
lea    0xee9(%rip),%rsi
xor    %edi,%edi
jmp    1030 <__emit_expression_range@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"foobarbaz\00"
define i8* @test_multiline_token() {
%1 = alloca i8*
%2 = call i32 @__emit_expression_range(i32 0, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%3 = load i8*, i8** %1
ret i8* %3
}

LLVM IR (-O2):
@.str = [10 x i8] c"foobarbaz\00"
define noalias i8* @test_multiline_token() {
%1 = tail call i32 @__emit_expression_range(i32 0, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret i8* undef
}
char *getmode(int m) {
  char *modes[] = {"r", "w", "w+"};
  return modes[m & 3];
}


x86 assembly (clang, -O0):
<getmode>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    0x2d22(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0x2d1f(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0x2d1c(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
and    $0x3,%eax
cltq
mov    -0x20(%rbp,%rax,8),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getmode>:
and    $0x3,%edi
lea    0xefe(%rip),%rcx
movslq (%rcx,%rdi,4),%rax
add    %rcx,%rax
ret

LLVM IR (-O0):
@.str = [2 x i8] c"r\00"
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [3 x i8] c"w+\00"
@__const.getmode.modes = [3 x i8*] [i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i32 0, i32 0)]
define i8* @getmode(i32 %0) {
%2 = alloca i32
%3 = alloca [3 x i8*]
store i32 %0, i32* %2
%4 = bitcast [3 x i8*]* %3 to i8*
%5 = load i32, i32* %2
%6 = and i32 %5, 3
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds [3 x i8*], [3 x i8*]* %3, i64 0, i64 %7
%9 = load i8*, i8** %8
ret i8* %9
}

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [3 x i8] c"w+\00"
@reltable.getmode = [3 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([2 x i8]* @.str to i64), i64 ptrtoint ([3 x i32]* @reltable.getmode to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([2 x i8]* @.str.1 to i64), i64 ptrtoint ([3 x i32]* @reltable.getmode to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str.2 to i64), i64 ptrtoint ([3 x i32]* @reltable.getmode to i64)) to i32)]
define i8* @getmode(i32 %0) {
%2 = and i32 %0, 3
%3 = zext i32 %2 to i64
%4 = shl i64 %3, 2
%5 = call i8* @llvm.load.relative.i64(i8* bitcast ([3 x i32]* @reltable.getmode to i8*), i64 %4)
ret i8* %5
}
/* Variables and functions */
int DigitalRoot(int);
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ puts(char *);
int main(int argc, char const *argv[]) {
  assert(DigitalRoot(1729) == 1);
  assert(DigitalRoot(876876) == 6);
  assert(DigitalRoot(765876346) == 7);
  puts("All assertions correct - success!");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x6c1,%edi
call   1050 <DigitalRoot@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    $0xd614c,%edi
call   1050 <DigitalRoot@plt>
cmp    $0x6,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    $0x2da6587a,%edi
call   1050 <DigitalRoot@plt>
cmp    $0x7,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
lea    0xe65(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x6c1,%edi
call   1050 <DigitalRoot@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
call   1040 <assert@plt>
mov    $0xd614c,%edi
call   1050 <DigitalRoot@plt>
xor    %edi,%edi
cmp    $0x6,%eax
sete   %dil
call   1040 <assert@plt>
mov    $0x2da6587a,%edi
call   1050 <DigitalRoot@plt>
xor    %edi,%edi
cmp    $0x7,%eax
sete   %dil
call   1040 <assert@plt>
lea    0xe80(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [34 x i8] c"All assertions correct - success!\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @DigitalRoot(i32 1729)
%7 = icmp eq i32 %6, 1
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
%10 = call i32 @DigitalRoot(i32 876876)
%11 = icmp eq i32 %10, 6
%12 = zext i1 %11 to i32
%13 = call i32 @assert(i32 %12)
%14 = call i32 @DigitalRoot(i32 765876346)
%15 = icmp eq i32 %14, 7
%16 = zext i1 %15 to i32
%17 = call i32 @assert(i32 %16)
%18 = call i32 @puts(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [34 x i8] c"All assertions correct - success!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @DigitalRoot(i32 1729)
%4 = icmp eq i32 %3, 1
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
%7 = tail call i32 @DigitalRoot(i32 876876)
%8 = icmp eq i32 %7, 6
%9 = zext i1 %8 to i32
%10 = tail call i32 @assert(i32 %9)
%11 = tail call i32 @DigitalRoot(i32 765876346)
%12 = icmp eq i32 %11, 7
%13 = zext i1 %12 to i32
%14 = tail call i32 @assert(i32 %13)
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Direct(int);
int /*<<< orphan*/ ROL8(int /*<<< orphan*/);
void Op26M1(void) { ROL8(Direct(3)); }


x86 assembly (clang, -O0):
<Op26M1>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3,%edi
call   1030 <Direct@plt>
mov    %eax,%edi
call   1040 <ROL8@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Op26M1>:
push   %rax
mov    $0x3,%edi
call   1030 <Direct@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <ROL8@plt>

LLVM IR (-O0):
define void @Op26M1() {
%1 = call i32 @Direct(i32 3)
%2 = call i32 @ROL8(i32 %1)
ret void
}

LLVM IR (-O2):
define void @Op26M1() {
%1 = tail call i32 @Direct(i32 3)
%2 = tail call i32 @ROL8(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ show();
int main() {
  printf("Invoke my so\n");
  show();
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [13 x i8] c"Invoke my so\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @show()
ret i32 0
}
void cprop_result7(int *data) {
  if (data[0])
    data[1] = 10;
  else
    data[2] = 15;
  data[3] = 26;
}


x86 assembly (clang, -O0):
<cprop_result7>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpl   $0x0,(%rax)
je     1125 <cprop_result7+0x25>
mov    -0x8(%rbp),%rax
movl   $0xa,0x4(%rax)
jmp    1130 <cprop_result7+0x30>
mov    -0x8(%rbp),%rax
movl   $0xf,0x8(%rax)
mov    -0x8(%rbp),%rax
movl   $0x1a,0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<cprop_result7>:
xor    %eax,%eax
cmpl   $0x0,(%rdi)
sete   %al
lea    (%rax,%rax,4),%ecx
add    $0xa,%ecx
mov    %ecx,0x4(%rdi,%rax,4)
movl   $0x1a,0xc(%rdi)
ret

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

LLVM IR (-O2):
define void @cprop_result7(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i64 2, i64 1
%5 = select i1 %3, i32 15, i32 10
%6 = getelementptr inbounds i32, i32* %0, i64 %4
store i32 %5, i32* %6
%7 = getelementptr inbounds i32, i32* %0, i64 3
store i32 26, i32* %7
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *translateTime(char *);
int /*<<< orphan*/ write(char *, char *, char *);
void function_est_time(char *est_time) {
  char *t = translateTime(est_time);
  write("msproject.xml", "\t<Duration>%s</Duration>\n", t);
  free(t);
}


x86 assembly (clang, -O0):
<function_est_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <translateTime@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdx
lea    0xeac(%rip),%rdi
lea    0xeb3(%rip),%rsi
call   1040 <write@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<function_est_time>:
push   %rbx
call   1050 <translateTime@plt>
mov    %rax,%rbx
lea    0xec0(%rip),%rdi
lea    0xec7(%rip),%rsi
mov    %rax,%rdx
call   1040 <write@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"msproject.xml\00"
@.str.1 = [26 x i8] c"\09<Duration>%s</Duration>\0A\00"
define void @function_est_time(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @translateTime(i8* %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = call i32 @write(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i8* %6)
%8 = load i8*, i8** %3
%9 = call i32 @free(i8* %8)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"msproject.xml\00"
@.str.1 = [26 x i8] c"\09<Duration>%s</Duration>\0A\00"
define void @function_est_time(i8* %0) {
%2 = tail call i8* @translateTime(i8* %0)
%3 = tail call i32 @write(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%4 = tail call i32 @free(i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ nopop3();
void pop3_quit(void) { nopop3(); }


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

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

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

LLVM IR (-O2):
define void @pop3_quit() {
%1 = tail call i32 (...) @nopop3()
ret void
}