xunge/DecIR huggingface dataset:
unsigned int get_arg_length(const char *arg_str) {
  unsigned int i;
  for (i = 0; *arg_str != ',' && *arg_str != 0; ++i)
    ++arg_str;
  return i;
}


x86 assembly (clang, -O0):
<get_arg_length>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x2c,%ecx
mov    %al,-0xd(%rbp)
je     1134 <get_arg_length+0x34>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    1144 <get_arg_length+0x44>
jmp    115e <get_arg_length+0x5e>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <get_arg_length+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_arg_length>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rdi,%rax,1),%ecx
test   %cl,%cl
je     1123 <get_arg_length+0x23>
cmp    $0x2c,%cl
je     1123 <get_arg_length+0x23>
add    $0x1,%rax
jmp    1110 <get_arg_length+0x10>
ret

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

LLVM IR (-O2):
define i32 @get_arg_length(i8* nocapture %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i8* [ %0, %1 ], [ %7, %6 ]
%4 = phi i32 [ 0, %1 ], [ %8, %6 ]
%5 = load i8, i8* %3
switch i8 %5, label %6 [
i8 44, label %9
i8 0, label %9
]
6: ; preds = %2
%7 = getelementptr inbounds i8, i8* %3, i64 1
%8 = add i32 %4, 1
br label %2
9: ; preds = %2, %2
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ ft_putchar(char);
int /*<<< orphan*/ union2(char *, char *);
int main(int ac, char **av) {
  if (ac == 3) {
    union2(av[1], av[2]);
  }
  ft_putchar('\n');
  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)
cmpl   $0x3,-0x8(%rbp)
jne    1155 <main+0x35>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rsi
call   1040 <union2@plt>
mov    $0xa,%edi
call   1030 <ft_putchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x3,%edi
jne    1133 <main+0x13>
mov    0x8(%rsi),%rdi
mov    0x10(%rsi),%rsi
call   1040 <union2@plt>
mov    $0xa,%edi
call   1030 <ft_putchar@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 = load i32, i32* %4
%7 = icmp eq i32 %6, 3
br i1 %7, label %8, label %16
8: ; preds = %2
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = load i8**, i8*** %5
%13 = getelementptr inbounds i8*, i8** %12, i64 2
%14 = load i8*, i8** %13
%15 = call i32 @union2(i8* %11, i8* %14)
br label %16
16: ; preds = %8, %2
%17 = call i32 @ft_putchar(i8 signext 10)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 3
br i1 %3, label %4, label %10
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = getelementptr inbounds i8*, i8** %1, i64 2
%8 = load i8*, i8** %7
%9 = tail call i32 @union2(i8* %6, i8* %8)
br label %10
10: ; preds = %4, %2
%11 = tail call i32 @ft_putchar(i8 signext 10)
ret i32 0
}
/* 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_smalltalk_comments() {
  test_parser_verify_parse(
      test_parser_sourcefile("smalltalk", " \"comment\\\""), "smalltalk", "",
      "\"comment\\\"", 0);
}


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

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

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

LLVM IR (-O2):
@.str = [10 x i8] c"smalltalk\00"
@.str.1 = [12 x i8] c" \22comment\\\22\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [11 x i8] c"\22comment\\\22\00"
define void @test_smalltalk_comments() {
%1 = tail call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @test_parser_verify_parse(i32 %1, i8* getelementptr inbounds ([10 x i8], [10 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 ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void imprimeCrucigrama() { printf("Imprime un crucigrama\n"); }


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

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

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

LLVM IR (-O2):
@str = [22 x i8] c"Imprime un crucigrama\00"
define void @imprimeCrucigrama() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int PAPI_write(int, long long *);
void papif_write(int *EventSet, long long *values, int *check) {
  *check = PAPI_write(*EventSet, values);
}


x86 assembly (clang, -O0):
<papif_write>:
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    (%rax),%edi
mov    -0x10(%rbp),%rsi
call   1030 <PAPI_write@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<papif_write>:
push   %rbx
mov    %rdx,%rbx
mov    (%rdi),%edi
call   1030 <PAPI_write@plt>
mov    %eax,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @papif_write(i32* nocapture %0, i64* %1, i32* nocapture writeonly %2) {
%4 = load i32, i32* %0
%5 = tail call i32 @PAPI_write(i32 %4, i64* %1)
store i32 %5, i32* %2
ret void
}
int f(int a, int b) {
  int x = b;
  int y = x + 1;
  return a;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @f(i32 returned %0, i32 %1) {
ret i32 %0
}
/* Type definitions */
struct timeval {
  int tv_usec;
  int tv_sec;
};

/* Variables and functions */
scalar_t__ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
unsigned long get_tick_count(void) {
  struct timeval tv;
  if (gettimeofday(&tv, NULL))
    return 0;
  return tv.tv_usec / 1000 + tv.tv_sec * 1000;
}


x86 assembly (clang, -O0):
<get_tick_count>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
cmp    $0x0,%rax
je     113c <get_tick_count+0x2c>
movq   $0x0,-0x8(%rbp)
jmp    1156 <get_tick_count+0x46>
mov    -0x10(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
imul   $0x3e8,-0xc(%rbp),%ecx
add    %ecx,%eax
cltq
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_tick_count>:
push   %rbx
sub    $0x10,%rsp
xor    %ebx,%ebx
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
test   %rax,%rax
jne    1153 <get_tick_count+0x43>
movslq 0x8(%rsp),%rax
imul   $0x10624dd3,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x26,%rax
add    %ecx,%eax
movslq 0xc(%rsp),%rcx
imul   $0x3e8,%rcx,%rcx
movslq %eax,%rbx
add    %rcx,%rbx
mov    %rbx,%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i32 }
define i64 @get_tick_count() {
%1 = alloca i64
%2 = alloca %struct.timeval
%3 = call i64 @gettimeofday(%struct.timeval* %2, i32* null)
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %0
store i64 0, i64* %1
br label %15
6: ; preds = %0
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i32 0, i32 0
%8 = load i32, i32* %7
%9 = sdiv i32 %8, 1000
%10 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i32 0, i32 1
%11 = load i32, i32* %10
%12 = mul nsw i32 %11, 1000
%13 = add nsw i32 %9, %12
%14 = sext i32 %13 to i64
store i64 %14, i64* %1
br label %15
15: ; preds = %6, %5
%16 = load i64, i64* %1
ret i64 %16
}

LLVM IR (-O2):
%struct.timeval = type { i32, i32 }
define i64 @get_tick_count() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i64 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %14
5: ; preds = %0
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%7 = load i32, i32* %6
%8 = sdiv i32 %7, 1000
%9 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%10 = load i32, i32* %9
%11 = mul nsw i32 %10, 1000
%12 = add nsw i32 %11, %8
%13 = sext i32 %12 to i64
br label %14
14: ; preds = %0, %5
%15 = phi i64 [ %13, %5 ], [ 0, %0 ]
ret i64 %15
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int mysigHandler(int signo) { printf("I caught the signal %d\n", signo); }


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

x86 assembly (clang, -O2):
<mysigHandler>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"I caught the signal %d\0A\00"
define i32 @mysigHandler(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = load i32, i32* %2
ret i32 %6
}

LLVM IR (-O2):
@.str = [24 x i8] c"I caught the signal %d\0A\00"
define i32 @mysigHandler(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i32 undef
}
/* Variables and functions */
scalar_t__ acoshf(float);
int /*<<< orphan*/ link_failure_acoshf();
void test_acoshf(float f) {
  if (acoshf(f) != acoshf(f))
    link_failure_acoshf();
}


x86 assembly (clang, -O0):
<test_acoshf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1040 <acoshf@plt>
mov    %rax,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
call   1040 <acoshf@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
cmp    %rcx,%rax
je     115c <test_acoshf+0x3c>
mov    $0x0,%al
call   1030 <link_failure_acoshf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_acoshf>:
push   %rbx
sub    $0x10,%rsp
movss  %xmm0,0xc(%rsp)
call   1040 <acoshf@plt>
mov    %rax,%rbx
movss  0xc(%rsp),%xmm0
call   1040 <acoshf@plt>
cmp    %rax,%rbx
jne    1149 <test_acoshf+0x29>
add    $0x10,%rsp
pop    %rbx
ret
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
jmp    1030 <link_failure_acoshf@plt>

LLVM IR (-O0):
define void @test_acoshf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call i64 @acoshf(float %3)
%5 = load float, float* %2
%6 = call i64 @acoshf(float %5)
%7 = icmp ne i64 %4, %6
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 (...) @link_failure_acoshf()
br label %10
10: ; preds = %8, %1
ret void
}

LLVM IR (-O2):
define void @test_acoshf(float %0) {
%2 = tail call i64 @acoshf(float %0)
%3 = tail call i64 @acoshf(float %0)
%4 = icmp eq i64 %2, %3
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 (...) @link_failure_acoshf()
br label %7
7: ; preds = %5, %1
ret void
}
/* Type definitions */
struct __test_metadata {
  int dummy;
};
struct __fixture_variant_metadata {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ epoll9(struct __test_metadata *);
void wrapper_epoll9(struct __test_metadata *_metadata,
                    struct __fixture_variant_metadata *variant) {
  epoll9(_metadata);
}


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

x86 assembly (clang, -O2):
<wrapper_epoll9>:
jmp    1030 <epoll9@plt>

LLVM IR (-O0):
%struct.__test_metadata = type { i32 }
%struct.__fixture_variant_metadata = type { i32 }
define void @wrapper_epoll9(%struct.__test_metadata* %0, %struct.__fixture_variant_metadata* %1) {
%3 = alloca %struct.__test_metadata*
%4 = alloca %struct.__fixture_variant_metadata*
store %struct.__test_metadata* %0, %struct.__test_metadata** %3
store %struct.__fixture_variant_metadata* %1, %struct.__fixture_variant_metadata** %4
%5 = load %struct.__test_metadata*, %struct.__test_metadata** %3
%6 = call i32 @epoll9(%struct.__test_metadata* %5)
ret void
}

LLVM IR (-O2):
%struct.__test_metadata = type { i32 }
%struct.__fixture_variant_metadata = type { i32 }
define void @wrapper_epoll9(%struct.__test_metadata* %0, %struct.__fixture_variant_metadata* nocapture readnone %1) {
%3 = tail call i32 @epoll9(%struct.__test_metadata* %0)
ret void
}
/* Variables and functions */
int getpid();
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  printf("%d\n", getpid());
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <getpid@plt>
lea    0xed1(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @getpid()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void sigsegv_handler(int sig) { printf("get sigsegv signals\n"); }


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

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

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

LLVM IR (-O2):
@str = [20 x i8] c"get sigsegv signals\00"
define void @sigsegv_handler(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret void
}
int test11(int x) { return x / 10 >= 2; }


x86 assembly (clang, -O0):
<test11>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
cmp    $0x2,%eax
setge  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test11>:
xor    %eax,%eax
cmp    $0x14,%edi
setge  %al
ret

LLVM IR (-O0):
define i32 @test11(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sdiv i32 %3, 10
%5 = icmp sge i32 %4, 2
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @test11(i32 %0) {
%2 = icmp sgt i32 %0, 19
%3 = zext i1 %2 to i32
ret i32 %3
}
void handle_pabt(void) { return; }


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

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

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

LLVM IR (-O2):
define void @handle_pabt() {
ret void
}
/* Type definitions */
struct dirent64 {
  int dummy;
};
typedef int /*<<< orphan*/ DIR;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
struct dirent64 *__readdir64(DIR *dirp) {
  __set_errno(ENOSYS);
  return NULL;
}


x86 assembly (clang, -O0):
<__readdir64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__readdir64>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.dirent64 = type { i32 }
@ENOSYS = global i32 0
define %struct.dirent64* @__readdir64(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32, i32* @ENOSYS
%4 = call i32 @__set_errno(i32 %3)
ret %struct.dirent64* null
}

LLVM IR (-O2):
%struct.dirent64 = type { i32 }
@ENOSYS = global i32 0
define noalias %struct.dirent64* @__readdir64(i32* nocapture readnone %0) {
%2 = load i32, i32* @ENOSYS
%3 = tail call i32 @__set_errno(i32 %2)
ret %struct.dirent64* null
}
void kgsl_cffdump_open(struct kgsl_device *device) { return; }


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

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

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

LLVM IR (-O2):
%struct.kgsl_device = type opaque
define void @kgsl_cffdump_open(%struct.kgsl_device* nocapture %0) {
ret void
}
/* Variables and functions */
float min(float, float);
float mymin3(float a, float b, float c) { return min(c, min(a, b)); }


x86 assembly (clang, -O0):
<mymin3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
call   1030 <min@plt>
movaps %xmm0,%xmm1
movss  -0x10(%rbp),%xmm0
call   1030 <min@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mymin3>:
push   %rax
movss  %xmm2,0x4(%rsp)
call   1030 <min@plt>
movaps %xmm0,%xmm1
movss  0x4(%rsp),%xmm0
pop    %rax
jmp    1030 <min@plt>

LLVM IR (-O0):
define float @mymin3(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %6
%8 = load float, float* %4
%9 = load float, float* %5
%10 = call float @min(float %8, float %9)
%11 = call float @min(float %7, float %10)
ret float %11
}

LLVM IR (-O2):
define float @mymin3(float %0, float %1, float %2) {
%4 = tail call float @min(float %0, float %1)
%5 = tail call float @min(float %2, float %4)
ret float %5
}
/* Variables and functions */
int /*<<< orphan*/ link_failure_logbf();
scalar_t__ logbf(float);
void test_logbf(float f) {
  if (logbf(f) != logbf(f))
    link_failure_logbf();
}


x86 assembly (clang, -O0):
<test_logbf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1040 <logbf@plt>
mov    %rax,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
call   1040 <logbf@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
cmp    %rcx,%rax
je     115c <test_logbf+0x3c>
mov    $0x0,%al
call   1030 <link_failure_logbf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_logbf>:
push   %rbx
sub    $0x10,%rsp
movss  %xmm0,0xc(%rsp)
call   1040 <logbf@plt>
mov    %rax,%rbx
movss  0xc(%rsp),%xmm0
call   1040 <logbf@plt>
cmp    %rax,%rbx
jne    1149 <test_logbf+0x29>
add    $0x10,%rsp
pop    %rbx
ret
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
jmp    1030 <link_failure_logbf@plt>

LLVM IR (-O0):
define void @test_logbf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call i64 @logbf(float %3)
%5 = load float, float* %2
%6 = call i64 @logbf(float %5)
%7 = icmp ne i64 %4, %6
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 (...) @link_failure_logbf()
br label %10
10: ; preds = %8, %1
ret void
}

LLVM IR (-O2):
define void @test_logbf(float %0) {
%2 = tail call i64 @logbf(float %0)
%3 = tail call i64 @logbf(float %0)
%4 = icmp eq i64 %2, %3
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 (...) @link_failure_logbf()
br label %7
7: ; preds = %5, %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fread(void *, int, size_t, int /*<<< orphan*/ *);
int host_flash_read(void *buf, size_t max, void *handle) {
  FILE *file;
  file = (FILE *)handle;
  return fread(buf, 1, max, file);
}


x86 assembly (clang, -O0):
<host_flash_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x1,%esi
call   1030 <fread@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<host_flash_read>:
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    $0x1,%esi
jmp    1030 <fread@plt>

LLVM IR (-O0):
define i32 @host_flash_read(i8* %0, i64 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i8*
%7 = alloca i32*
store i8* %0, i8** %4
store i64 %1, i64* %5
store i8* %2, i8** %6
%8 = load i8*, i8** %6
%9 = bitcast i8* %8 to i32*
store i32* %9, i32** %7
%10 = load i8*, i8** %4
%11 = load i64, i64* %5
%12 = load i32*, i32** %7
%13 = call i32 @fread(i8* %10, i32 1, i64 %11, i32* %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @host_flash_read(i8* nocapture %0, i64 %1, i8* nocapture %2) {
%4 = bitcast i8* %2 to i32*
%5 = tail call i32 @fread(i8* %0, i32 1, i64 %1, i32* %4)
ret i32 %5
}
int test_imm_29int16_mem(short *val) {
  return ((*val) & (-0x29 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_29int16_mem>:
movzwl (%rdi),%eax
test   $0xffd7,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_29int16_mem(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
%5 = sext i16 %4 to i32
%6 = and i32 %5, -41
%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_29int16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -41
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int test_imm_50uint32_mem(unsigned int *val) {
  return ((*val) & (0x50 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_50uint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 80
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int test_imm_37uint8_mem(unsigned char *val) {
  return ((*val) & (-0x37 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_37uint8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = and i32 %5, -55
%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_37uint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -55
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
scalar_t__ malloc(int);
float *six(const int *x) {
  float *p = (float *)malloc(sizeof(float));
  *p = (float)(*x);
  return p;
}


x86 assembly (clang, -O0):
<six>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x4,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cvtsi2ssl (%rax),%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<six>:
push   %rbx
mov    %rdi,%rbx
mov    $0x4,%edi
call   1030 <malloc@plt>
cvtsi2ssl (%rbx),%xmm0
movss  %xmm0,(%rax)
pop    %rbx
ret

LLVM IR (-O0):
define float* @six(i32* %0) {
%2 = alloca i32*
%3 = alloca float*
store i32* %0, i32** %2
%4 = call i64 @malloc(i32 4)
%5 = inttoptr i64 %4 to float*
store float* %5, float** %3
%6 = load i32*, i32** %2
%7 = load i32, i32* %6
%8 = sitofp i32 %7 to float
%9 = load float*, float** %3
store float %8, float* %9
%10 = load float*, float** %3
ret float* %10
}

LLVM IR (-O2):
define float* @six(i32* nocapture %0) {
%2 = tail call i64 @malloc(i32 4)
%3 = inttoptr i64 %2 to float*
%4 = load i32, i32* %0
%5 = sitofp i32 %4 to float
store float %5, float* %3
ret float* %3
}
/* Type definitions */
struct fb_info {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ kfree(struct fb_info *);
void framebuffer_release(struct fb_info *info) { kfree(info); }


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

x86 assembly (clang, -O2):
<framebuffer_release>:
jmp    1030 <kfree@plt>

LLVM IR (-O0):
%struct.fb_info = type { i32 }
define void @framebuffer_release(%struct.fb_info* %0) {
%2 = alloca %struct.fb_info*
store %struct.fb_info* %0, %struct.fb_info** %2
%3 = load %struct.fb_info*, %struct.fb_info** %2
%4 = call i32 @kfree(%struct.fb_info* %3)
ret void
}

LLVM IR (-O2):
%struct.fb_info = type { i32 }
define void @framebuffer_release(%struct.fb_info* %0) {
%2 = tail call i32 @kfree(%struct.fb_info* %0)
ret void
}
int odd(int n) {
  if (n > 1 && n % 2 == 0)
    n--;
  return n;
}


x86 assembly (clang, -O0):
<odd>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x1,-0x4(%rbp)
jle    112e <odd+0x2e>
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    112e <odd+0x2e>
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<odd>:
mov    %edi,%eax
cmp    $0x2,%edi
setge  %cl
test   $0x1,%al
sete   %dl
and    %cl,%dl
movzbl %dl,%ecx
sub    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @odd(i32 %0) {
%2 = icmp sgt i32 %0, 1
%3 = and i32 %0, 1
%4 = icmp eq i32 %3, 0
%5 = and i1 %2, %4
%6 = sext i1 %5 to i32
%7 = add nsw i32 %6, %0
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ subseqLex(int);
int /*<<< orphan*/ system(char *);
int main(void) {
  int n = 10;
  subseqLex(n);
  system("pause");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xa,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <subseqLex@plt>
lea    0xec2(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xa,%edi
call   1040 <subseqLex@plt>
lea    0xece(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"pause\00"
define i32 @main() {
%1 = alloca i32
store i32 10, i32* %1
%2 = load i32, i32* %1
%3 = call i32 @subseqLex(i32 %2)
%4 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"pause\00"
define i32 @main() {
%1 = tail call i32 @subseqLex(i32 10)
%2 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
int domain_has_cap(struct iommu_domain *domain, unsigned long cap) { return 0; }


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

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

LLVM IR (-O0):
%struct.iommu_domain = type opaque
define i32 @domain_has_cap(%struct.iommu_domain* %0, i64 %1) {
%3 = alloca %struct.iommu_domain*
%4 = alloca i64
store %struct.iommu_domain* %0, %struct.iommu_domain** %3
store i64 %1, i64* %4
ret i32 0
}

LLVM IR (-O2):
%struct.iommu_domain = type opaque
define i32 @domain_has_cap(%struct.iommu_domain* nocapture readnone %0, i64 %1) {
ret i32 0
}
/* Type definitions */
struct host1x {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct host1x *);
void host1x_dummy_close(struct host1x *host1x) { free(host1x); }


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

x86 assembly (clang, -O2):
<host1x_dummy_close>:
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.host1x = type { i32 }
define void @host1x_dummy_close(%struct.host1x* %0) {
%2 = alloca %struct.host1x*
store %struct.host1x* %0, %struct.host1x** %2
%3 = load %struct.host1x*, %struct.host1x** %2
%4 = call i32 @free(%struct.host1x* %3)
ret void
}

LLVM IR (-O2):
%struct.host1x = type { i32 }
define void @host1x_dummy_close(%struct.host1x* nocapture %0) {
%2 = tail call i32 @free(%struct.host1x* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ xcb_connection_t;

/* Variables and functions */
int /*<<< orphan*/ xcb_disconnect(int /*<<< orphan*/ *);
void kill_xcb(xcb_connection_t **con) {
  if (*con)
    xcb_disconnect(*con);
}


x86 assembly (clang, -O0):
<kill_xcb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     1136 <kill_xcb+0x26>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <xcb_disconnect@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kill_xcb>:
mov    (%rdi),%rdi
test   %rdi,%rdi
je     111d <kill_xcb+0xd>
jmp    1030 <xcb_disconnect@plt>
ret

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

LLVM IR (-O2):
define void @kill_xcb(i32** nocapture %0) {
%2 = load i32*, i32** %0
%3 = icmp eq i32* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @xcb_disconnect(i32* %2)
br label %6
6: ; preds = %4, %1
ret void
}
__attribute__((always_)) void pci_no_msi(void) {}


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

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

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

LLVM IR (-O2):
define void @pci_no_msi() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void check_buff(void *buff, const char *error, int exitVal) {
  if (buff == NULL) {
    fprintf(stderr, "%s", error);
    exit(exitVal);
  }
}


x86 assembly (clang, -O0):
<check_buff>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    115f <check_buff+0x3f>
mov    0x2e9b(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xeae(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x14(%rbp),%edi
call   1040 <exit@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_buff>:
test   %rdi,%rdi
je     1126 <check_buff+0x6>
ret
push   %rbx
mov    %edx,%ebx
mov    %rsi,%rdx
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
lea    0xec4(%rip),%rsi
call   1030 <fprintf@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [3 x i8] c"%s\00"
define void @check_buff(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = icmp eq i8* %7, null
br i1 %8, label %9, label %15
9: ; preds = %3
%10 = load i32, i32* @stderr
%11 = load i8*, i8** %5
%12 = call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %11)
%13 = load i32, i32* %6
%14 = call i32 @exit(i32 %13)
unreachable
15: ; preds = %3
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [3 x i8] c"%s\00"
define void @check_buff(i8* readnone %0, i8* %1, i32 %2) {
%4 = icmp eq i8* %0, null
br i1 %4, label %5, label %9
5: ; preds = %3
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
%8 = tail call i32 @exit(i32 %2)
unreachable
9: ; preds = %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
int /*<<< orphan*/ wmemchr(int /*<<< orphan*/ *, int /*<<< orphan*/, size_t);
void uninitvar_wmemchr(void) {
  wchar_t *cs;
  wchar_t c;
  size_t n;
  (void)wmemchr(cs, c, n);
}


x86 assembly (clang, -O0):
<uninitvar_wmemchr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
call   1030 <wmemchr@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uninitvar_wmemchr>:
jmp    1030 <wmemchr@plt>

LLVM IR (-O0):
define void @uninitvar_wmemchr() {
%1 = alloca i32*
%2 = alloca i32
%3 = alloca i64
%4 = load i32*, i32** %1
%5 = load i32, i32* %2
%6 = load i64, i64* %3
%7 = call i32 @wmemchr(i32* %4, i32 %5, i64 %6)
ret void
}

LLVM IR (-O2):
define void @uninitvar_wmemchr() {
%1 = tail call i32 @wmemchr(i32* undef, i32 undef, i64 undef)
ret void
}
int is_big_endian(void) {
  static const int n = 1;
  return ((char *)&n)[0] == 0;
}


x86 assembly (clang, -O0):
<is_big_endian>:
push   %rbp
mov    %rsp,%rbp
movsbl 0xef5(%rip),%eax
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@is_big_endian.n = internal constant i32 1
define i32 @is_big_endian() {
%1 = load i8, i8* bitcast (i32* @is_big_endian.n to i8*)
%2 = sext i8 %1 to i32
%3 = icmp eq i32 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}

LLVM IR (-O2):
define i32 @is_big_endian() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void test_free(void) {
  void *ptr;
  ptr = NULL;
  free(ptr);
  return;
}


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

x86 assembly (clang, -O2):
<test_free>:
xor    %edi,%edi
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @test_free() {
%1 = alloca i8*
store i8* null, i8** %1
%2 = load i8*, i8** %1
%3 = call i32 @free(i8* %2)
ret void
}

LLVM IR (-O2):
define void @test_free() {
%1 = tail call i32 @free(i8* null)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dm9000_initialize();
int /*<<< orphan*/ sw_gpmi_init();
int dm9000xtest(int argc, char *argv[]) {
  sw_gpmi_init();
  dm9000_initialize();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @dm9000xtest(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 (...) @sw_gpmi_init()
%6 = call i32 (...) @dm9000_initialize()
ret i32 0
}

LLVM IR (-O2):
define i32 @dm9000xtest(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @sw_gpmi_init()
%4 = tail call i32 (...) @dm9000_initialize()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ testindexofany();
int main(void) { testindexofany(); }


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @testindexofany()
ret i32 0
}
/* Variables and functions */
int rrandom();
int coin_toss(void) { return (((rrandom() & 01) ? 1 : 0)); }


x86 assembly (clang, -O0):
<coin_toss>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <rrandom@plt>
mov    %eax,%edx
and    $0x1,%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<coin_toss>:
push   %rax
xor    %eax,%eax
call   1030 <rrandom@plt>
and    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @coin_toss() {
%1 = call i32 (...) @rrandom()
%2 = and i32 %1, 1
%3 = icmp ne i32 %2, 0
%4 = zext i1 %3 to i64
%5 = select i1 %3, i32 1, i32 0
ret i32 %5
}

LLVM IR (-O2):
define i32 @coin_toss() {
%1 = tail call i32 (...) @rrandom()
%2 = and i32 %1, 1
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ regf(int);
void nn_regf() { regf(1); }


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

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

LLVM IR (-O0):
define void @nn_regf() {
%1 = call i32 @regf(i32 1)
ret void
}

LLVM IR (-O2):
define void @nn_regf() {
%1 = tail call i32 @regf(i32 1)
ret void
}
void gtk_progress_bar_set_ellipsize() {}


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

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

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

LLVM IR (-O2):
define void @gtk_progress_bar_set_ellipsize() {
ret void
}
void I2STxDataPut(unsigned long ulBase, unsigned long ulData) {
  ;
  while ((*((volatile unsigned long *)(ulBase + 0x00000018))) >= 16) {
  }
  (*((volatile unsigned long *)(ulBase + 0x00000000))) = ulData;
}


x86 assembly (clang, -O0):
<I2STxDataPut>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%rax
cmp    $0x10,%rax
jb     1123 <I2STxDataPut+0x23>
jmp    110c <I2STxDataPut+0xc>
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<I2STxDataPut>:
mov    0x18(%rdi),%rax
cmp    $0xf,%rax
ja     1100 <I2STxDataPut>
mov    %rsi,(%rdi)
ret

LLVM IR (-O0):
define void @I2STxDataPut(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
br label %5
5: ; preds = %11, %2
%6 = load i64, i64* %3
%7 = add i64 %6, 24
%8 = inttoptr i64 %7 to i64*
%9 = load volatile i64, i64* %8
%10 = icmp uge i64 %9, 16
br i1 %10, label %11, label %12
11: ; preds = %5
br label %5
12: ; preds = %5
%13 = load i64, i64* %4
%14 = load i64, i64* %3
%15 = add i64 %14, 0
%16 = inttoptr i64 %15 to i64*
store volatile i64 %13, i64* %16
ret void
}

LLVM IR (-O2):
define void @I2STxDataPut(i64 %0, i64 %1) {
%3 = add i64 %0, 24
%4 = inttoptr i64 %3 to i64*
br label %5
5: ; preds = %5, %2
%6 = load volatile i64, i64* %4
%7 = icmp ugt i64 %6, 15
br i1 %7, label %5, label %8
8: ; preds = %5
%9 = inttoptr i64 %0 to i64*
store volatile i64 %1, i64* %9
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isprint(int);
void t_isprint_0xc6() {
  Assert_real((isprint(198) == 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_isprint.c",
              995, ("isprint should be 0 for 0xc6"));
}


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

x86 assembly (clang, -O2):
<t_isprint_0xc6>:
push   %rax
mov    $0xc6,%edi
call   1030 <isprint@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x3e3,%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_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0xc6\00"
define void @t_isprint_0xc6() {
%1 = call i64 @isprint(i32 198)
%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 995, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0xc6\00"
define void @t_isprint_0xc6() {
%1 = tail call i64 @isprint(i32 198)
%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 995, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
int uriUriStringToFilenameW(int /*<<< orphan*/ const *, int /*<<< orphan*/ *,
                            int /*<<< orphan*/);
int uriUriStringToWindowsFilenameW(const wchar_t *uriString,
                                   wchar_t *filename) {
  return uriUriStringToFilenameW(uriString, filename, 0);
}


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

x86 assembly (clang, -O2):
<uriUriStringToWindowsFilenameW>:
xor    %edx,%edx
jmp    1030 <uriUriStringToFilenameW@plt>

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

LLVM IR (-O2):
define i32 @uriUriStringToWindowsFilenameW(i32* %0, i32* %1) {
%3 = tail call i32 @uriUriStringToFilenameW(i32* %0, i32* %1, i32 0)
ret i32 %3
}