xunge/DecIR huggingface dataset:
unsigned int nextpow2(unsigned int num) {
  --num;
  num |= num >> 1;
  num |= num >> 2;
  num |= num >> 4;
  num |= num >> 8;
  num |= num >> 16;
  return ++num;
}


x86 assembly (clang, -O0):
<nextpow2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x1,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x2,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x4,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x8,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x10,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<nextpow2>:
lea    -0x1(%rdi),%eax
mov    %eax,%ecx
shr    %ecx
or     %eax,%ecx
mov    %ecx,%eax
shr    $0x2,%eax
or     %ecx,%eax
mov    %eax,%ecx
shr    $0x4,%ecx
or     %eax,%ecx
mov    %ecx,%edx
shr    $0x8,%edx
or     %ecx,%edx
mov    %edx,%eax
shr    $0x10,%eax
or     %edx,%eax
add    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @nextpow2(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add i32 %3, -1
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = lshr i32 %5, 1
%7 = load i32, i32* %2
%8 = or i32 %7, %6
store i32 %8, i32* %2
%9 = load i32, i32* %2
%10 = lshr i32 %9, 2
%11 = load i32, i32* %2
%12 = or i32 %11, %10
store i32 %12, i32* %2
%13 = load i32, i32* %2
%14 = lshr i32 %13, 4
%15 = load i32, i32* %2
%16 = or i32 %15, %14
store i32 %16, i32* %2
%17 = load i32, i32* %2
%18 = lshr i32 %17, 8
%19 = load i32, i32* %2
%20 = or i32 %19, %18
store i32 %20, i32* %2
%21 = load i32, i32* %2
%22 = lshr i32 %21, 16
%23 = load i32, i32* %2
%24 = or i32 %23, %22
store i32 %24, i32* %2
%25 = load i32, i32* %2
%26 = add i32 %25, 1
store i32 %26, i32* %2
ret i32 %26
}

LLVM IR (-O2):
define i32 @nextpow2(i32 %0) {
%2 = add i32 %0, -1
%3 = lshr i32 %2, 1
%4 = or i32 %3, %2
%5 = lshr i32 %4, 2
%6 = or i32 %5, %4
%7 = lshr i32 %6, 4
%8 = or i32 %7, %6
%9 = lshr i32 %8, 8
%10 = or i32 %9, %8
%11 = lshr i32 %10, 16
%12 = or i32 %11, %10
%13 = add i32 %12, 1
ret i32 %13
}
void mempool_init() { return; }


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

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

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

LLVM IR (-O2):
define void @mempool_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void hello(void) {
  printf("hello");
  return;
}


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"hello\00"
define void @hello() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, char *, char *);
char *strdup(char *);
char *pair_folder_element_copy_function(char *prompt_many_element_name,
                                        char *many_folder_name) {
  char copy_function[1024];
  sprintf(copy_function, "timlib_element_value_set( '%s_0', '%s' ) && ",
          prompt_many_element_name, many_folder_name);
  return strdup(copy_function);
}


x86 assembly (clang, -O0):
<pair_folder_element_copy_function>:
push   %rbp
mov    %rsp,%rbp
sub    $0x410,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x410(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xeb7(%rip),%rsi
call   1030 <sprintf@plt>
lea    -0x410(%rbp),%rdi
call   1040 <strdup@plt>
add    $0x410,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pair_folder_element_copy_function>:
push   %rbx
sub    $0x400,%rsp
mov    %rsi,%rcx
mov    %rdi,%rdx
lea    0xecb(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <sprintf@plt>
mov    %rbx,%rdi
call   1040 <strdup@plt>
add    $0x400,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [45 x i8] c"timlib_element_value_set( '%s_0', '%s' ) && \00"
define i8* @pair_folder_element_copy_function(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [1024 x i8]
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%7 = load i8*, i8** %3
%8 = load i8*, i8** %4
%9 = call i32 @sprintf(i8* %6, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i8* %7, i8* %8)
%10 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%11 = call i8* @strdup(i8* %10)
ret i8* %11
}

LLVM IR (-O2):
@.str = [45 x i8] c"timlib_element_value_set( '%s_0', '%s' ) && \00"
define noalias i8* @pair_folder_element_copy_function(i8* %0, i8* %1) {
%3 = alloca [1024 x i8]
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%5 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
%6 = call i8* @strdup(i8* %4)
ret i8* %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_legal() {
  printf("Copyright (C) 2010 Adam Collins (m104)\n");
  printf("This is free software; see the source "
         "(http://github.com/m104/sort-bench)\n");
  printf("for copying conditions.  There is NO warranty; not even for "
         "MERCHANTABILITY\n");
  printf("or FITNESS FOR A PARTICULAR PURPOSE.\n");
  printf("\n");
}


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

x86 assembly (clang, -O2):
<print_legal>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <puts@plt>
lea    0xef3(%rip),%rdi
call   1040 <puts@plt>
lea    0xf31(%rip),%rdi
call   1040 <puts@plt>
lea    0xf71(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [40 x i8] c"Copyright (C) 2010 Adam Collins (m104)\0A\00"
@.str.1 = [75 x i8] c"This is free software; see the source (http://github.com/m104/sort-bench)\0A\00"
@.str.2 = [77 x i8] c"for copying conditions. There is NO warranty; not even for MERCHANTABILITY\0A\00"
@.str.3 = [38 x i8] c"or FITNESS FOR A PARTICULAR PURPOSE.\0A\00"
@.str.4 = [2 x i8] c"\0A\00"
define void @print_legal() {
%1 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [39 x i8] c"Copyright (C) 2010 Adam Collins (m104)\00"
@str.5 = [74 x i8] c"This is free software; see the source (http://github.com/m104/sort-bench)\00"
@str.6 = [76 x i8] c"for copying conditions. There is NO warranty; not even for MERCHANTABILITY\00"
@str.7 = [37 x i8] c"or FITNESS FOR A PARTICULAR PURPOSE.\00"
define void @print_legal() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([74 x i8], [74 x i8]* @str.5, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([76 x i8], [76 x i8]* @str.6, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str.7, i64 0, i64 0))
%5 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ iscntrl(int);
void t_iscntrl_0x16() {
  Assert_real((iscntrl(22)),
              "/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",
              115, ("iscntrl should be 1 for 0x16"));
}


x86 assembly (clang, -O0):
<t_iscntrl_0x16>:
push   %rbp
mov    %rsp,%rbp
mov    $0x16,%edi
call   1030 <iscntrl@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x73,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_iscntrl_0x16>:
push   %rax
mov    $0x16,%edi
call   1030 <iscntrl@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x73,%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 = [29 x i8] c"iscntrl should be 1 for 0x16\00"
define void @t_iscntrl_0x16() {
%1 = call i32 @iscntrl(i32 22)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 115, 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_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 1 for 0x16\00"
define void @t_iscntrl_0x16() {
%1 = tail call i32 @iscntrl(i32 22)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 115, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
char *equalize_date_string(char const *);
int /*<<< orphan*/ free(char *);
int strcmp(char *, char *);
int compare_date_strings(const char *s1, const char *s2) {
  char *t1 = equalize_date_string(s1);
  char *t2 = equalize_date_string(s2);
  int ret = strcmp(t1, t2);
  free(t1);
  free(t2);
  return ret;
}


x86 assembly (clang, -O0):
<compare_date_strings>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <equalize_date_string@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <equalize_date_string@plt>
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1040 <strcmp@plt>
mov    %eax,-0x24(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
mov    -0x24(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare_date_strings>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
call   1050 <equalize_date_string@plt>
mov    %rax,%r15
mov    %r14,%rdi
call   1050 <equalize_date_string@plt>
mov    %rax,%rbx
mov    %r15,%rdi
mov    %rax,%rsi
call   1040 <strcmp@plt>
mov    %eax,%ebp
mov    %r15,%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @compare_date_strings(i8* %0, i8* %1) {
%3 = tail call i8* @equalize_date_string(i8* %0)
%4 = tail call i8* @equalize_date_string(i8* %1)
%5 = tail call i32 @strcmp(i8* dereferenceable(1) %3, i8* dereferenceable(1) %4)
%6 = tail call i32 @free(i8* %3)
%7 = tail call i32 @free(i8* %4)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ iscntrl(int);
void t_iscntrl_0x38() {
  Assert_real((iscntrl(56) == 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",
              285, ("iscntrl should be 0 for 8"));
}


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

x86 assembly (clang, -O2):
<t_iscntrl_0x38>:
push   %rax
mov    $0x38,%edi
call   1030 <iscntrl@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x11d,%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 8\00"
define void @t_iscntrl_0x38() {
%1 = call i64 @iscntrl(i32 56)
%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 285, 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 8\00"
define void @t_iscntrl_0x38() {
%1 = tail call i64 @iscntrl(i32 56)
%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 285, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void ptrace_sandbox_permit_unlink(struct pt_sandbox *p_sandbox) {
  (void)p_sandbox;
}


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

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

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

LLVM IR (-O2):
%struct.pt_sandbox = type opaque
define void @ptrace_sandbox_permit_unlink(%struct.pt_sandbox* nocapture %0) {
ret void
}
unsigned getval_218() { return 3286272328U; }


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

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

LLVM IR (-O0):
define i32 @getval_218() {
ret i32 -1008694968
}

LLVM IR (-O2):
define i32 @getval_218() {
ret i32 -1008694968
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
void bme280_print(float temp, float hum, float press) {
  printf("%3.2f ", temp);
  printf("%3.2f ", hum);
  printf("%4.2f\n", press);
}


x86 assembly (clang, -O0):
<bme280_print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
movss  -0x8(%rbp),%xmm0
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
movss  -0xc(%rbp),%xmm0
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bme280_print>:
push   %rbx
sub    $0x10,%rsp
movss  %xmm2,0xc(%rsp)
movss  %xmm1,0x8(%rsp)
lea    0xed8(%rip),%rbx
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    %rbx,%rdi
movss  0x8(%rsp),%xmm0
call   1030 <printf@plt>
lea    0xec2(%rip),%rdi
movss  0xc(%rsp),%xmm0
add    $0x10,%rsp
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"%3.2f \00"
@.str.1 = [7 x i8] c"%4.2f\0A\00"
define void @bme280_print(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* %4
%8 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), float %7)
%9 = load float, float* %5
%10 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), float %9)
%11 = load float, float* %6
%12 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), float %11)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"%3.2f \00"
@.str.1 = [7 x i8] c"%4.2f\0A\00"
define void @bme280_print(float %0, float %1, float %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), float %0)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), float %1)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), float %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void freeAttachedPointer(void *ptr) {
  void **attached_pointer = ptr;
  free(*attached_pointer);
}


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

x86 assembly (clang, -O2):
<freeAttachedPointer>:
mov    (%rdi),%rdi
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @freeAttachedPointer(i8* %0) {
%2 = alloca i8*
%3 = alloca i8**
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i8**
store i8** %5, i8*** %3
%6 = load i8**, i8*** %3
%7 = load i8*, i8** %6
%8 = call i32 @free(i8* %7)
ret void
}

LLVM IR (-O2):
define void @freeAttachedPointer(i8* nocapture %0) {
%2 = bitcast i8* %0 to i8**
%3 = load i8*, i8** %2
%4 = tail call i32 @free(i8* %3)
ret void
}
void rx_do_lldp_wait_port_operational(struct lldp_port *lldp_port) {}


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

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

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

LLVM IR (-O2):
%struct.lldp_port = type opaque
define void @rx_do_lldp_wait_port_operational(%struct.lldp_port* nocapture %0) {
ret void
}
/* Variables and functions */
int readl(void *);
int /*<<< orphan*/ writel(int, void *);
void cadence_uart_putc(void *base, int c) {
  if (!(readl(base + 0x00) & (1 << 4)))
    return;
  while ((readl(base + 0x2C) & (1 << 4)))
    ;
  writel(c, base + 0x30);
}


x86 assembly (clang, -O0):
<cadence_uart_putc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <readl@plt>
and    $0x10,%eax
cmp    $0x0,%eax
jne    1149 <cadence_uart_putc+0x29>
jmp    117c <cadence_uart_putc+0x5c>
jmp    114e <cadence_uart_putc+0x2e>
mov    -0x8(%rbp),%rdi
add    $0x2c,%rdi
call   1030 <readl@plt>
and    $0x10,%eax
cmp    $0x0,%eax
je     116c <cadence_uart_putc+0x4c>
jmp    114e <cadence_uart_putc+0x2e>
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%rsi
add    $0x30,%rsi
call   1040 <writel@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cadence_uart_putc>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%r14d
mov    %rdi,%rbx
call   1030 <readl@plt>
test   $0x10,%al
jne    1138 <cadence_uart_putc+0x18>
pop    %rbx
pop    %r14
pop    %rbp
ret
lea    0x2c(%rbx),%rbp
nopl   0x0(%rax)
mov    %rbp,%rdi
call   1030 <readl@plt>
test   $0x10,%al
jne    1140 <cadence_uart_putc+0x20>
add    $0x30,%rbx
mov    %r14d,%edi
mov    %rbx,%rsi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <writel@plt>

LLVM IR (-O0):
define void @cadence_uart_putc(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = getelementptr i8, i8* %5, i64 0
%7 = call i32 @readl(i8* %6)
%8 = and i32 %7, 16
%9 = icmp ne i32 %8, 0
br i1 %9, label %11, label %10
10: ; preds = %2
br label %24
11: ; preds = %2
br label %12
12: ; preds = %18, %11
%13 = load i8*, i8** %3
%14 = getelementptr i8, i8* %13, i64 44
%15 = call i32 @readl(i8* %14)
%16 = and i32 %15, 16
%17 = icmp ne i32 %16, 0
br i1 %17, label %18, label %19
18: ; preds = %12
br label %12
19: ; preds = %12
%20 = load i32, i32* %4
%21 = load i8*, i8** %3
%22 = getelementptr i8, i8* %21, i64 48
%23 = call i32 @writel(i32 %20, i8* %22)
br label %24
24: ; preds = %19, %10
ret void
}

LLVM IR (-O2):
define void @cadence_uart_putc(i8* %0, i32 %1) {
%3 = tail call i32 @readl(i8* %0)
%4 = and i32 %3, 16
%5 = icmp eq i32 %4, 0
br i1 %5, label %15, label %6
6: ; preds = %2
%7 = getelementptr i8, i8* %0, i64 44
br label %8
8: ; preds = %6, %8
%9 = tail call i32 @readl(i8* %7)
%10 = and i32 %9, 16
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %8
12: ; preds = %8
%13 = getelementptr i8, i8* %0, i64 48
%14 = tail call i32 @writel(i32 %1, i8* %13)
br label %15
15: ; preds = %2, %12
ret void
}
int test_imm_CAuint8_reg(unsigned char val) {
  return ((val) & (0xCA << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_CAuint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
and    $0xca,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_CAuint8_reg(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = and i32 %4, 202
%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_CAuint8_reg(i8 zeroext %0) {
%2 = and i8 %0, -54
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int _mpy32(int src1, int src2) { return src1 * src2; }


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

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

LLVM IR (-O0):
define i32 @_mpy32(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 = mul nsw i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @_mpy32(i32 %0, i32 %1) {
%3 = mul nsw i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ program();
int main() {
  printf(".text\n");
  printf(".align 16\n");
  program();
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [6 x i8] c".text\00"
@str.2 = [10 x i8] c".align 16\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.2, i64 0, i64 0))
%3 = tail call i32 (...) @program()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int __int64_t_encode_array(void *, int, int, int /*<<< orphan*/ const *, int);
int __double_encode_array(void *_buf, int offset, int maxlen, const double *p,
                          int elements) {
  return __int64_t_encode_array(_buf, offset, maxlen, (const int64_t *)p,
                                elements);
}


x86 assembly (clang, -O0):
<__double_encode_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    -0x1c(%rbp),%r8d
call   1030 <__int64_t_encode_array@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__double_encode_array>:
jmp    1030 <__int64_t_encode_array@plt>

LLVM IR (-O0):
define i32 @__double_encode_array(i8* %0, i32 %1, i32 %2, double* %3, i32 %4) {
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca double*
%10 = alloca i32
store i8* %0, i8** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store double* %3, double** %9
store i32 %4, i32* %10
%11 = load i8*, i8** %6
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = load double*, double** %9
%15 = bitcast double* %14 to i32*
%16 = load i32, i32* %10
%17 = call i32 @__int64_t_encode_array(i8* %11, i32 %12, i32 %13, i32* %15, i32 %16)
ret i32 %17
}

LLVM IR (-O2):
define i32 @__double_encode_array(i8* %0, i32 %1, i32 %2, double* %3, i32 %4) {
%6 = bitcast double* %3 to i32*
%7 = tail call i32 @__int64_t_encode_array(i8* %0, i32 %1, i32 %2, i32* %6, i32 %4)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ HASH_addbits_and_close(void *, int /*<<< orphan*/,
                                          int /*<<< orphan*/, void *,
                                          unsigned int);
void HASH_close(void *cc, void *dst, unsigned rnum) {
  HASH_addbits_and_close(cc, 0, 0, dst, rnum);
}


x86 assembly (clang, -O0):
<HASH_close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    -0x14(%rbp),%r8d
xor    %edx,%edx
mov    %edx,%esi
call   1030 <HASH_addbits_and_close@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<HASH_close>:
mov    %edx,%r8d
mov    %rsi,%rcx
xor    %esi,%esi
xor    %edx,%edx
jmp    1030 <HASH_addbits_and_close@plt>

LLVM IR (-O0):
define void @HASH_close(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 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 @HASH_addbits_and_close(i8* %7, i32 0, i32 0, i8* %8, i32 %9)
ret void
}

LLVM IR (-O2):
define void @HASH_close(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @HASH_addbits_and_close(i8* %0, i32 0, i32 0, i8* %1, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
void fnfound(const char *name, const char *ext) {
  printf("file not found: %s.%s\n", *name == ' ' ? "" : name,
         *ext == ' ' ? "" : ext);
}


x86 assembly (clang, -O0):
<fnfound>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
jne    1140 <fnfound+0x30>
lea    0xedf(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    1148 <fnfound+0x38>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
jne    1170 <fnfound+0x60>
lea    0xeaf(%rip),%rax
mov    %rax,-0x28(%rbp)
jmp    1178 <fnfound+0x68>
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rdx
lea    0xe79(%rip),%rdi
call   1030 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fnfound>:
mov    %rdi,%rax
cmpb   $0x20,(%rdi)
lea    0xef9(%rip),%rdx
cmove  %rdx,%rax
cmpb   $0x20,(%rsi)
cmovne %rsi,%rdx
lea    0xed1(%rip),%rdi
mov    %rax,%rsi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"file not found: %s.%s\0A\00"
@.str.1 = [1 x i8] zeroinitializer
define void @fnfound(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = icmp eq i32 %7, 32
br i1 %8, label %9, label %10
9: ; preds = %2
br label %12
10: ; preds = %2
%11 = load i8*, i8** %3
br label %12
12: ; preds = %10, %9
%13 = phi i8* [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), %9 ], [ %11, %10 ]
%14 = load i8*, i8** %4
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %16, 32
br i1 %17, label %18, label %19
18: ; preds = %12
br label %21
19: ; preds = %12
%20 = load i8*, i8** %4
br label %21
21: ; preds = %19, %18
%22 = phi i8* [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), %18 ], [ %20, %19 ]
%23 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %13, i8* %22)
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"file not found: %s.%s\0A\00"
@.str.1 = [1 x i8] zeroinitializer
define void @fnfound(i8* %0, i8* %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 32
%5 = select i1 %4, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i8* %0
%6 = load i8, i8* %1
%7 = icmp eq i8 %6, 32
%8 = select i1 %7, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i8* %1
%9 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %5, i8* %8)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
void version() {
  printf("powertop version %s\n", "1.13");
  exit(0);
}


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

x86 assembly (clang, -O2):
<version>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xee6(%rip),%rsi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"powertop version %s\0A\00"
@.str.1 = [5 x i8] c"1.13\00"
define void @version() {
%1 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [21 x i8] c"powertop version %s\0A\00"
@.str.1 = [5 x i8] c"1.13\00"
define void @version() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
void *alloc3(int volatile);
void *alloc2(volatile int one) { return alloc3(one); }


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

x86 assembly (clang, -O2):
<alloc2>:
mov    %edi,-0x4(%rsp)
mov    -0x4(%rsp),%edi
jmp    1030 <alloc3@plt>

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

LLVM IR (-O2):
define i8* @alloc2(i32 %0) {
%2 = alloca i32
store volatile i32 %0, i32* %2
%3 = load volatile i32, i32* %2
%4 = tail call i8* @alloc3(i32 %3)
ret i8* %4
}
void sum(int *number, unsigned short esp) {
  for (int i = 1; i < esp; i++)
    *number += *number;
}


x86 assembly (clang, -O0):
<sum>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
movl   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%eax
movzwl -0xa(%rbp),%ecx
cmp    %ecx,%eax
jge    1141 <sum+0x41>
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
mov    -0x8(%rbp),%rax
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1116 <sum+0x16>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sum>:
cmp    $0x2,%si
jb     1139 <sum+0x39>
mov    (%rdi),%eax
lea    -0x1(%rsi),%edx
add    $0xfffffffe,%esi
mov    %edx,%ecx
and    $0x7,%ecx
cmp    $0x7,%esi
jb     1128 <sum+0x28>
and    $0xfffffff8,%edx
nopl   0x0(%rax,%rax,1)
shl    $0x8,%eax
add    $0xfffffff8,%edx
jne    1120 <sum+0x20>
test   %ecx,%ecx
je     1137 <sum+0x37>
nopl   0x0(%rax)
add    %eax,%eax
add    $0xffffffff,%ecx
jne    1130 <sum+0x30>
mov    %eax,(%rdi)
ret

LLVM IR (-O0):
define void @sum(i32* %0, i16 zeroext %1) {
%3 = alloca i32*
%4 = alloca i16
%5 = alloca i32
store i32* %0, i32** %3
store i16 %1, i16* %4
store i32 1, i32* %5
br label %6
6: ; preds = %17, %2
%7 = load i32, i32* %5
%8 = load i16, i16* %4
%9 = zext i16 %8 to i32
%10 = icmp slt i32 %7, %9
br i1 %10, label %11, label %20
11: ; preds = %6
%12 = load i32*, i32** %3
%13 = load i32, i32* %12
%14 = load i32*, i32** %3
%15 = load i32, i32* %14
%16 = add nsw i32 %15, %13
store i32 %16, i32* %14
br label %17
17: ; preds = %11
%18 = load i32, i32* %5
%19 = add nsw i32 %18, 1
store i32 %19, i32* %5
br label %6
20: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @sum(i32* nocapture %0, i16 zeroext %1) {
%3 = zext i16 %1 to i32
%4 = icmp ugt i16 %1, 1
br i1 %4, label %5, label %25
5: ; preds = %2
%6 = load i32, i32* %0
%7 = add nsw i32 %3, -1
%8 = add nsw i32 %3, -2
%9 = and i32 %7, 7
%10 = icmp ult i32 %8, 7
br i1 %10, label %13, label %11
11: ; preds = %5
%12 = and i32 %7, -8
br label %26
13: ; preds = %26, %5
%14 = phi i32 [ undef, %5 ], [ %29, %26 ]
%15 = phi i32 [ %6, %5 ], [ %29, %26 ]
%16 = icmp eq i32 %9, 0
br i1 %16, label %23, label %17
17: ; preds = %13, %17
%18 = phi i32 [ %20, %17 ], [ %15, %13 ]
%19 = phi i32 [ %21, %17 ], [ 0, %13 ]
%20 = shl nsw i32 %18, 1
%21 = add i32 %19, 1
%22 = icmp eq i32 %21, %9
br i1 %22, label %23, label %17
23: ; preds = %17, %13
%24 = phi i32 [ %14, %13 ], [ %20, %17 ]
store i32 %24, i32* %0
br label %25
25: ; preds = %23, %2
ret void
26: ; preds = %26, %11
%27 = phi i32 [ %6, %11 ], [ %29, %26 ]
%28 = phi i32 [ 0, %11 ], [ %30, %26 ]
%29 = shl i32 %27, 8
%30 = add i32 %28, 8
%31 = icmp eq i32 %30, %12
br i1 %31, label %13, label %26
}
/* Variables and functions */
int /*<<< orphan*/ print_green(int, char *, int);
int /*<<< orphan*/ print_red(int, char *, int);
scalar_t__ strlen_launcher();
int main(void) {
  if (strlen_launcher())
    print_red(1, "test failled\n", 13);
  else
    print_green(1, "test passed\n", 12);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <strlen_launcher@plt>
cmp    $0x0,%rax
je     116b <main+0x3b>
mov    $0x1,%edi
lea    0xea4(%rip),%rsi
mov    $0xd,%edx
call   1040 <print_red@plt>
jmp    1181 <main+0x51>
mov    $0x1,%edi
lea    0xe97(%rip),%rsi
mov    $0xc,%edx
call   1030 <print_green@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <strlen_launcher@plt>
test   %rax,%rax
je     1155 <main+0x25>
lea    0xebc(%rip),%rsi
mov    $0x1,%edi
mov    $0xd,%edx
call   1040 <print_red@plt>
jmp    116b <main+0x3b>
lea    0xeb2(%rip),%rsi
mov    $0x1,%edi
mov    $0xc,%edx
call   1030 <print_green@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"test failled\0A\00"
@.str.1 = [13 x i8] c"test passed\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 (...) @strlen_launcher()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @print_red(i32 1, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 13)
br label %8
6: ; preds = %0
%7 = call i32 @print_green(i32 1, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 12)
br label %8
8: ; preds = %6, %4
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"test failled\0A\00"
@.str.1 = [13 x i8] c"test passed\0A\00"
define i32 @main() {
%1 = tail call i64 (...) @strlen_launcher()
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @print_red(i32 1, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 13)
br label %7
5: ; preds = %0
%6 = tail call i32 @print_green(i32 1, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 12)
br label %7
7: ; preds = %5, %3
ret i32 0
}
void gtk_widget_set_direction() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ fc_host_get_statistic(char *, char const *);
uint64_t fc_stat_tx_frames(const char *host) {
  return fc_host_get_statistic("tx_frames", host);
}


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

x86 assembly (clang, -O2):
<fc_stat_tx_frames>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <fc_host_get_statistic@plt>

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

LLVM IR (-O2):
@.str = [10 x i8] c"tx_frames\00"
define i32 @fc_stat_tx_frames(i8* %0) {
%2 = tail call i32 @fc_host_get_statistic(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ MI_log_pkg_error3(int, char *, char *);
void MI2_log_pkg_error3(int p1, char *p2, char *p3) {
  MI_log_pkg_error3(p1, p2, p3);
}


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

x86 assembly (clang, -O2):
<MI2_log_pkg_error3>:
jmp    1030 <MI_log_pkg_error3@plt>

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

LLVM IR (-O2):
define void @MI2_log_pkg_error3(i32 %0, i8* %1, i8* %2) {
%4 = tail call i32 @MI_log_pkg_error3(i32 %0, i8* %1, i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void printUsage(void) {
  printf("Usage: <binfile>\n");
  exit(EXIT_SUCCESS);
}


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

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

LLVM IR (-O0):
@.str = [18 x i8] c"Usage: <binfile>\0A\00"
@EXIT_SUCCESS = global i32 0
define void @printUsage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @EXIT_SUCCESS
%3 = call i32 @exit(i32 %2)
unreachable
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
@str = [17 x i8] c"Usage: <binfile>\00"
define void @printUsage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
%2 = load i32, i32* @EXIT_SUCCESS
%3 = tail call i32 @exit(i32 %2)
unreachable
}
/* Type definitions */
struct suffix_mult {
  int dummy;
};

/* Variables and functions */
int xatoll_sfx(char const *, struct suffix_mult const *);
int xatoi_sfx(const char *str, const struct suffix_mult *sfx) {
  return xatoll_sfx(str, sfx);
}


x86 assembly (clang, -O0):
<xatoi_sfx>:
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   1030 <xatoll_sfx@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xatoi_sfx>:
jmp    1030 <xatoll_sfx@plt>

LLVM IR (-O0):
%struct.suffix_mult = type { i32 }
define i32 @xatoi_sfx(i8* %0, %struct.suffix_mult* %1) {
%3 = alloca i8*
%4 = alloca %struct.suffix_mult*
store i8* %0, i8** %3
store %struct.suffix_mult* %1, %struct.suffix_mult** %4
%5 = load i8*, i8** %3
%6 = load %struct.suffix_mult*, %struct.suffix_mult** %4
%7 = call i32 @xatoll_sfx(i8* %5, %struct.suffix_mult* %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.suffix_mult = type { i32 }
define i32 @xatoi_sfx(i8* %0, %struct.suffix_mult* %1) {
%3 = tail call i32 @xatoll_sfx(i8* %0, %struct.suffix_mult* %1)
ret i32 %3
}
int __attribute__((no)) b(int x) {
  int r;
  __asm__ __volatile__("");
  ;
  if (x)
    r = a();
  else
    r = c(1);
  return r + 1;
}


x86 assembly (clang, -O0):
<b>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1144 <b+0x24>
mov    $0x0,%al
call   1040 <a@plt>
mov    %eax,-0x8(%rbp)
jmp    1153 <b+0x33>
mov    $0x1,%edi
mov    $0x0,%al
call   1030 <c@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<b>:
push   %rax
test   %edi,%edi
je     112e <b+0xe>
xor    %eax,%eax
call   1040 <a@plt>
jmp    113a <b+0x1a>
mov    $0x1,%edi
xor    %eax,%eax
call   1030 <c@plt>
add    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @b(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 (...) @a()
store i32 %7, i32* %3
br label %10
8: ; preds = %1
%9 = call i32 (i32, ...) bitcast (i32 (...)* @c to i32 (i32, ...)*)(i32 1)
store i32 %9, i32* %3
br label %10
10: ; preds = %8, %6
%11 = load i32, i32* %3
%12 = add nsw i32 %11, 1
ret i32 %12
}

LLVM IR (-O2):
define i32 @b(i32 %0) {
tail call void asm sideeffect "", "~{dirflag},~{fpsr},~{flags}"()
%2 = icmp eq i32 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 (...) @a()
br label %7
5: ; preds = %1
%6 = tail call i32 (i32, ...) bitcast (i32 (...)* @c to i32 (i32, ...)*)(i32 1)
br label %7
7: ; preds = %5, %3
%8 = phi i32 [ %4, %3 ], [ %6, %5 ]
%9 = add nsw i32 %8, 1
ret i32 %9
}
/* Variables and functions */
unsigned int f34(unsigned int);
unsigned int f35(unsigned int a) { return f34(f34(a)); }


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

x86 assembly (clang, -O2):
<f35>:
push   %rax
call   1030 <f34@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <f34@plt>

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

LLVM IR (-O2):
define i32 @f35(i32 %0) {
%2 = tail call i32 @f34(i32 %0)
%3 = tail call i32 @f34(i32 %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ __coverity_alloc__(int);
void *cn_cbor_map_create(void *context, void *errp) { __coverity_alloc__(10); }


x86 assembly (clang, -O0):
<cn_cbor_map_create>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    $0xa,%edi
call   1030 <__coverity_alloc__@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cn_cbor_map_create>:
mov    $0xa,%edi
jmp    1030 <__coverity_alloc__@plt>

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

LLVM IR (-O2):
define noalias i8* @cn_cbor_map_create(i8* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = tail call i32 @__coverity_alloc__(i32 10)
ret i8* undef
}
__attribute__((no, noclone)) signed __int128 t114_5sub(signed __int128 x) {
  signed __int128 r;
  if (__builtin_sub_overflow(x, (signed __int128)(-1), &r))
    bar();
  return r;
}


x86 assembly (clang, -O0):
<t114_5sub>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rcx,-0x28(%rbp)
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdx
mov    -0x28(%rbp),%rcx
add    $0x1,%rdx
adc    $0x0,%rcx
seto   %al
mov    %rdx,-0x40(%rbp)
mov    %rcx,-0x38(%rbp)
test   $0x1,%al
jne    1158 <t114_5sub+0x48>
jmp    115f <t114_5sub+0x4f>
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x40(%rbp),%rax
mov    -0x38(%rbp),%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t114_5sub>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
add    $0x1,%rbx
adc    $0x0,%r14
jno    112b <t114_5sub+0x1b>
xor    %eax,%eax
call   1030 <bar@plt>
mov    %rbx,%rax
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define { i64, i64 } @t114_5sub(i64 %0, i64 %1) {
%3 = alloca i128
%4 = alloca i128
%5 = alloca i128
%6 = alloca i128
%7 = bitcast i128* %4 to { i64, i64 }*
%8 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 0
store i64 %0, i64* %8
%9 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 1
store i64 %1, i64* %9
%10 = load i128, i128* %4
store i128 %10, i128* %5
%11 = load i128, i128* %5
%12 = call { i128, i1 } @llvm.ssub.with.overflow.i128(i128 %11, i128 -1)
%13 = extractvalue { i128, i1 } %12, 1
%14 = extractvalue { i128, i1 } %12, 0
store i128 %14, i128* %6
br i1 %13, label %15, label %17
15: ; preds = %2
%16 = call i32 (...) @bar()
br label %17
17: ; preds = %15, %2
%18 = load i128, i128* %6
store i128 %18, i128* %3
%19 = bitcast i128* %3 to { i64, i64 }*
%20 = load { i64, i64 }, { i64, i64 }* %19
ret { i64, i64 } %20
}

LLVM IR (-O2):
define { i64, i64 } @t114_5sub(i64 %0, i64 %1) {
%3 = zext i64 %1 to i128
%4 = shl nuw i128 %3, 64
%5 = zext i64 %0 to i128
%6 = or i128 %4, %5
%7 = tail call { i128, i1 } @llvm.sadd.with.overflow.i128(i128 %6, i128 1)
%8 = extractvalue { i128, i1 } %7, 1
%9 = extractvalue { i128, i1 } %7, 0
br i1 %8, label %10, label %12
10: ; preds = %2
%11 = tail call i32 (...) @bar()
br label %12
12: ; preds = %10, %2
%13 = trunc i128 %9 to i64
%14 = lshr i128 %9, 64
%15 = trunc i128 %14 to i64
%16 = insertvalue { i64, i64 } poison, i64 %13, 0
%17 = insertvalue { i64, i64 } %16, i64 %15, 1
ret { i64, i64 } %17
}