xunge/DecIR huggingface dataset:
adrx0adrx1(r0, r1, x0, x1, p0, p1) double r0, r1;
double *p0, *p1;
{
  if ((((double *)10000000)[x0]) <=
      (((double *)(11111111 & ~(__alignof__(double) - 1)))[x1]))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<adrx0adrx1>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
mov    %edi,-0x1c(%rbp)
mov    %esi,-0x20(%rbp)
mov    %rdx,-0x28(%rbp)
mov    %rcx,-0x30(%rbp)
movslq -0x1c(%rbp),%rcx
mov    $0x989680,%eax
movsd  (%rax,%rcx,8),%xmm1
movslq -0x20(%rbp),%rcx
mov    $0xa98ac0,%eax
movsd  (%rax,%rcx,8),%xmm0
ucomisd %xmm1,%xmm0
jb     114e <adrx0adrx1+0x4e>
movl   $0x1,-0x4(%rbp)
jmp    1155 <adrx0adrx1+0x55>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<adrx0adrx1>:
movslq %edi,%rcx
movslq %esi,%rax
movsd  0xa98ac0(,%rax,8),%xmm0
xor    %eax,%eax
ucomisd 0x989680(,%rcx,8),%xmm0
setae  %al
ret

LLVM IR (-O0):
define i32 @adrx0adrx1(double %0, double %1, i32 %2, i32 %3, double* %4, double* %5) {
%7 = alloca i32
%8 = alloca double
%9 = alloca double
%10 = alloca i32
%11 = alloca i32
%12 = alloca double*
%13 = alloca double*
store double %0, double* %8
store double %1, double* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store double* %4, double** %12
store double* %5, double** %13
%14 = load i32, i32* %10
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds double, double* inttoptr (i64 10000000 to double*), i64 %15
%17 = load double, double* %16
%18 = load i32, i32* %11
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds double, double* inttoptr (i64 11111104 to double*), i64 %19
%21 = load double, double* %20
%22 = fcmp ole double %17, %21
br i1 %22, label %23, label %24
23: ; preds = %6
store i32 1, i32* %7
br label %25
24: ; preds = %6
store i32 0, i32* %7
br label %25
25: ; preds = %24, %23
%26 = load i32, i32* %7
ret i32 %26
}

LLVM IR (-O2):
define i32 @adrx0adrx1(double %0, double %1, i32 %2, i32 %3, double* nocapture readnone %4, double* nocapture readnone %5) {
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds double, double* inttoptr (i64 10000000 to double*), i64 %7
%9 = load double, double* %8
%10 = sext i32 %3 to i64
%11 = getelementptr inbounds double, double* inttoptr (i64 11111104 to double*), i64 %10
%12 = load double, double* %11
%13 = fcmp ole double %9, %12
%14 = zext i1 %13 to i32
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ do_stuff(int);
int main() {
  do_stuff(2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x2,%edi
call   1030 <do_stuff@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x2,%edi
call   1030 <do_stuff@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @do_stuff(i32 2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void printArgumentError() { printf("Argument Mismatch\n"); }


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

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

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

LLVM IR (-O2):
@str = [18 x i8] c"Argument Mismatch\00"
define void @printArgumentError() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
ret void
}
void foo67() {}


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

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

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

LLVM IR (-O2):
define void @foo67() {
ret void
}
void HammingDistance_AVX2() {}


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

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

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

LLVM IR (-O2):
define void @HammingDistance_AVX2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sd_line(long);
long sd_order(long);
long sd_order_line(long skip_count) {
  long l_item;
  l_item = sd_order(skip_count);
  sd_line(l_item);
  return (0);
}


x86 assembly (clang, -O0):
<sd_order_line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <sd_order@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <sd_line@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sd_order_line>:
push   %rax
call   1030 <sd_order@plt>
mov    %rax,%rdi
call   1040 <sd_line@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @sd_order_line(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i64 @sd_order(i64 %4)
store i64 %5, i64* %3
%6 = load i64, i64* %3
%7 = call i32 @sd_line(i64 %6)
ret i64 0
}

LLVM IR (-O2):
define i64 @sd_order_line(i64 %0) {
%2 = tail call i64 @sd_order(i64 %0)
%3 = tail call i32 @sd_line(i64 %2)
ret i64 0
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
double resistance_from_adc(const unsigned int adc,
                           const unsigned int reference_resistance) {
  assert(adc < 32768);
  return ((adc * reference_resistance) / 32768.0);
}


x86 assembly (clang, -O0):
<resistance_from_adc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x8000,%eax
setb   %al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
imul   %ecx,%eax
cvtsi2sd %rax,%xmm0
movsd  0xeb9(%rip),%xmm1
divsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<resistance_from_adc>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %edi,%edi
cmp    $0x8000,%ebp
setb   %dil
call   1030 <assert@plt>
imul   %ebp,%ebx
cvtsi2sd %rbx,%xmm0
mulsd  0xec8(%rip),%xmm0
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define double @resistance_from_adc(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 = icmp ult i32 %5, 32768
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = mul i32 %9, %10
%12 = uitofp i32 %11 to double
%13 = fdiv double %12, 3.276800e+04
ret double %13
}

LLVM IR (-O2):
define double @resistance_from_adc(i32 %0, i32 %1) {
%3 = icmp ult i32 %0, 32768
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = mul i32 %1, %0
%7 = uitofp i32 %6 to double
%8 = fmul double %7, 0x3F00000000000000
ret double %8
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isalpha(int);
void t_isalpha_0x6c() {
  Assert_real((isalpha(108)),
              "/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_isalpha.c",
              545, ("isalpha should be 1 for l"));
}


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

x86 assembly (clang, -O2):
<t_isalpha_0x6c>:
push   %rax
mov    $0x6c,%edi
call   1030 <isalpha@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x221,%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_isalpha.c\00"
@.str.1 = [26 x i8] c"isalpha should be 1 for l\00"
define void @t_isalpha_0x6c() {
%1 = call i32 @isalpha(i32 108)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 545, 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_isalpha.c\00"
@.str.1 = [26 x i8] c"isalpha should be 1 for l\00"
define void @t_isalpha_0x6c() {
%1 = tail call i32 @isalpha(i32 108)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 545, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int test_imm_23int16_reg(short val) {
  return ((val) & (-0x23 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_23int16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%edx
and    $0xffffffdd,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_23int16_reg>:
test   $0xffdd,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_23int16_reg(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
%5 = and i32 %4, -35
%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_23int16_reg(i16 signext %0) {
%2 = and i16 %0, -35
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int strlen(char *);
void back_move(char *s) {
  char *p = s + strlen(s);
  while (p != s) {
    *(p + 1) = *p;
    p--;
  }
  *(p + 1) = *p;
}


x86 assembly (clang, -O0):
<back_move>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x8(%rbp),%rax
je     1169 <back_move+0x59>
mov    -0x10(%rbp),%rax
mov    (%rax),%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0x10(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x10(%rbp)
jmp    113d <back_move+0x2d>
mov    -0x10(%rbp),%rax
mov    (%rax),%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x1(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<back_move>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
movslq %eax,%rdx
test   %edx,%edx
je     113f <back_move+0x1f>
lea    0x2(%rbx),%rdi
lea    0x1(%rbx),%rsi
call   1040 <memmove@plt>
jmp    1142 <back_move+0x22>
add    %rdx,%rbx
mov    (%rbx),%al
mov    %al,0x1(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @back_move(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = sext i32 %2 to i64
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = icmp eq i32 %2, 0
br i1 %5, label %9, label %6
6: ; preds = %1
%7 = getelementptr i8, i8* %0, i64 2
%8 = getelementptr i8, i8* %0, i64 1
br label %9
9: ; preds = %6, %1
%10 = phi i8* [ %4, %1 ], [ %0, %6 ]
%11 = load i8, i8* %10
%12 = getelementptr inbounds i8, i8* %10, i64 1
store i8 %11, i8* %12
ret void
}
int hostapd_prepare_rates(struct hostapd_iface *iface,
                          struct hostapd_hw_modes *mode) {
  return 0;
}


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

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

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

LLVM IR (-O2):
%struct.hostapd_iface = type opaque
%struct.hostapd_hw_modes = type opaque
define i32 @hostapd_prepare_rates(%struct.hostapd_iface* nocapture readnone %0, %struct.hostapd_hw_modes* nocapture readnone %1) {
ret i32 0
}
/* Type definitions */
struct linkedlist {
  int dummy;
};

/* Variables and functions */
long linkedlist_head(struct linkedlist *);
struct linkedlist *linkedlist_tail(struct linkedlist *);
long linkedlist_get(unsigned i, struct linkedlist *l) {
  if (i == 0)
    return linkedlist_head(l);
  return linkedlist_get(i - 1, linkedlist_tail(l));
}


x86 assembly (clang, -O0):
<linkedlist_get>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    115b <linkedlist_get+0x2b>
mov    -0x18(%rbp),%rdi
call   1040 <linkedlist_head@plt>
mov    %rax,-0x8(%rbp)
jmp    117c <linkedlist_get+0x4c>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <linkedlist_tail@plt>
mov    -0x1c(%rbp),%edi
mov    %rax,%rsi
call   1050 <linkedlist_get@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<linkedlist_get>:
push   %rbx
mov    %rsi,%rax
test   %edi,%edi
je     113d <linkedlist_get+0x1d>
mov    %edi,%ebx
nopw   0x0(%rax,%rax,1)
mov    %rax,%rdi
call   1030 <linkedlist_tail@plt>
add    $0xffffffff,%ebx
jne    1130 <linkedlist_get+0x10>
mov    %rax,%rdi
pop    %rbx
jmp    1040 <linkedlist_head@plt>

LLVM IR (-O0):
%struct.linkedlist = type { i32 }
define i64 @linkedlist_get(i32 %0, %struct.linkedlist* %1) {
%3 = alloca i64
%4 = alloca i32
%5 = alloca %struct.linkedlist*
store i32 %0, i32* %4
store %struct.linkedlist* %1, %struct.linkedlist** %5
%6 = load i32, i32* %4
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load %struct.linkedlist*, %struct.linkedlist** %5
%10 = call i64 @linkedlist_head(%struct.linkedlist* %9)
store i64 %10, i64* %3
br label %17
11: ; preds = %2
%12 = load i32, i32* %4
%13 = sub i32 %12, 1
%14 = load %struct.linkedlist*, %struct.linkedlist** %5
%15 = call %struct.linkedlist* @linkedlist_tail(%struct.linkedlist* %14)
%16 = call i64 @linkedlist_get(i32 %13, %struct.linkedlist* %15)
store i64 %16, i64* %3
br label %17
17: ; preds = %11, %8
%18 = load i64, i64* %3
ret i64 %18
}

LLVM IR (-O2):
%struct.linkedlist = type { i32 }
define i64 @linkedlist_get(i32 %0, %struct.linkedlist* %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %4, label %7
4: ; preds = %7, %2
%5 = phi %struct.linkedlist* [ %1, %2 ], [ %11, %7 ]
%6 = tail call i64 @linkedlist_head(%struct.linkedlist* %5)
ret i64 %6
7: ; preds = %2, %7
%8 = phi %struct.linkedlist* [ %11, %7 ], [ %1, %2 ]
%9 = phi i32 [ %10, %7 ], [ %0, %2 ]
%10 = add i32 %9, -1
%11 = tail call %struct.linkedlist* @linkedlist_tail(%struct.linkedlist* %8)
%12 = icmp eq i32 %10, 0
br i1 %12, label %4, label %7
}
/* Type definitions */
struct sockaddr {
  int dummy;
};
typedef int /*<<< orphan*/ socklen_t;

/* Variables and functions */
int /*<<< orphan*/ accept4(int, struct sockaddr *, int /*<<< orphan*/ *, int);
int util_safeio_get_fd(int /*<<< orphan*/);
int util_safeio_accept4(int sockfd, struct sockaddr *addr, socklen_t *addrlen,
                        int flags) {
  return util_safeio_get_fd(accept4(sockfd, addr, addrlen, flags));
}


x86 assembly (clang, -O0):
<util_safeio_accept4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
call   1030 <accept4@plt>
mov    %eax,%edi
call   1040 <util_safeio_get_fd@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<util_safeio_accept4>:
push   %rax
call   1030 <accept4@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <util_safeio_get_fd@plt>

LLVM IR (-O0):
%struct.sockaddr = type { i32 }
define i32 @util_safeio_accept4(i32 %0, %struct.sockaddr* %1, i32* %2, i32 %3) {
%5 = alloca i32
%6 = alloca %struct.sockaddr*
%7 = alloca i32*
%8 = alloca i32
store i32 %0, i32* %5
store %struct.sockaddr* %1, %struct.sockaddr** %6
store i32* %2, i32** %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = load %struct.sockaddr*, %struct.sockaddr** %6
%11 = load i32*, i32** %7
%12 = load i32, i32* %8
%13 = call i32 @accept4(i32 %9, %struct.sockaddr* %10, i32* %11, i32 %12)
%14 = call i32 @util_safeio_get_fd(i32 %13)
ret i32 %14
}

LLVM IR (-O2):
%struct.sockaddr = type { i32 }
define i32 @util_safeio_accept4(i32 %0, %struct.sockaddr* %1, i32* %2, i32 %3) {
%5 = tail call i32 @accept4(i32 %0, %struct.sockaddr* %1, i32* %2, i32 %3)
%6 = tail call i32 @util_safeio_get_fd(i32 %5)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ newline();
int /*<<< orphan*/ output_with_tab(char *);
void gen_jump_case(void) {
  output_with_tab("jmp \tcccase");
  newline();
}


x86 assembly (clang, -O0):
<gen_jump_case>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <output_with_tab@plt>
mov    $0x0,%al
call   1030 <newline@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<gen_jump_case>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <output_with_tab@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <newline@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"jmp \09cccase\00"
define void @gen_jump_case() {
%1 = call i32 @output_with_tab(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @newline()
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"jmp \09cccase\00"
define void @gen_jump_case() {
%1 = tail call i32 @output_with_tab(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @newline()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, char *);
char *strrev(char *);
int main() {
  char str[50];
  char *rev;
  printf("vuvedi duma: ");
  scanf("%s", str);
  rev = strrev(str);
  printf("obyrnatata dyma e: %s", rev);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x40(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1040 <scanf@plt>
lea    -0x40(%rbp),%rdi
call   1050 <strrev@plt>
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rsi
lea    0xe99(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x40,%rsp
lea    0xec4(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed7(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1040 <scanf@plt>
mov    %rbx,%rdi
call   1050 <strrev@plt>
lea    0xeaa(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"vuvedi duma: \00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [22 x i8] c"obyrnatata dyma e: %s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [50 x i8]
%3 = alloca i8*
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%5 = getelementptr inbounds [50 x i8], [50 x i8]* %2, i64 0, i64 0
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %5)
%7 = getelementptr inbounds [50 x i8], [50 x i8]* %2, i64 0, i64 0
%8 = call i8* @strrev(i8* %7)
store i8* %8, i8** %3
%9 = load i8*, i8** %3
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i8* %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"vuvedi duma: \00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [22 x i8] c"obyrnatata dyma e: %s\00"
define i32 @main() {
%1 = alloca [50 x i8]
%2 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 0
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%5 = call i8* @strrev(i8* %2)
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i8* %5)
ret i32 0
}
int get_max(int a, int b) {
  if (a > b) {
    return a;
  } else {
    return b;
  }
}


x86 assembly (clang, -O0):
<get_max>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1121 <get_max+0x21>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1127 <get_max+0x27>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_max>:
mov    %esi,%eax
cmp    %esi,%edi
cmovg  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @get_max(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *malloc(int);
void oneLongExpression(int a) {
  int b = 15 + a + 15 - 10 - 20;
  char *buf = malloc(1);
  if (a != 0 && b == 0)
    return;
  free(buf);
}


x86 assembly (clang, -O0):
<oneLongExpression>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xf,%eax
add    $0xf,%eax
sub    $0xa,%eax
sub    $0x14,%eax
mov    %eax,-0x8(%rbp)
mov    $0x1,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1164 <oneLongExpression+0x44>
cmpl   $0x0,-0x8(%rbp)
jne    1164 <oneLongExpression+0x44>
jmp    116d <oneLongExpression+0x4d>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<oneLongExpression>:
push   %rax
mov    $0x1,%edi
call   1040 <malloc@plt>
mov    %rax,%rdi
pop    %rax
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @oneLongExpression(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = add nsw i32 15, %5
%7 = add nsw i32 %6, 15
%8 = sub nsw i32 %7, 10
%9 = sub nsw i32 %8, 20
store i32 %9, i32* %3
%10 = call i8* @malloc(i32 1)
store i8* %10, i8** %4
%11 = load i32, i32* %2
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %17
13: ; preds = %1
%14 = load i32, i32* %3
%15 = icmp eq i32 %14, 0
br i1 %15, label %16, label %17
16: ; preds = %13
br label %20
17: ; preds = %13, %1
%18 = load i8*, i8** %4
%19 = call i32 @free(i8* %18)
br label %20
20: ; preds = %17, %16
ret void
}

LLVM IR (-O2):
define void @oneLongExpression(i32 %0) {
%2 = tail call dereferenceable_or_null(1) i8* @malloc(i32 1)
%3 = tail call i32 @free(i8* %2)
ret void
}
void Msp430TimerCapComP__0__Compare__default__fired(void) {}


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

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

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

LLVM IR (-O2):
define void @Msp430TimerCapComP__0__Compare__default__fired() {
ret void
}
__attribute__((always_)) void __mwait(unsigned long eax, unsigned long ecx) {
  asm volatile(".byte 0x0f, 0x01, 0xc9;" ::"a"(eax), "c"(ecx));
}


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

x86 assembly (clang, -O2):
<__mwait>:
mov    %rsi,%rcx
mov    %rdi,%rax
mwait  %eax,%ecx
ret

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

LLVM IR (-O2):
define void @__mwait(i64 %0, i64 %1) {
tail call void asm sideeffect ".byte 0x0f, 0x01, 0xc9;", "{ax},{cx},~{dirflag},~{fpsr},~{flags}"(i64 %0, i64 %1)
ret void
}
int test_imm_1Aint64_highword_mem(long long *val) {
  return ((*val >> 32) & (0x1A << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_1Aint64_highword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
sar    $0x20,%rdx
and    $0x1a,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_1Aint64_highword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = ashr i64 %4, 32
%6 = and i64 %5, 26
%7 = icmp ne i64 %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_1Aint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 111669149696
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, char);
void showNum(char val, int count) {
  if (count == 8) {
    return;
  }
  printf("%d %x\n", count, (val >> count) & 0x01);
  showNum((val), (++count));
}


x86 assembly (clang, -O0):
<showNum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x8,-0x8(%rbp)
jne    1140 <showNum+0x20>
jmp    1172 <showNum+0x52>
mov    -0x8(%rbp),%esi
movsbl -0x1(%rbp),%eax
mov    -0x8(%rbp),%ecx
sar    %cl,%eax
and    $0x1,%eax
lea    0xeaa(%rip),%rdi
movsbl %al,%edx
call   1030 <printf@plt>
mov    -0x1(%rbp),%al
mov    -0x8(%rbp),%esi
add    $0x1,%esi
mov    %esi,-0x8(%rbp)
movsbl %al,%edi
call   1040 <showNum@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<showNum>:
push   %rbp
push   %r14
push   %rbx
cmp    $0x8,%esi
je     114b <showNum+0x3b>
mov    %esi,%ebx
movsbl %dil,%ebp
lea    0xeda(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
mov    %ebp,%edx
mov    %ebx,%ecx
shr    %cl,%edx
and    $0x1,%edx
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0x1,%ebx
cmp    $0x8,%ebx
jne    1130 <showNum+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%d %x\0A\00"
define void @showNum(i8 signext %0, i32 %1) {
%3 = alloca i8
%4 = alloca i32
store i8 %0, i8* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp eq i32 %5, 8
br i1 %6, label %7, label %8
7: ; preds = %2
br label %20
8: ; preds = %2
%9 = load i32, i32* %4
%10 = load i8, i8* %3
%11 = sext i8 %10 to i32
%12 = load i32, i32* %4
%13 = ashr i32 %11, %12
%14 = and i32 %13, 1
%15 = trunc i32 %14 to i8
%16 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %9, i8 signext %15)
%17 = load i8, i8* %3
%18 = load i32, i32* %4
%19 = add nsw i32 %18, 1
store i32 %19, i32* %4
br label %20
20: ; preds = %8, %7
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"%d %x\0A\00"
define void @showNum(i8 signext %0, i32 %1) {
%3 = icmp eq i32 %1, 8
br i1 %3, label %14, label %4
4: ; preds = %2
%5 = sext i8 %0 to i32
br label %6
6: ; preds = %4, %6
%7 = phi i32 [ %1, %4 ], [ %12, %6 ]
%8 = lshr i32 %5, %7
%9 = trunc i32 %8 to i8
%10 = and i8 %9, 1
%11 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %7, i8 signext %10)
%12 = add nsw i32 %7, 1
%13 = icmp eq i32 %12, 8
br i1 %13, label %14, label %6
14: ; preds = %6, %2
ret void
}
int f1(int x) { return (x << 5) | (int)((unsigned int)x >> 27); }


x86 assembly (clang, -O0):
<f1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x5,%eax
mov    -0x4(%rbp),%ecx
shr    $0x1b,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f1>:
mov    %edi,%eax
rol    $0x5,%eax
ret

LLVM IR (-O0):
define i32 @f1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = shl i32 %3, 5
%5 = load i32, i32* %2
%6 = lshr i32 %5, 27
%7 = or i32 %4, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @f1(i32 %0) {
%2 = tail call i32 @llvm.fshl.i32(i32 %0, i32 %0, i32 5)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ trap_R_RegisterShaderNoMip(char *);
void ConfirmMenu_Cache(void) {
  trap_R_RegisterShaderNoMip("menu/art/cut_frame");
}


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

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

LLVM IR (-O0):
@.str = [19 x i8] c"menu/art/cut_frame\00"
define void @ConfirmMenu_Cache() {
%1 = call i32 @trap_R_RegisterShaderNoMip(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"menu/art/cut_frame\00"
define void @ConfirmMenu_Cache() {
%1 = tail call i32 @trap_R_RegisterShaderNoMip(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
unsigned short app_usb_dir_create(char *, unsigned short);
unsigned short Usb_mkdir(char *dirname, unsigned short index) {
  return app_usb_dir_create(dirname, index);
}


x86 assembly (clang, -O0):
<Usb_mkdir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    -0x8(%rbp),%rdi
movzwl -0xa(%rbp),%esi
call   1030 <app_usb_dir_create@plt>
movzwl %ax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Usb_mkdir>:
jmp    1030 <app_usb_dir_create@plt>

LLVM IR (-O0):
define zeroext i16 @Usb_mkdir(i8* %0, i16 zeroext %1) {
%3 = alloca i8*
%4 = alloca i16
store i8* %0, i8** %3
store i16 %1, i16* %4
%5 = load i8*, i8** %3
%6 = load i16, i16* %4
%7 = call zeroext i16 @app_usb_dir_create(i8* %5, i16 zeroext %6)
ret i16 %7
}

LLVM IR (-O2):
define zeroext i16 @Usb_mkdir(i8* %0, i16 zeroext %1) {
%3 = tail call zeroext i16 @app_usb_dir_create(i8* %0, i16 zeroext %1)
ret i16 %3
}
/* Variables and functions */
int /*<<< orphan*/ BITHLm(int);
void BIT6HLm() { BITHLm(0x40); }


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

x86 assembly (clang, -O2):
<BIT6HLm>:
mov    $0x40,%edi
jmp    1030 <BITHLm@plt>

LLVM IR (-O0):
define void @BIT6HLm() {
%1 = call i32 @BITHLm(i32 64)
ret void
}

LLVM IR (-O2):
define void @BIT6HLm() {
%1 = tail call i32 @BITHLm(i32 64)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int strpbrk2(char *, char *);
int main(void) {
  int ret;
  char string[] = "RANDOM STRING";
  char vowel[] = "AEIOU";
  ret = strpbrk2(string, vowel);
  printf("Match found at position:%d\n", ret);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x16(%rbp)
mov    0xec8(%rip),%eax
mov    %eax,-0xe(%rbp)
mov    0xec2(%rip),%ax
mov    %ax,-0xa(%rbp)
mov    0xeba(%rip),%eax
mov    %eax,-0x1c(%rbp)
mov    0xeb4(%rip),%ax
mov    %ax,-0x18(%rbp)
lea    -0x16(%rbp),%rdi
lea    -0x1c(%rbp),%rsi
call   1040 <strpbrk2@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe98(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movabs $0x474e4952545320,%rax
mov    %rax,0xe(%rsp)
movabs $0x53204d4f444e4152,%rax
4d 20 53
mov    %rax,0x8(%rsp)
movw   $0x55,0x4(%rsp)
movl   $0x4f494541,(%rsp)
lea    0x8(%rsp),%rdi
mov    %rsp,%rsi
call   1040 <strpbrk2@plt>
lea    0xeb0(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.string = [14 x i8] c"RANDOM STRING\00"
@__const.main.vowel = [6 x i8] c"AEIOU\00"
@.str = [28 x i8] c"Match found at position:%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [14 x i8]
%4 = alloca [6 x i8]
store i32 0, i32* %1
%5 = bitcast [14 x i8]* %3 to i8*
%6 = bitcast [6 x i8]* %4 to i8*
%7 = getelementptr inbounds [14 x i8], [14 x i8]* %3, i64 0, i64 0
%8 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 0
%9 = call i32 @strpbrk2(i8* %7, i8* %8)
store i32 %9, i32* %2
%10 = load i32, i32* %2
%11 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %10)
ret i32 0
}

LLVM IR (-O2):
@__const.main.string = [14 x i8] c"RANDOM STRING\00"
@__const.main.vowel = [6 x i8] c"AEIOU\00"
@.str = [28 x i8] c"Match found at position:%d\0A\00"
define i32 @main() {
%1 = alloca [14 x i8]
%2 = alloca [6 x i8]
%3 = getelementptr inbounds [14 x i8], [14 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 0
%5 = call i32 @strpbrk2(i8* %3, i8* %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Type definitions */
struct ui_out {
  int dummy;
};

/* Variables and functions */
void mi_text(struct ui_out *uiout, const char *string) {}


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

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

LLVM IR (-O0):
%struct.ui_out = type { i32 }
define void @mi_text(%struct.ui_out* %0, i8* %1) {
%3 = alloca %struct.ui_out*
%4 = alloca i8*
store %struct.ui_out* %0, %struct.ui_out** %3
store i8* %1, i8** %4
ret void
}

LLVM IR (-O2):
%struct.ui_out = type { i32 }
define void @mi_text(%struct.ui_out* nocapture %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ TRUE;
int /*<<< orphan*/ cbreak();
int /*<<< orphan*/ curs_set(int /*<<< orphan*/);
int /*<<< orphan*/ initscr();
int /*<<< orphan*/ keypad(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ noecho();
int /*<<< orphan*/ stdscr;
void init_screen(void) {
  initscr();
  cbreak();
  curs_set(0);
  keypad(stdscr, TRUE);
  noecho();
}


x86 assembly (clang, -O0):
<init_screen>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <initscr@plt>
mov    $0x0,%al
call   1030 <cbreak@plt>
xor    %edi,%edi
call   1070 <curs_set@plt>
mov    0x2e78(%rip),%rax
mov    (%rax),%edi
mov    0x2e67(%rip),%rax
mov    (%rax),%esi
call   1040 <keypad@plt>
mov    $0x0,%al
call   1060 <noecho@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_screen>:
push   %rax
xor    %eax,%eax
call   1050 <initscr@plt>
xor    %eax,%eax
call   1030 <cbreak@plt>
xor    %edi,%edi
call   1070 <curs_set@plt>
mov    0x2e7b(%rip),%rax
mov    (%rax),%edi
mov    0x2e6a(%rip),%rax
mov    (%rax),%esi
call   1040 <keypad@plt>
xor    %eax,%eax
pop    %rcx
jmp    1060 <noecho@plt>

LLVM IR (-O0):
@stdscr = global i32 0
@TRUE = global i32 0
define void @init_screen() {
%1 = call i32 (...) @initscr()
%2 = call i32 (...) @cbreak()
%3 = call i32 @curs_set(i32 0)
%4 = load i32, i32* @stdscr
%5 = load i32, i32* @TRUE
%6 = call i32 @keypad(i32 %4, i32 %5)
%7 = call i32 (...) @noecho()
ret void
}

LLVM IR (-O2):
@stdscr = global i32 0
@TRUE = global i32 0
define void @init_screen() {
%1 = tail call i32 (...) @initscr()
%2 = tail call i32 (...) @cbreak()
%3 = tail call i32 @curs_set(i32 0)
%4 = load i32, i32* @stdscr
%5 = load i32, i32* @TRUE
%6 = tail call i32 @keypad(i32 %4, i32 %5)
%7 = tail call i32 (...) @noecho()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ foo(int, int, int);
int main() {
  foo(3, 2, 1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x3,%edi
mov    $0x2,%esi
mov    $0x1,%edx
call   1030 <foo@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x3,%edi
mov    $0x2,%esi
mov    $0x1,%edx
call   1030 <foo@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(i32 3, i32 2, i32 1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, char const *, int);
char *safe_malloc(int);
char *strsubstr(const char *str, int start, int end) {
  int len = end - start;
  char *buffer = safe_malloc(len + 1);
  memcpy(buffer, &str[start], len);
  buffer[len] = '\0';
  return buffer;
}


x86 assembly (clang, -O0):
<strsubstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
add    $0x1,%edi
call   1030 <safe_malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x8(%rbp),%rsi
movslq -0xc(%rbp),%rax
add    %rax,%rsi
mov    -0x14(%rbp),%edx
call   1040 <memcpy@plt>
mov    -0x20(%rbp),%rax
movslq -0x14(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strsubstr>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %esi,%r15d
mov    %rdi,%r14
sub    %esi,%ebx
lea    0x1(%rbx),%edi
call   1030 <safe_malloc@plt>
mov    %rax,%rbp
movslq %r15d,%rsi
add    %r14,%rsi
mov    %rax,%rdi
mov    %ebx,%edx
call   1040 <memcpy@plt>
movslq %ebx,%rax
movb   $0x0,0x0(%rbp,%rax,1)
mov    %rbp,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define i8* @strsubstr(i8* %0, i32 %1, i32 %2) {
%4 = sub nsw i32 %2, %1
%5 = add nsw i32 %4, 1
%6 = tail call i8* @safe_malloc(i32 %5)
%7 = sext i32 %1 to i64
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = tail call i32 @memcpy(i8* %6, i8* %8, i32 %4)
%10 = sext i32 %4 to i64
%11 = getelementptr inbounds i8, i8* %6, i64 %10
store i8 0, i8* %11
ret i8* %6
}
/* Type definitions */
typedef int /*<<< orphan*/ s;

/* Variables and functions */
char *malloc(int);
int /*<<< orphan*/ memset(char *, char, int);
int /*<<< orphan*/ printf(char *, ...);
int main() {
  char *s;
  s = malloc(sizeof(char) * 30);
  printf("sizeof s is %lu\n", sizeof(s));
  memset(s, 'A', 30);
  printf("%s\n", s);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1e,%edi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
lea    0xeac(%rip),%rdi
mov    $0x8,%esi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rdi
mov    $0x41,%esi
mov    $0x1e,%edx
call   1040 <memset@plt>
mov    -0x10(%rbp),%rsi
lea    0xe93(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x1e,%edi
call   1060 <malloc@plt>
mov    %rax,%rbx
lea    0xeab(%rip),%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x41,%esi
mov    $0x1e,%edx
call   1050 <memset@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"sizeof s is %lu\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
%3 = call i8* @malloc(i32 30)
store i8* %3, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i64 8)
%5 = load i8*, i8** %2
%6 = call i32 @memset(i8* %5, i8 signext 65, i32 30)
%7 = load i8*, i8** %2
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"sizeof s is %lu\0A\00"
define i32 @main() {
%1 = tail call dereferenceable_or_null(30) i8* @malloc(i32 30)
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i64 8)
%3 = tail call i32 @memset(i8* %1, i8 signext 65, i32 30)
%4 = tail call i32 @puts(i8* dereferenceable(1) %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void eval_break(void) { fprintf(stderr, "break;"); }


x86 assembly (clang, -O0):
<eval_break>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<eval_break>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [7 x i8] c"break;\00"
define void @eval_break() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [7 x i8] c"break;\00"
define void @eval_break() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dummy(int *);
void paths_unsure(void) {
  int x;
  int y = 0;
  while (y == 1) {
    dummy(&x);
  }
  y += x;
}


x86 assembly (clang, -O0):
<paths_unsure>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    1137 <paths_unsure+0x27>
lea    -0x4(%rbp),%rdi
call   1030 <dummy@plt>
jmp    111f <paths_unsure+0xf>
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @paths_unsure() {
ret void
}
void XtHasCallbacks() {}


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

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

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

LLVM IR (-O2):
define void @XtHasCallbacks() {
ret void
}
/* Type definitions */
struct cmd_result {
  int dummy;
};
struct cmd {
  int dummy;
};

/* Variables and functions */
char *cmd_2_strcmd(struct cmd *);
struct cmd_result *exec_strcmd(int, char *);
int /*<<< orphan*/ free(char *);
struct cmd_result *exec_cmd(int socket, struct cmd *command) {
  char *cmd;
  struct cmd_result *result;
  cmd = cmd_2_strcmd(command);
  result = exec_strcmd(socket, cmd);
  free(cmd);
  return result;
}


x86 assembly (clang, -O0):
<exec_cmd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <cmd_2_strcmd@plt>
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x18(%rbp),%rsi
call   1040 <exec_strcmd@plt>
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exec_cmd>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
mov    %rsi,%rdi
call   1050 <cmd_2_strcmd@plt>
mov    %rax,%rbx
mov    %ebp,%edi
mov    %rax,%rsi
call   1040 <exec_strcmd@plt>
mov    %rax,%rbp
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %rbp,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.cmd_result = type { i32 }
%struct.cmd = type { i32 }
define %struct.cmd_result* @exec_cmd(i32 %0, %struct.cmd* %1) {
%3 = alloca i32
%4 = alloca %struct.cmd*
%5 = alloca i8*
%6 = alloca %struct.cmd_result*
store i32 %0, i32* %3
store %struct.cmd* %1, %struct.cmd** %4
%7 = load %struct.cmd*, %struct.cmd** %4
%8 = call i8* @cmd_2_strcmd(%struct.cmd* %7)
store i8* %8, i8** %5
%9 = load i32, i32* %3
%10 = load i8*, i8** %5
%11 = call %struct.cmd_result* @exec_strcmd(i32 %9, i8* %10)
store %struct.cmd_result* %11, %struct.cmd_result** %6
%12 = load i8*, i8** %5
%13 = call i32 @free(i8* %12)
%14 = load %struct.cmd_result*, %struct.cmd_result** %6
ret %struct.cmd_result* %14
}

LLVM IR (-O2):
%struct.cmd_result = type { i32 }
%struct.cmd = type { i32 }
define %struct.cmd_result* @exec_cmd(i32 %0, %struct.cmd* %1) {
%3 = tail call i8* @cmd_2_strcmd(%struct.cmd* %1)
%4 = tail call %struct.cmd_result* @exec_strcmd(i32 %0, i8* %3)
%5 = tail call i32 @free(i8* %3)
ret %struct.cmd_result* %4
}
void mdp4_lcdc_overlay_blt_start(struct msm_fb_data_type *mfd) {}


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

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

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

LLVM IR (-O2):
%struct.msm_fb_data_type = type opaque
define void @mdp4_lcdc_overlay_blt_start(%struct.msm_fb_data_type* nocapture %0) {
ret void
}