xunge/DecIR huggingface dataset:
/* Type definitions */
struct token {
  int dummy;
};
struct expression {
  int dummy;
};

/* Variables and functions */
struct token *expect(struct token *, char, char *);
struct token *parse_expression(struct token *, struct expression **);
struct token *expression_statement(struct token *token,
                                   struct expression **tree) {
  token = parse_expression(token, tree);
  return expect(token, ';', "at end of statement");
}


x86 assembly (clang, -O0):
<expression_statement>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <parse_expression@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x3b,%esi
lea    0xeaf(%rip),%rdx
call   1030 <expect@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<expression_statement>:
push   %rax
call   1040 <parse_expression@plt>
lea    0xed3(%rip),%rdx
mov    %rax,%rdi
mov    $0x3b,%esi
pop    %rax
jmp    1030 <expect@plt>

LLVM IR (-O0):
%struct.token = type { i32 }
%struct.expression = type { i32 }
@.str = [20 x i8] c"at end of statement\00"
define %struct.token* @expression_statement(%struct.token* %0, %struct.expression** %1) {
%3 = alloca %struct.token*
%4 = alloca %struct.expression**
store %struct.token* %0, %struct.token** %3
store %struct.expression** %1, %struct.expression*** %4
%5 = load %struct.token*, %struct.token** %3
%6 = load %struct.expression**, %struct.expression*** %4
%7 = call %struct.token* @parse_expression(%struct.token* %5, %struct.expression** %6)
store %struct.token* %7, %struct.token** %3
%8 = load %struct.token*, %struct.token** %3
%9 = call %struct.token* @expect(%struct.token* %8, i8 signext 59, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret %struct.token* %9
}

LLVM IR (-O2):
%struct.token = type { i32 }
%struct.expression = type { i32 }
@.str = [20 x i8] c"at end of statement\00"
define %struct.token* @expression_statement(%struct.token* %0, %struct.expression** %1) {
%3 = tail call %struct.token* @parse_expression(%struct.token* %0, %struct.expression** %1)
%4 = tail call %struct.token* @expect(%struct.token* %3, i8 signext 59, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret %struct.token* %4
}
/* Variables and functions */
unsigned long atoi(char const *);
unsigned long getnum(const char *str) { return atoi(str); }


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

x86 assembly (clang, -O2):
<getnum>:
jmp    1030 <atoi@plt>

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

LLVM IR (-O2):
define i64 @getnum(i8* nocapture %0) {
%2 = tail call i64 @atoi(i8* %0)
ret i64 %2
}
unsigned Aig_ObjCutSign(unsigned ObjId) { return (1 << (ObjId & 31)); }


x86 assembly (clang, -O0):
<Aig_ObjCutSign>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
and    $0x1f,%ecx
mov    $0x1,%eax
shl    %cl,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Aig_ObjCutSign>:
mov    %edi,%ecx
mov    $0x1,%eax
shl    %cl,%eax
ret

LLVM IR (-O0):
define i32 @Aig_ObjCutSign(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 31
%5 = shl i32 1, %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @Aig_ObjCutSign(i32 %0) {
%2 = and i32 %0, 31
%3 = shl nuw i32 1, %2
ret i32 %3
}
unsigned zero_extend(unsigned val, unsigned bits) {
  return (val << ((8 * sizeof(int)) - bits)) >> ((8 * sizeof(int)) - bits);
}


x86 assembly (clang, -O0):
<zero_extend>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
mov    %ecx,%edx
mov    $0x20,%ecx
sub    %rdx,%rcx
shl    %cl,%eax
mov    -0x8(%rbp),%ecx
mov    %ecx,%edx
mov    $0x20,%ecx
sub    %rdx,%rcx
shr    %cl,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<zero_extend>:
mov    %esi,%ecx
mov    %edi,%eax
neg    %cl
shl    %cl,%eax
shr    %cl,%eax
ret

LLVM IR (-O0):
define i32 @zero_extend(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 = zext i32 %6 to i64
%8 = sub i64 32, %7
%9 = trunc i64 %8 to i32
%10 = shl i32 %5, %9
%11 = load i32, i32* %4
%12 = zext i32 %11 to i64
%13 = sub i64 32, %12
%14 = trunc i64 %13 to i32
%15 = lshr i32 %10, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @zero_extend(i32 %0, i32 %1) {
%3 = sub i32 32, %1
%4 = lshr i32 -1, %3
%5 = and i32 %4, %0
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ iscntrl(int);
void t_iscntrl_0x35() {
  Assert_real((iscntrl(53) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_iscntrl.c",
              270, ("iscntrl should be 0 for 5"));
}


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

x86 assembly (clang, -O2):
<t_iscntrl_0x35>:
push   %rax
mov    $0x35,%edi
call   1030 <iscntrl@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x10e,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_iscntrl.c\00"
@.str.1 = [26 x i8] c"iscntrl should be 0 for 5\00"
define void @t_iscntrl_0x35() {
%1 = call i64 @iscntrl(i32 53)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 270, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_iscntrl.c\00"
@.str.1 = [26 x i8] c"iscntrl should be 0 for 5\00"
define void @t_iscntrl_0x35() {
%1 = tail call i64 @iscntrl(i32 53)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 270, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void swap(void **a, void **b) {
  void *t = *a;
  *a = *b;
  *b = t;
}


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

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

LLVM IR (-O0):
define void @swap(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
%7 = load i8*, i8** %6
store i8* %7, i8** %5
%8 = load i8**, i8*** %4
%9 = load i8*, i8** %8
%10 = load i8**, i8*** %3
store i8* %9, i8** %10
%11 = load i8*, i8** %5
%12 = load i8**, i8*** %4
store i8* %11, i8** %12
ret void
}

LLVM IR (-O2):
define void @swap(i8** nocapture %0, i8** nocapture %1) {
%3 = load i8*, i8** %0
%4 = load i8*, i8** %1
store i8* %4, i8** %0
store i8* %3, i8** %1
ret void
}
/* Variables and functions */
scalar_t__ exp(double);
float gauss(float x, float sigma) {
  return (float)exp((double)((-x * x) / (2 * sigma * sigma)));
}


x86 assembly (clang, -O0):
<gauss>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mulss  -0x4(%rbp),%xmm0
movss  0xebf(%rip),%xmm1
mulss  -0x8(%rbp),%xmm1
mulss  -0x8(%rbp),%xmm1
divss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
call   1030 <exp@plt>
cvtsi2ss %rax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gauss>:
push   %rax
movaps 0xee8(%rip),%xmm2
xorps  %xmm0,%xmm2
mulss  %xmm0,%xmm2
movaps %xmm1,%xmm0
addss  %xmm1,%xmm0
mulss  %xmm1,%xmm0
divss  %xmm0,%xmm2
xorps  %xmm0,%xmm0
cvtss2sd %xmm2,%xmm0
call   1030 <exp@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @gauss(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = fneg float %5
%7 = load float, float* %3
%8 = fmul float %6, %7
%9 = load float, float* %4
%10 = fmul float 2.000000e+00, %9
%11 = load float, float* %4
%12 = fmul float %10, %11
%13 = fdiv float %8, %12
%14 = fpext float %13 to double
%15 = call i64 @exp(double %14)
%16 = sitofp i64 %15 to float
ret float %16
}

LLVM IR (-O2):
define float @gauss(float %0, float %1) {
%3 = fneg float %0
%4 = fmul float %3, %0
%5 = fmul float %1, 2.000000e+00
%6 = fmul float %5, %1
%7 = fdiv float %4, %6
%8 = fpext float %7 to double
%9 = tail call i64 @exp(double %8)
%10 = sitofp i64 %9 to float
ret float %10
}
/* Variables and functions */
int /*<<< orphan*/ test_puppet_comment_entities();
int /*<<< orphan*/ test_puppet_comments();
void all_puppet_tests() {
  test_puppet_comments();
  test_puppet_comment_entities();
}


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

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

LLVM IR (-O0):
define void @all_puppet_tests() {
%1 = call i32 (...) @test_puppet_comments()
%2 = call i32 (...) @test_puppet_comment_entities()
ret void
}

LLVM IR (-O2):
define void @all_puppet_tests() {
%1 = tail call i32 (...) @test_puppet_comments()
%2 = tail call i32 (...) @test_puppet_comment_entities()
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
uint32_t mcnet_read_uint32(uint8_t *in) {
  return (in[0] << 24) + (in[1] << 16) + (in[2] << 8) + in[3];
}


x86 assembly (clang, -O0):
<mcnet_read_uint32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
shl    $0x18,%eax
mov    -0x8(%rbp),%rcx
mov    0x4(%rcx),%ecx
shl    $0x10,%ecx
add    %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    0x8(%rcx),%ecx
shl    $0x8,%ecx
add    %ecx,%eax
mov    -0x8(%rbp),%rcx
add    0xc(%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mcnet_read_uint32>:
mov    (%rdi),%eax
mov    0x4(%rdi),%ecx
shl    $0x18,%eax
shl    $0x10,%ecx
add    %eax,%ecx
mov    0x8(%rdi),%eax
shl    $0x8,%eax
add    %ecx,%eax
add    0xc(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @mcnet_read_uint32(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 = shl i32 %5, 24
%7 = load i32*, i32** %2
%8 = getelementptr inbounds i32, i32* %7, i64 1
%9 = load i32, i32* %8
%10 = shl i32 %9, 16
%11 = add nsw i32 %6, %10
%12 = load i32*, i32** %2
%13 = getelementptr inbounds i32, i32* %12, i64 2
%14 = load i32, i32* %13
%15 = shl i32 %14, 8
%16 = add nsw i32 %11, %15
%17 = load i32*, i32** %2
%18 = getelementptr inbounds i32, i32* %17, i64 3
%19 = load i32, i32* %18
%20 = add nsw i32 %16, %19
ret i32 %20
}

LLVM IR (-O2):
define i32 @mcnet_read_uint32(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = shl i32 %2, 24
%4 = getelementptr inbounds i32, i32* %0, i64 1
%5 = load i32, i32* %4
%6 = shl i32 %5, 16
%7 = add nsw i32 %6, %3
%8 = getelementptr inbounds i32, i32* %0, i64 2
%9 = load i32, i32* %8
%10 = shl i32 %9, 8
%11 = add nsw i32 %7, %10
%12 = getelementptr inbounds i32, i32* %0, i64 3
%13 = load i32, i32* %12
%14 = add nsw i32 %11, %13
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ testcase();
int main(void) {
  int cases;
  scanf("%d", &cases);
  while (cases-- > 0)
    testcase();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x8(%rbp)
cmp    $0x0,%eax
jle    116f <main+0x3f>
mov    $0x0,%al
call   1030 <testcase@plt>
jmp    114f <main+0x1f>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    0x4(%rsp),%eax
lea    -0x1(%rax),%ecx
mov    %ecx,0x4(%rsp)
test   %eax,%eax
jle    1168 <main+0x38>
xor    %eax,%eax
call   1030 <testcase@plt>
jmp    1150 <main+0x20>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
br label %4
4: ; preds = %8, %0
%5 = load i32, i32* %2
%6 = add nsw i32 %5, -1
store i32 %6, i32* %2
%7 = icmp sgt i32 %5, 0
br i1 %7, label %8, label %10
8: ; preds = %4
%9 = call i32 (...) @testcase()
br label %4
10: ; preds = %4
%11 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = add nsw i32 %4, -1
store i32 %5, i32* %1
%6 = icmp sgt i32 %4, 0
br i1 %6, label %7, label %12
7: ; preds = %0, %7
%8 = call i32 (...) @testcase()
%9 = load i32, i32* %1
%10 = add nsw i32 %9, -1
store i32 %10, i32* %1
%11 = icmp sgt i32 %9, 0
br i1 %11, label %7, label %12
12: ; preds = %7, %0
%13 = call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
char *fdt_string(void const *, int);
scalar_t__ memcmp(char const *, char const *, int);
int strlen(char const *);
int fdt_string_eq_(const void *fdt, int stroffset, const char *s, int len) {
  const char *p = fdt_string(fdt, stroffset);
  return (strlen(p) == len) && (memcmp(p, s, len) == 0);
}


x86 assembly (clang, -O0):
<fdt_string_eq_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <fdt_string@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    -0x1c(%rbp),%ecx
mov    %al,-0x29(%rbp)
jne    1189 <fdt_string_eq_+0x59>
mov    -0x28(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1050 <memcmp@plt>
cmp    $0x0,%rax
sete   %al
mov    %al,-0x29(%rbp)
mov    -0x29(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fdt_string_eq_>:
push   %rbp
push   %r14
push   %rbx
mov    %ecx,%ebp
mov    %rdx,%r14
call   1040 <fdt_string@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    %ebp,%ecx
jne    1169 <fdt_string_eq_+0x39>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %ebp,%edx
call   1050 <memcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @fdt_string_eq_(i8* %0, i32 %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i8*
store i8* %0, i8** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%10 = load i8*, i8** %5
%11 = load i32, i32* %6
%12 = call i8* @fdt_string(i8* %10, i32 %11)
store i8* %12, i8** %9
%13 = load i8*, i8** %9
%14 = call i32 @strlen(i8* %13)
%15 = load i32, i32* %8
%16 = icmp eq i32 %14, %15
br i1 %16, label %17, label %23
17: ; preds = %4
%18 = load i8*, i8** %9
%19 = load i8*, i8** %7
%20 = load i32, i32* %8
%21 = call i64 @memcmp(i8* %18, i8* %19, i32 %20)
%22 = icmp eq i64 %21, 0
br label %23
23: ; preds = %17, %4
%24 = phi i1 [ false, %4 ], [ %22, %17 ]
%25 = zext i1 %24 to i32
ret i32 %25
}

LLVM IR (-O2):
define i32 @fdt_string_eq_(i8* %0, i32 %1, i8* %2, i32 %3) {
%5 = tail call i8* @fdt_string(i8* %0, i32 %1)
%6 = tail call i32 @strlen(i8* %5)
%7 = icmp eq i32 %6, %3
br i1 %7, label %8, label %12
8: ; preds = %4
%9 = tail call i64 @memcmp(i8* %5, i8* %2, i32 %3)
%10 = icmp eq i64 %9, 0
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %8, %4
%13 = phi i32 [ 0, %4 ], [ %11, %8 ]
ret i32 %13
}
void do_dlopen() {}


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

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

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

LLVM IR (-O2):
define void @do_dlopen() {
ret void
}
void marker(int anarg) {
  asm("    .global "
      "set_point"
      "\n"
      "set_point"
      ":\n"
      "    call "
      "func"
      "\n");
}


x86 assembly (clang, -O0):
<marker>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)

x86 assembly (clang, -O2):
<marker>:
call   1030 <func@plt>
ret

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

LLVM IR (-O2):
define void @marker(i32 %0) {
tail call void asm sideeffect " .global set_point\0Aset_point:\0A call func\0A", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
int test_imm_F6int8_mem(signed char *val) {
  return ((*val) & (0xF6 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_F6int8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edx
and    $0xf6,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_F6int8_mem>:
testb  $0xf6,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_F6int8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = and i32 %5, 246
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_F6int8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -10
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char s[32];
  scanf("%s", s);
  printf("%s\n", s);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
lea    0xed4(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1040 <scanf@plt>
lea    0xec5(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [32 x i8]
%2 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 0
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %2)
ret i32 0
}
void ScaleRowDown2Box_Odd_SSSE3() {}


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

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

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

LLVM IR (-O2):
define void @ScaleRowDown2Box_Odd_SSSE3() {
ret void
}
void img_ir_setup_raw(struct img_ir_priv *priv) {}


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

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

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

LLVM IR (-O2):
%struct.img_ir_priv = type opaque
define void @img_ir_setup_raw(%struct.img_ir_priv* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ error(char *);
void illname(void) { error("illegal symbol name"); }


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

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

LLVM IR (-O0):
@.str = [20 x i8] c"illegal symbol name\00"
define void @illname() {
%1 = call i32 @error(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"illegal symbol name\00"
define void @illname() {
%1 = tail call i32 @error(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret void
}
double get_psychroFAO(double preskPa) {
  double latenthtvap = 2.45;
  double cp = 1.013e-3;
  double molwtratio = 0.622;
  double gamma;
  gamma = (cp * preskPa) / (molwtratio * latenthtvap);
  return (gamma);
}


x86 assembly (clang, -O0):
<get_psychroFAO>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeff(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xeea(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xed5(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
mulsd  -0x10(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_psychroFAO>:
mulsd  0xef8(%rip),%xmm0
divsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @get_psychroFAO(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %2
store double 2.450000e+00, double* %3
store double 1.013000e-03, double* %4
store double 6.220000e-01, double* %5
%7 = load double, double* %4
%8 = load double, double* %2
%9 = fmul double %7, %8
%10 = load double, double* %5
%11 = load double, double* %3
%12 = fmul double %10, %11
%13 = fdiv double %9, %12
store double %13, double* %6
%14 = load double, double* %6
ret double %14
}

LLVM IR (-O2):
define double @get_psychroFAO(double %0) {
%2 = fmul double %0, 1.013000e-03
%3 = fdiv double %2, 1.523900e+00
ret double %3
}
/* Variables and functions */
unsigned long long _bextr_u64(unsigned long, unsigned int, unsigned int);
unsigned long long test_bextr_u64(unsigned long __X, unsigned int __Y,
                                  unsigned int __Z) {
  return _bextr_u64(__X, __Y, __Z);
}


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

x86 assembly (clang, -O2):
<test_bextr_u64>:
jmp    1030 <_bextr_u64@plt>

LLVM IR (-O0):
define i64 @test_bextr_u64(i64 %0, i32 %1, i32 %2) {
%4 = alloca i64
%5 = alloca i32
%6 = alloca i32
store i64 %0, i64* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i64, i64* %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i64 @_bextr_u64(i64 %7, i32 %8, i32 %9)
ret i64 %10
}

LLVM IR (-O2):
define i64 @test_bextr_u64(i64 %0, i32 %1, i32 %2) {
%4 = tail call i64 @_bextr_u64(i64 %0, i32 %1, i32 %2)
ret i64 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ fromRep16(int);
uint16_t makeInf16() { return fromRep16(0x7c00U); }


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

x86 assembly (clang, -O2):
<makeInf16>:
mov    $0x7c00,%edi
jmp    1030 <fromRep16@plt>

LLVM IR (-O0):
define i32 @makeInf16() {
%1 = call i32 @fromRep16(i32 31744)
ret i32 %1
}

LLVM IR (-O2):
define i32 @makeInf16() {
%1 = tail call i32 @fromRep16(i32 31744)
ret i32 %1
}
void convert_american_sans_slashes(void) {
  char *date_string = "10190";
  printf("%s: should be (01/01/1990) is = (%s)\n", __FUNCTION__,
         date_convert_american_sans_slashes(date_string));
}


x86 assembly (clang, -O0):
<convert_american_sans_slashes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1040 <date_convert_american_sans_slashes@plt>
mov    %eax,%edx
lea    0xebf(%rip),%rdi
lea    0xede(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<convert_american_sans_slashes>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1040 <date_convert_american_sans_slashes@plt>
lea    0xed0(%rip),%rdi
lea    0xeef(%rip),%rsi
mov    %eax,%edx
xor    %eax,%eax
pop    %rcx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"10190\00"
@.str.1 = [38 x i8] c"%s: should be (01/01/1990) is = (%s)\0A\00"
@__FUNCTION__.convert_american_sans_slashes = [30 x i8] c"convert_american_sans_slashes\00"
define void @convert_american_sans_slashes() {
%1 = alloca i8*
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8** %1
%2 = load i8*, i8** %1
%3 = call i32 (i8*, ...) bitcast (i32 (...)* @date_convert_american_sans_slashes to i32 (i8*, ...)*)(i8* %2)
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([30 x i8], [30 x i8]* @__FUNCTION__.convert_american_sans_slashes, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"10190\00"
@.str.1 = [38 x i8] c"%s: should be (01/01/1990) is = (%s)\0A\00"
@__FUNCTION__.convert_american_sans_slashes = [30 x i8] c"convert_american_sans_slashes\00"
define void @convert_american_sans_slashes() {
%1 = tail call i32 (i8*, ...) bitcast (i32 (...)* @date_convert_american_sans_slashes to i32 (i8*, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([30 x i8], [30 x i8]* @__FUNCTION__.convert_american_sans_slashes, i64 0, i64 0), i32 %1)
ret void
}
/* Variables and functions */
void foo(int);
void bar(int a) { return foo(a); }


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

x86 assembly (clang, -O2):
<bar>:
jmp    1030 <foo@plt>

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

LLVM IR (-O2):
define void @bar(i32 %0) {
tail call void @foo(i32 %0)
ret void
}
void gtk_text_buffer_insert_with_tags() {}


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

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

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

LLVM IR (-O2):
define void @gtk_text_buffer_insert_with_tags() {
ret void
}
/* Type definitions */
struct timeval {
  scalar_t__ tv_usec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
long long unsigned gettime() {
  struct timeval tv;
  gettimeofday(&tv, NULL);
  return ((long long unsigned)tv.tv_sec * 1000000UL +
          (long long unsigned)tv.tv_usec) /
         1000UL;
}


x86 assembly (clang, -O0):
<gettime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
imul   $0xf4240,-0x8(%rbp),%rax
add    -0x10(%rbp),%rax
mov    $0x3e8,%ecx
xor    %edx,%edx
div    %rcx
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gettime>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
imul   $0xf4240,0x10(%rsp),%rax
add    0x8(%rsp),%rax
shr    $0x3,%rax
movabs $0x20c49ba5e353f7cf,%rcx
9b c4 20
mul    %rcx
mov    %rdx,%rax
shr    $0x4,%rax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i64, i64 }
define i64 @gettime() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%4 = load i64, i64* %3
%5 = mul i64 %4, 1000000
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%7 = load i64, i64* %6
%8 = add i64 %5, %7
%9 = udiv i64 %8, 1000
ret i64 %9
}

LLVM IR (-O2):
%struct.timeval = type { i64, i64 }
define i64 @gettime() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%5 = load i64, i64* %4
%6 = mul i64 %5, 1000000
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%8 = load i64, i64* %7
%9 = add i64 %6, %8
%10 = udiv i64 %9, 1000
ret i64 %10
}
/* Variables and functions */
scalar_t__ isspace(char);
char tolower(char);
void tolowerString(char *s) {
  for (; ((*s != 0) || isspace(*s)); s++)
    *s = tolower(*s);
  return;
}


x86 assembly (clang, -O0):
<tolowerString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
jne    1157 <tolowerString+0x37>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1167 <tolowerString+0x47>
jmp    118c <tolowerString+0x6c>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1040 <tolower@plt>
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    112c <tolowerString+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tolowerString>:
push   %rbx
mov    %rdi,%rbx
jmp    113e <tolowerString+0x1e>
cs nopw 0x0(%rax,%rax,1)
movsbl %al,%edi
call   1040 <tolower@plt>
mov    %al,(%rbx)
add    $0x1,%rbx
movzbl (%rbx),%eax
test   %al,%al
jne    1130 <tolowerString+0x10>
xor    %edi,%edi
call   1030 <isspace@plt>
test   %rax,%rax
je     1156 <tolowerString+0x36>
movzbl (%rbx),%eax
jmp    1130 <tolowerString+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @tolowerString(i8* nocapture %0) {
br label %2
2: ; preds = %11, %1
%3 = phi i8* [ %0, %1 ], [ %14, %11 ]
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 0
br i1 %5, label %6, label %11
6: ; preds = %2
%7 = tail call i64 @isspace(i8 signext 0)
%8 = icmp eq i64 %7, 0
br i1 %8, label %15, label %9
9: ; preds = %6
%10 = load i8, i8* %3
br label %11
11: ; preds = %9, %2
%12 = phi i8 [ %10, %9 ], [ %4, %2 ]
%13 = tail call signext i8 @tolower(i8 signext %12)
store i8 %13, i8* %3
%14 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
15: ; preds = %6
ret void
}
void cealtesthook_input_iter_next() {}


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

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

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

LLVM IR (-O2):
define void @cealtesthook_input_iter_next() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ FLSMBusGPIO_sendMBus8bit(int, int);
void FLSMBusGPIO_sleep() { FLSMBusGPIO_sendMBus8bit(0x01, 0x00000000); }


x86 assembly (clang, -O0):
<FLSMBusGPIO_sleep>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
xor    %esi,%esi
call   1030 <FLSMBusGPIO_sendMBus8bit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<FLSMBusGPIO_sleep>:
mov    $0x1,%edi
xor    %esi,%esi
jmp    1030 <FLSMBusGPIO_sendMBus8bit@plt>

LLVM IR (-O0):
define void @FLSMBusGPIO_sleep() {
%1 = call i32 @FLSMBusGPIO_sendMBus8bit(i32 1, i32 0)
ret void
}

LLVM IR (-O2):
define void @FLSMBusGPIO_sleep() {
%1 = tail call i32 @FLSMBusGPIO_sendMBus8bit(i32 1, i32 0)
ret void
}
signed int quadric_bbox(void *obj, struct anon$0 *min, struct anon$0 *max) {
  return 0;
}


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

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

LLVM IR (-O0):
%"struct.anon$0" = type opaque
define i32 @quadric_bbox(i8* %0, %"struct.anon$0"* %1, %"struct.anon$0"* %2) {
%4 = alloca i8*
%5 = alloca %"struct.anon$0"*
%6 = alloca %"struct.anon$0"*
store i8* %0, i8** %4
store %"struct.anon$0"* %1, %"struct.anon$0"** %5
store %"struct.anon$0"* %2, %"struct.anon$0"** %6
ret i32 0
}

LLVM IR (-O2):
%"struct.anon$0" = type opaque
define i32 @quadric_bbox(i8* nocapture readnone %0, %"struct.anon$0"* nocapture readnone %1, %"struct.anon$0"* nocapture readnone %2) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ print_at(char *, int, int);
void print(char *message) { print_at(message, -1, -1); }


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

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

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

LLVM IR (-O2):
define void @print(i8* %0) {
%2 = tail call i32 @print_at(i8* %0, i32 -1, i32 -1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;
struct buf {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ buf_concat(struct buf *, int /*<<< orphan*/);
int /*<<< orphan*/ put_utf8(char *, int /*<<< orphan*/);
void buf_append(struct buf *b, wchar_t wch) {
  char t[5];
  buf_concat(b, put_utf8(t, wch));
}


x86 assembly (clang, -O0):
<buf_append>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
lea    -0x11(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <put_utf8@plt>
mov    -0x20(%rbp),%rdi
mov    %eax,%esi
call   1040 <buf_concat@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<buf_append>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
lea    0xb(%rsp),%rdi
call   1030 <put_utf8@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <buf_concat@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.buf = type { i32 }
define void @buf_append(%struct.buf* %0, i32 %1) {
%3 = alloca %struct.buf*
%4 = alloca i32
%5 = alloca [5 x i8]
store %struct.buf* %0, %struct.buf** %3
store i32 %1, i32* %4
%6 = load %struct.buf*, %struct.buf** %3
%7 = getelementptr inbounds [5 x i8], [5 x i8]* %5, i64 0, i64 0
%8 = load i32, i32* %4
%9 = call i32 @put_utf8(i8* %7, i32 %8)
%10 = call i32 @buf_concat(%struct.buf* %6, i32 %9)
ret void
}

LLVM IR (-O2):
%struct.buf = type { i32 }
define void @buf_append(%struct.buf* %0, i32 %1) {
%3 = alloca [5 x i8]
%4 = getelementptr inbounds [5 x i8], [5 x i8]* %3, i64 0, i64 0
%5 = call i32 @put_utf8(i8* %4, i32 %1)
%6 = call i32 @buf_concat(%struct.buf* %0, i32 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, char *);
int verify(char *, char *);
int authenticate(char *username, char *password) {
  int authenticated;
  char buffer[1024];
  authenticated = verify(username, password);
  if (authenticated == 0) {
    sprintf(buffer, "Failed for user %s\n", username);
  }
  return authenticated;
}


x86 assembly (clang, -O0):
<authenticate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x420,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <verify@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    1164 <authenticate+0x44>
lea    -0x420(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xea1(%rip),%rsi
call   1040 <sprintf@plt>
mov    -0x14(%rbp),%eax
add    $0x420,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<authenticate>:
push   %rbp
push   %rbx
sub    $0x408,%rsp
mov    %rdi,%rbx
call   1030 <verify@plt>
mov    %eax,%ebp
test   %eax,%eax
jne    1149 <authenticate+0x29>
lea    0xec2(%rip),%rsi
mov    %rsp,%rdi
mov    %rbx,%rdx
call   1040 <sprintf@plt>
mov    %ebp,%eax
add    $0x408,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [20 x i8] c"Failed for user %s\0A\00"
define i32 @authenticate(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
%6 = alloca [1024 x i8]
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = load i8*, i8** %4
%9 = call i32 @verify(i8* %7, i8* %8)
store i32 %9, i32* %5
%10 = load i32, i32* %5
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %16
12: ; preds = %2
%13 = getelementptr inbounds [1024 x i8], [1024 x i8]* %6, i64 0, i64 0
%14 = load i8*, i8** %3
%15 = call i32 @sprintf(i8* %13, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %14)
br label %16
16: ; preds = %12, %2
%17 = load i32, i32* %5
ret i32 %17
}

LLVM IR (-O2):
@.str = [20 x i8] c"Failed for user %s\0A\00"
define i32 @authenticate(i8* %0, i8* %1) {
%3 = alloca [1024 x i8]
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%5 = tail call i32 @verify(i8* %0, i8* %1)
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %9
9: ; preds = %7, %2
ret i32 %5
}
int test_imm_D9int32_reg(int val) { return ((val) & (0xD9 << 0)) ? -20 : -40; }


x86 assembly (clang, -O0):
<test_imm_D9int32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0xd9,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_D9int32_reg>:
test   $0xd9,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_D9int32_reg(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 217
%5 = icmp ne i32 %4, 0
%6 = zext i1 %5 to i64
%7 = select i1 %5, i32 -20, i32 -40
ret i32 %7
}

LLVM IR (-O2):
define i32 @test_imm_D9int32_reg(i32 %0) {
%2 = and i32 %0, 217
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void mhl_unpowered_notify_devcap_read_done(void) {}


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

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

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

LLVM IR (-O2):
define void @mhl_unpowered_notify_devcap_read_done() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ mmask_t;

/* Variables and functions */
int ALL_MOUSE_EVENTS;
int REPORT_MOUSE_POSITION;
int /*<<< orphan*/ TRUE;
int /*<<< orphan*/ cbreak();
int /*<<< orphan*/ keypad(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ mousemask(int, int /*<<< orphan*/ *);
int /*<<< orphan*/ noecho();
int /*<<< orphan*/ stdscr;
void setup() {
  mmask_t old;
  noecho();
  cbreak();
  keypad(stdscr, TRUE);
  mousemask(ALL_MOUSE_EVENTS | REPORT_MOUSE_POSITION, &old);
}


x86 assembly (clang, -O0):
<setup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <noecho@plt>
mov    $0x0,%al
call   1030 <cbreak@plt>
mov    0x2e83(%rip),%rax
mov    (%rax),%edi
mov    0x2e72(%rip),%rax
mov    (%rax),%esi
call   1050 <keypad@plt>
mov    0x2e74(%rip),%rax
mov    (%rax),%edi
mov    0x2e4b(%rip),%rax
or     (%rax),%edi
lea    -0x4(%rbp),%rsi
call   1040 <mousemask@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setup>:
push   %rax
xor    %eax,%eax
call   1060 <noecho@plt>
xor    %eax,%eax
call   1030 <cbreak@plt>
mov    0x2e8a(%rip),%rax
mov    (%rax),%edi
mov    0x2e79(%rip),%rax
mov    (%rax),%esi
call   1050 <keypad@plt>
mov    0x2e7b(%rip),%rax
mov    0x2e54(%rip),%rcx
mov    (%rcx),%edi
or     (%rax),%edi
lea    0x4(%rsp),%rsi
call   1040 <mousemask@plt>
pop    %rax
ret

LLVM IR (-O0):
@stdscr = global i32 0
@TRUE = global i32 0
@ALL_MOUSE_EVENTS = global i32 0
@REPORT_MOUSE_POSITION = global i32 0
define void @setup() {
%1 = alloca i32
%2 = call i32 (...) @noecho()
%3 = call i32 (...) @cbreak()
%4 = load i32, i32* @stdscr
%5 = load i32, i32* @TRUE
%6 = call i32 @keypad(i32 %4, i32 %5)
%7 = load i32, i32* @ALL_MOUSE_EVENTS
%8 = load i32, i32* @REPORT_MOUSE_POSITION
%9 = or i32 %7, %8
%10 = call i32 @mousemask(i32 %9, i32* %1)
ret void
}

LLVM IR (-O2):
@stdscr = global i32 0
@TRUE = global i32 0
@ALL_MOUSE_EVENTS = global i32 0
@REPORT_MOUSE_POSITION = global i32 0
define void @setup() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (...) @noecho()
%4 = tail call i32 (...) @cbreak()
%5 = load i32, i32* @stdscr
%6 = load i32, i32* @TRUE
%7 = tail call i32 @keypad(i32 %5, i32 %6)
%8 = load i32, i32* @ALL_MOUSE_EVENTS
%9 = load i32, i32* @REPORT_MOUSE_POSITION
%10 = or i32 %9, %8
%11 = call i32 @mousemask(i32 %10, i32* %1)
ret void
}
/* Variables and functions */
int *create_p();
void malloc_interproc_no_free_bad() { int *p = create_p(); }


x86 assembly (clang, -O0):
<malloc_interproc_no_free_bad>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <create_p@plt>
mov    %rax,-0x8(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @malloc_interproc_no_free_bad() {
%1 = alloca i32*
%2 = call i32* (...) @create_p()
store i32* %2, i32** %1
ret void
}

LLVM IR (-O2):
define void @malloc_interproc_no_free_bad() {
%1 = tail call i32* (...) @create_p()
ret void
}
/* Variables and functions */
scalar_t__ _gettemp(char *, int *, int);
char *bsd_mkdtemp(char *path) {
  return (_gettemp(path, (int *)NULL, 1) ? path : (char *)NULL);
}


x86 assembly (clang, -O0):
<bsd_mkdtemp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0x1,%edx
call   1030 <_gettemp@plt>
cmp    $0x0,%rax
je     1145 <bsd_mkdtemp+0x35>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    1150 <bsd_mkdtemp+0x40>
xor    %eax,%eax
mov    %rax,-0x10(%rbp)
jmp    1150 <bsd_mkdtemp+0x40>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bsd_mkdtemp>:
push   %rbx
mov    %rdi,%rbx
xor    %esi,%esi
mov    $0x1,%edx
call   1030 <_gettemp@plt>
test   %rax,%rax
cmovne %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @bsd_mkdtemp(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @_gettemp(i8* %3, i32* null, i32 1)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = load i8*, i8** %2
br label %9
8: ; preds = %1
br label %9
9: ; preds = %8, %6
%10 = phi i8* [ %7, %6 ], [ null, %8 ]
ret i8* %10
}

LLVM IR (-O2):
define i8* @bsd_mkdtemp(i8* %0) {
%2 = tail call i64 @_gettemp(i8* %0, i32* null, i32 1)
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i8* null, i8* %0
ret i8* %4
}
int block(void) {
  int i = 99;
  {
    double i = 1.1;
    double f = 2.2;
    {
      const char *i = "stuff";
      const char *f = "foo";
      const char *b = "bar";
      return 0;
    }
  }
}


x86 assembly (clang, -O0):
<block>:
push   %rbp
mov    %rsp,%rbp
movl   $0x63,-0x4(%rbp)
movsd  0xef5(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xee0(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
lea    0xee4(%rip),%rax
mov    %rax,-0x20(%rbp)
lea    0xedf(%rip),%rax
mov    %rax,-0x28(%rbp)
lea    0xed8(%rip),%rax
mov    %rax,-0x30(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [6 x i8] c"stuff\00"
@.str.1 = [4 x i8] c"foo\00"
@.str.2 = [4 x i8] c"bar\00"
define i32 @block() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i32 99, i32* %1
store double 1.100000e+00, double* %2
store double 2.200000e+00, double* %3
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8** %4
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8** %5
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8** %6
ret i32 0
}

LLVM IR (-O2):
define i32 @block() {
ret i32 0
}