xunge/DecIR huggingface dataset:
unsigned xrop3_206_0_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  stk3 = ~T;
  stk2 = D & stk3;
  stk1 = S | stk2;
  return stk1;
}


x86 assembly (clang, -O0):
<xrop3_206_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%eax
and    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
or     -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_206_0_0>:
mov    %edi,%ecx
shl    $0x8,%ecx
or     %edi,%ecx
not    %sil
movzbl %sil,%eax
or     %ecx,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_206_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%11 = load i8, i8* %3
%12 = zext i8 %11 to i32
%13 = shl i32 %12, 8
%14 = load i8, i8* %3
%15 = zext i8 %14 to i32
%16 = or i32 %13, %15
store i32 %16, i32* %6
%17 = load i8, i8* %4
%18 = zext i8 %17 to i32
%19 = shl i32 %18, 8
%20 = load i8, i8* %4
%21 = zext i8 %20 to i32
%22 = or i32 %19, %21
store i32 %22, i32* %7
%23 = load i32, i32* %7
%24 = xor i32 %23, -1
store i32 %24, i32* %10
%25 = load i32, i32* %5
%26 = load i32, i32* %10
%27 = and i32 %25, %26
store i32 %27, i32* %9
%28 = load i32, i32* %6
%29 = load i32, i32* %9
%30 = or i32 %28, %29
store i32 %30, i32* %8
%31 = load i32, i32* %8
ret i32 %31
}

LLVM IR (-O2):
define i32 @xrop3_206_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = xor i8 %1, -1
%6 = zext i8 %5 to i32
%7 = or i32 %4, %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ LRDP(char *);
int /*<<< orphan*/ RDP_E(char *);
void uc6_obj_rendermode() {
  LRDP("uc6:obj_rendermode\n");
  RDP_E("uc6:obj_rendermode\n");
}


x86 assembly (clang, -O0):
<uc6_obj_rendermode>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <LRDP@plt>
lea    0xec9(%rip),%rdi
call   1030 <RDP_E@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<uc6_obj_rendermode>:
push   %rbx
lea    0xed8(%rip),%rbx
mov    %rbx,%rdi
call   1040 <LRDP@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <RDP_E@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"uc6:obj_rendermode\0A\00"
define void @uc6_obj_rendermode() {
%1 = call i32 @LRDP(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @RDP_E(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"uc6:obj_rendermode\0A\00"
define void @uc6_obj_rendermode() {
%1 = tail call i32 @LRDP(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @RDP_E(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ CFCUtil_isspace(char const);
void S_skip_whitespace(const char **json) {
  while (CFCUtil_isspace(json[0][0])) {
    *json = *json + 1;
  }
}


x86 assembly (clang, -O0):
<S_skip_whitespace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%edi
call   1030 <CFCUtil_isspace@plt>
cmp    $0x0,%rax
je     114c <S_skip_whitespace+0x3c>
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
jmp    111c <S_skip_whitespace+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<S_skip_whitespace>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rax
movsbl (%rax),%edi
nopw   0x0(%rax,%rax,1)
call   1030 <CFCUtil_isspace@plt>
test   %rax,%rax
je     113a <S_skip_whitespace+0x2a>
mov    (%rbx),%rax
lea    0x1(%rax),%rcx
mov    %rcx,(%rbx)
movsbl 0x1(%rax),%edi
jmp    1120 <S_skip_whitespace+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @S_skip_whitespace(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = load i8, i8* %2
%4 = tail call i64 @CFCUtil_isspace(i8 signext %3)
%5 = icmp eq i64 %4, 0
br i1 %5, label %12, label %6
6: ; preds = %1, %6
%7 = load i8*, i8** %0
%8 = getelementptr inbounds i8, i8* %7, i64 1
store i8* %8, i8** %0
%9 = load i8, i8* %8
%10 = tail call i64 @CFCUtil_isspace(i8 signext %9)
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %6
12: ; preds = %6, %1
ret void
}
void ReloadCmailMsgEvent(int unregister) { return; }


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

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

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

LLVM IR (-O2):
define void @ReloadCmailMsgEvent(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ delay();
void putc(char c) {
  while (((*((volatile unsigned long *)0x7F005018)) & (1 << 14)) == 1)
    delay();
  (*((volatile unsigned char *)0x7F005020)) = c;
}


x86 assembly (clang, -O0):
<putc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x7f005018,%eax
mov    (%rax),%rax
and    $0x4000,%rax
cmp    $0x1,%rax
jne    1142 <putc+0x32>
mov    $0x0,%al
call   1030 <delay@plt>
jmp    111e <putc+0xe>
mov    -0x1(%rbp),%cl
mov    $0x7f005020,%eax
mov    %cl,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putc>:
mov    0x7f005018,%rax
7f
mov    %dil,0x7f005020
7f
ret

LLVM IR (-O0):
define void @putc(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
br label %3
3: ; preds = %7, %1
%4 = load volatile i64, i64* inttoptr (i64 2130726936 to i64*)
%5 = and i64 %4, 16384
%6 = icmp eq i64 %5, 1
br i1 %6, label %7, label %9
7: ; preds = %3
%8 = call i32 (...) @delay()
br label %3
9: ; preds = %3
%10 = load i8, i8* %2
store volatile i8 %10, i8* inttoptr (i64 2130726944 to i8*)
ret void
}

LLVM IR (-O2):
define void @putc(i8 signext %0) {
%2 = load volatile i64, i64* inttoptr (i64 2130726936 to i64*)
store volatile i8 %0, i8* inttoptr (i64 2130726944 to i8*)
ret void
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int copy_quaddobl_start_system_to_container(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(263, a, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<copy_quaddobl_start_system_to_container>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x107,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_quaddobl_start_system_to_container>:
mov    $0x107,%edi
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @copy_quaddobl_start_system_to_container() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc(i32 263, i32* %5, i32* %6, double* %7)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @copy_quaddobl_start_system_to_container() {
%1 = tail call i32 @_ada_use_c2phc(i32 263, i32* undef, i32* undef, double* undef)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ right_uns_shift32();
int main() {
  right_uns_shift32();
  exit(0);
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @right_uns_shift32()
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
scalar_t__ malloc(int);
int /*<<< orphan*/ sprintf(char *, char *, unsigned long);
char *itex2MML_character_reference(unsigned long int code) {
  char *entity = (char *)malloc(10);
  sprintf(entity, "&#x%05x;", code);
  return entity;
}


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

x86 assembly (clang, -O2):
<itex2MML_character_reference>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    $0xa,%edi
call   1030 <malloc@plt>
mov    %rax,%rbx
lea    0xec5(%rip),%rsi
mov    %rax,%rdi
mov    %r14,%rdx
call   1040 <sprintf@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [9 x i8] c"&#x%05x;\00"
define i8* @itex2MML_character_reference(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = call i64 @malloc(i32 10)
%5 = inttoptr i64 %4 to i8*
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = load i64, i64* %2
%8 = call i32 @sprintf(i8* %6, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i64 %7)
%9 = load i8*, i8** %3
ret i8* %9
}

LLVM IR (-O2):
@.str = [9 x i8] c"&#x%05x;\00"
define i8* @itex2MML_character_reference(i64 %0) {
%2 = tail call i64 @malloc(i32 10)
%3 = inttoptr i64 %2 to i8*
%4 = tail call i32 @sprintf(i8* dereferenceable(1) %3, i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i64 %0)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ skip_chars(char **, char *);
void skip_blanks(char **data) { skip_chars(data, " \t"); }


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

x86 assembly (clang, -O2):
<skip_blanks>:
lea    0xee9(%rip),%rsi
jmp    1030 <skip_chars@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c" \09\00"
define void @skip_blanks(i8** %0) {
%2 = tail call i32 @skip_chars(i8** %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret void
}
__attribute__((always_)) void __NOP(void) { __asm volatile("nop"); }


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

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

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

LLVM IR (-O2):
define void @__NOP() {
tail call void asm sideeffect "nop", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ z_streamp;

/* Variables and functions */
void testdeflate(z_streamp strm) { return; }


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

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

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

LLVM IR (-O2):
define void @testdeflate(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ UPnPResponse_RenderingControl_SetMute(void *);
int /*<<< orphan*/ printf(char *, unsigned int, char *, int);
void UPnPRenderingControl_SetMute(void *upnptoken, unsigned int InstanceID,
                                  char *Channel, int DesiredMute) {
  printf("Invoke: UPnPRenderingControl_SetMute(%u,%s,%d);\r\n", InstanceID,
         Channel, DesiredMute);
  UPnPResponse_RenderingControl_SetMute(upnptoken);
}


x86 assembly (clang, -O0):
<UPnPRenderingControl_SetMute>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
lea    0xeb9(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <UPnPResponse_RenderingControl_SetMute@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UPnPRenderingControl_SetMute>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
call   1040 <printf@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <UPnPResponse_RenderingControl_SetMute@plt>

LLVM IR (-O0):
@.str = [50 x i8] c"Invoke: UPnPRenderingControl_SetMute(%u,%s,%d);\0D\0A\00"
define void @UPnPRenderingControl_SetMute(i8* %0, i32 %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
store i8* %0, i8** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load i32, i32* %6
%10 = load i8*, i8** %7
%11 = load i32, i32* %8
%12 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i32 %9, i8* %10, i32 %11)
%13 = load i8*, i8** %5
%14 = call i32 @UPnPResponse_RenderingControl_SetMute(i8* %13)
ret void
}

LLVM IR (-O2):
@.str = [50 x i8] c"Invoke: UPnPRenderingControl_SetMute(%u,%s,%d);\0D\0A\00"
define void @UPnPRenderingControl_SetMute(i8* %0, i32 %1, i8* %2, i32 %3) {
%5 = tail call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0), i32 %1, i8* %2, i32 %3)
%6 = tail call i32 @UPnPResponse_RenderingControl_SetMute(i8* %0)
ret void
}
void GPIOPortL_Handler(void) {
  while (1) {
  }
}


x86 assembly (clang, -O0):
<GPIOPortL_Handler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <GPIOPortL_Handler+0x9>
jmp    1109 <GPIOPortL_Handler+0x9>

x86 assembly (clang, -O2):
<GPIOPortL_Handler>:
jmp    1100 <GPIOPortL_Handler>

LLVM IR (-O0):
define void @GPIOPortL_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @GPIOPortL_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ test_repositoryAddObject();
int /*<<< orphan*/ test_repositoryCreateDestroy();
int /*<<< orphan*/ test_repositoryDeleteByID();
int /*<<< orphan*/ test_repositoryFindByID();
int /*<<< orphan*/ test_repositorySave();
void test_Repositories() {
  test_repositoryCreateDestroy();
  test_repositoryAddObject();
  test_repositoryFindByID();
  test_repositoryDeleteByID();
  test_repositorySave();
}


x86 assembly (clang, -O0):
<test_Repositories>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1070 <test_repositoryCreateDestroy@plt>
mov    $0x0,%al
call   1030 <test_repositoryAddObject@plt>
mov    $0x0,%al
call   1060 <test_repositoryFindByID@plt>
mov    $0x0,%al
call   1040 <test_repositoryDeleteByID@plt>
mov    $0x0,%al
call   1050 <test_repositorySave@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_Repositories>:
push   %rax
xor    %eax,%eax
call   1070 <test_repositoryCreateDestroy@plt>
xor    %eax,%eax
call   1030 <test_repositoryAddObject@plt>
xor    %eax,%eax
call   1060 <test_repositoryFindByID@plt>
xor    %eax,%eax
call   1040 <test_repositoryDeleteByID@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <test_repositorySave@plt>

LLVM IR (-O0):
define void @test_Repositories() {
%1 = call i32 (...) @test_repositoryCreateDestroy()
%2 = call i32 (...) @test_repositoryAddObject()
%3 = call i32 (...) @test_repositoryFindByID()
%4 = call i32 (...) @test_repositoryDeleteByID()
%5 = call i32 (...) @test_repositorySave()
ret void
}

LLVM IR (-O2):
define void @test_Repositories() {
%1 = tail call i32 (...) @test_repositoryCreateDestroy()
%2 = tail call i32 (...) @test_repositoryAddObject()
%3 = tail call i32 (...) @test_repositoryFindByID()
%4 = tail call i32 (...) @test_repositoryDeleteByID()
%5 = tail call i32 (...) @test_repositorySave()
ret void
}
/* Variables and functions */
int O_CREAT;
int O_TRUNC;
int O_WRONLY;
int /*<<< orphan*/ close(int);
int open(char *, int, int);
int /*<<< orphan*/ write(int, char *, int);
void wrt(char *name, char *ptr, int len) {
  int ofd = open(name, O_WRONLY | O_CREAT | O_TRUNC, 0660);
  write(ofd, ptr, len);
  close(ofd);
}


x86 assembly (clang, -O0):
<wrt>:
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    0x2e7a(%rip),%rax
mov    (%rax),%esi
mov    0x2ea1(%rip),%rax
or     (%rax),%esi
mov    0x2e90(%rip),%rax
or     (%rax),%esi
mov    $0x1b0,%edx
call   1050 <open@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <write@plt>
mov    -0x18(%rbp),%edi
call   1040 <close@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wrt>:
push   %rbp
push   %r14
push   %rbx
mov    0x2e8d(%rip),%rcx
mov    0x2eb6(%rip),%rax
mov    (%rax),%eax
or     (%rcx),%eax
mov    %edx,%r14d
mov    %rsi,%rbx
mov    0x2e9d(%rip),%rcx
or     (%rcx),%eax
mov    %eax,%esi
mov    $0x1b0,%edx
call   1050 <open@plt>
mov    %eax,%ebp
mov    %eax,%edi
mov    %rbx,%rsi
mov    %r14d,%edx
call   1030 <write@plt>
mov    %ebp,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <close@plt>

LLVM IR (-O0):
@O_WRONLY = global i32 0
@O_CREAT = global i32 0
@O_TRUNC = global i32 0
define void @wrt(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = load i8*, i8** %4
%9 = load i32, i32* @O_WRONLY
%10 = load i32, i32* @O_CREAT
%11 = or i32 %9, %10
%12 = load i32, i32* @O_TRUNC
%13 = or i32 %11, %12
%14 = call i32 @open(i8* %8, i32 %13, i32 432)
store i32 %14, i32* %7
%15 = load i32, i32* %7
%16 = load i8*, i8** %5
%17 = load i32, i32* %6
%18 = call i32 @write(i32 %15, i8* %16, i32 %17)
%19 = load i32, i32* %7
%20 = call i32 @close(i32 %19)
ret void
}

LLVM IR (-O2):
@O_WRONLY = global i32 0
@O_CREAT = global i32 0
@O_TRUNC = global i32 0
define void @wrt(i8* nocapture %0, i8* nocapture %1, i32 %2) {
%4 = load i32, i32* @O_WRONLY
%5 = load i32, i32* @O_CREAT
%6 = or i32 %5, %4
%7 = load i32, i32* @O_TRUNC
%8 = or i32 %6, %7
%9 = tail call i32 @open(i8* %0, i32 %8, i32 432)
%10 = tail call i32 @write(i32 %9, i8* %1, i32 %2)
%11 = tail call i32 @close(i32 %9)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ mode_t;

/* Variables and functions */
int mkdir(const char *pathname, mode_t mode) { return -1; }


x86 assembly (clang, -O0):
<mkdir>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @mkdir(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
ret i32 -1
}

LLVM IR (-O2):
define i32 @mkdir(i8* nocapture readnone %0, i32 %1) {
ret i32 -1
}
/* Type definitions */
typedef scalar_t__ __m128i;

/* Variables and functions */
__m128i __attribute__((__always___, __nodebug__))
_mm_sub_epi64(__m128i a, __m128i b) {
  return a - b;
}


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

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

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

LLVM IR (-O2):
define i64 @_mm_sub_epi64(i64 %0, i64 %1) {
%3 = sub nsw i64 %0, %1
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int, char const *,
                           char const *);
int /*<<< orphan*/ stderr;
scalar_t__ strcmp(char const *, char const *);
void docheck(const char *buf, const char *expect, int line) {
  if (strcmp(buf, expect) != 0) {
    fprintf(stderr, "test failed on line %d: got [%s] expected [%s]\n", line,
            buf, expect);
    abort();
  }
}


x86 assembly (clang, -O0):
<docheck>:
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),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
je     1181 <docheck+0x51>
mov    0x2e7f(%rip),%rax
mov    (%rax),%edi
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rcx
mov    -0x10(%rbp),%r8
lea    0xe8b(%rip),%rsi
call   1050 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<docheck>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %rdi,%rbp
call   1040 <strcmp@plt>
test   %rax,%rax
jne    114c <docheck+0x1c>
pop    %rbx
pop    %r14
pop    %rbp
ret
mov    0x2e8d(%rip),%rax
mov    (%rax),%edi
lea    0xea4(%rip),%rsi
mov    %r14d,%edx
mov    %rbp,%rcx
mov    %rbx,%r8
call   1050 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [48 x i8] c"test failed on line %d: got [%s] expected [%s]\0A\00"
define void @docheck(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 = call i64 @strcmp(i8* %7, i8* %8)
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %18
11: ; preds = %3
%12 = load i32, i32* @stderr
%13 = load i32, i32* %6
%14 = load i8*, i8** %4
%15 = load i8*, i8** %5
%16 = call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i32 %13, i8* %14, i8* %15)
%17 = call i32 (...) @abort()
unreachable
18: ; preds = %3
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [48 x i8] c"test failed on line %d: got [%s] expected [%s]\0A\00"
define void @docheck(i8* %0, i8* %1, i32 %2) {
%4 = tail call i64 @strcmp(i8* %0, i8* %1)
%5 = icmp eq i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %3
%7 = load i32, i32* @stderr
%8 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i32 %2, i8* %0, i8* %1)
%9 = tail call i32 (...) @abort()
unreachable
10: ; preds = %3
ret void
}
/* Variables and functions */
int get_line(char *, int);
int /*<<< orphan*/ printf(char *, char *);
int main() {
  int len;
  char line[1000];
  while ((len = get_line(line, 1000)) > 0)
    if (len >= 80)
      printf("%s\n", line);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x3f0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x3f0(%rbp),%rdi
mov    $0x3e8,%esi
call   1030 <get_line@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jle    1171 <main+0x51>
cmpl   $0x50,-0x8(%rbp)
jl     116c <main+0x4c>
lea    -0x3f0(%rbp),%rsi
lea    0xe99(%rip),%rdi
call   1040 <printf@plt>
jmp    1132 <main+0x12>
mov    -0x4(%rbp),%eax
add    $0x3f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x3e8,%rsp
mov    %rsp,%rdi
mov    $0x3e8,%esi
call   1030 <get_line@plt>
test   %eax,%eax
jle    1173 <main+0x53>
lea    0xebe(%rip),%r14
mov    %rsp,%rbx
jmp    1161 <main+0x41>
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    $0x3e8,%esi
call   1030 <get_line@plt>
test   %eax,%eax
jle    1173 <main+0x53>
cmp    $0x50,%eax
jb     1150 <main+0x30>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
jmp    1150 <main+0x30>
xor    %eax,%eax
add    $0x3e8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [1000 x i8]
%2 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%3 = call i32 @get_line(i8* %2, i32 1000)
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %13
5: ; preds = %0, %10
%6 = phi i32 [ %11, %10 ], [ %3, %0 ]
%7 = icmp ugt i32 %6, 79
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
br label %10
10: ; preds = %8, %5
%11 = call i32 @get_line(i8* %2, i32 1000)
%12 = icmp sgt i32 %11, 0
br i1 %12, label %5, label %13
13: ; preds = %10, %0
ret i32 0
}
void I422ToYUY2Row_C() {}


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

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

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

LLVM IR (-O2):
define void @I422ToYUY2Row_C() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char, int);
void variableScope() {
  char a = '1';
  int y;
  {
    char a = '2';
    y = a;
  }
  printf("%c   %c\n", a, y);
}


x86 assembly (clang, -O0):
<variableScope>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0x31,-0x1(%rbp)
movb   $0x32,-0x9(%rbp)
movsbl -0x9(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x1(%rbp),%al
mov    -0x8(%rbp),%edx
lea    0xecc(%rip),%rdi
movsbl %al,%esi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<variableScope>:
lea    0xee9(%rip),%rdi
mov    $0x31,%esi
mov    $0x32,%edx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"%c %c\0A\00"
define void @variableScope() {
%1 = alloca i8
%2 = alloca i32
%3 = alloca i8
store i8 49, i8* %1
store i8 50, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
store i32 %5, i32* %2
%6 = load i8, i8* %1
%7 = load i32, i32* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8 signext %6, i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"%c %c\0A\00"
define void @variableScope() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8 signext 49, i32 50)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void cginocache_other() {
  printf("Cache-Control: no-store\n");
  printf("Pragma: no-cache\n");
}


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

x86 assembly (clang, -O2):
<cginocache_other>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xef4(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"Cache-Control: no-store\0A\00"
@.str.1 = [18 x i8] c"Pragma: no-cache\0A\00"
define void @cginocache_other() {
%1 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [24 x i8] c"Cache-Control: no-store\00"
@str.2 = [17 x i8] c"Pragma: no-cache\00"
define void @cginocache_other() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ isalnum(char);
int isNonBreakingChar(char c) {
  if (isalnum(c)) {
    return 1;
  }
  switch (c) {
  case '$':
  case '_':
    return 1;
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<isNonBreakingChar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%edi
call   1030 <isalnum@plt>
cmp    $0x0,%rax
je     113d <isNonBreakingChar+0x2d>
movl   $0x1,-0x4(%rbp)
jmp    1176 <isNonBreakingChar+0x66>
movsbl -0x5(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x24,%eax
je     1163 <isNonBreakingChar+0x53>
jmp    1152 <isNonBreakingChar+0x42>
mov    -0xc(%rbp),%eax
sub    $0x5f,%eax
jne    116f <isNonBreakingChar+0x5f>
jmp    1163 <isNonBreakingChar+0x53>
movl   $0x1,-0x4(%rbp)
jmp    1176 <isNonBreakingChar+0x66>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isNonBreakingChar>:
push   %rbx
mov    %edi,%ebx
call   1030 <isalnum@plt>
test   %rax,%rax
setne  %al
cmp    $0x24,%bl
sete   %cl
cmp    $0x5f,%bl
sete   %dl
or     %cl,%dl
or     %al,%dl
movzbl %dl,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @isNonBreakingChar(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = call i64 @isalnum(i8 signext %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 1, i32* %2
br label %13
8: ; preds = %1
%9 = load i8, i8* %3
%10 = sext i8 %9 to i32
switch i32 %10, label %12 [
i32 36, label %11
i32 95, label %11
]
11: ; preds = %8, %8
store i32 1, i32* %2
br label %13
12: ; preds = %8
store i32 0, i32* %2
br label %13
13: ; preds = %12, %11, %7
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @isNonBreakingChar(i8 signext %0) {
%2 = tail call i64 @isalnum(i8 signext %0)
%3 = icmp ne i64 %2, 0
%4 = icmp eq i8 %0, 36
%5 = icmp eq i8 %0, 95
%6 = or i1 %4, %5
%7 = or i1 %3, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int EXIT_SUCCESS;
int resetVectorDoubleZero(double *a, int n) {
  int i;
  for (i = 0; i < n; i++)
    a[i] = 0.0;
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<resetVectorDoubleZero>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    113c <resetVectorDoubleZero+0x3c>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1112 <resetVectorDoubleZero+0x12>
mov    0x2e9d(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<resetVectorDoubleZero>:
push   %rax
test   %esi,%esi
jle    1122 <resetVectorDoubleZero+0x12>
mov    %esi,%edx
shl    $0x3,%rdx
xor    %esi,%esi
call   1030 <memset@plt>
mov    0x2eb7(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define i32 @resetVectorDoubleZero(double* %0, i32 %1) {
%3 = alloca double*
%4 = alloca i32
%5 = alloca i32
store double* %0, double** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %15, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %18
10: ; preds = %6
%11 = load double*, double** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds double, double* %11, i64 %13
store double 0.000000e+00, double* %14
br label %15
15: ; preds = %10
%16 = load i32, i32* %5
%17 = add nsw i32 %16, 1
store i32 %17, i32* %5
br label %6
18: ; preds = %6
%19 = load i32, i32* @EXIT_SUCCESS
ret i32 %19
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @resetVectorDoubleZero(double* nocapture writeonly %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = bitcast double* %0 to i8*
%6 = zext i32 %1 to i64
%7 = shl nuw nsw i64 %6, 3
br label %8
8: ; preds = %4, %2
%9 = load i32, i32* @EXIT_SUCCESS
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ mkdir(char *, int);
char *strchr(char *, char);
void mkdirp(char *s) {
  char *p;
  for (p = strchr(s + 1, '/'); p; p = strchr(p + 1, '/')) {
    *p = 0;
    mkdir(s, 0755);
    *p = '/';
  }
  mkdir(s, 0755);
}


x86 assembly (clang, -O0):
<mkdirp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
add    $0x1,%rdi
mov    $0x2f,%esi
call   1040 <strchr@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1184 <mkdirp+0x64>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rdi
mov    $0x1ed,%esi
call   1030 <mkdir@plt>
mov    -0x10(%rbp),%rax
movb   $0x2f,(%rax)
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
mov    $0x2f,%esi
call   1040 <strchr@plt>
mov    %rax,-0x10(%rbp)
jmp    1142 <mkdirp+0x22>
mov    -0x8(%rbp),%rdi
mov    $0x1ed,%esi
call   1030 <mkdir@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mkdirp>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
add    $0x1,%rdi
mov    $0x2f,%esi
call   1040 <strchr@plt>
test   %rax,%rax
je     116c <mkdirp+0x4c>
mov    %rax,%rbx
nopl   (%rax)
movb   $0x0,(%rbx)
mov    %r14,%rdi
mov    $0x1ed,%esi
call   1030 <mkdir@plt>
movb   $0x2f,(%rbx)
add    $0x1,%rbx
mov    %rbx,%rdi
mov    $0x2f,%esi
call   1040 <strchr@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1140 <mkdirp+0x20>
mov    %r14,%rdi
mov    $0x1ed,%esi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <mkdir@plt>

LLVM IR (-O0):
define void @mkdirp(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i64 1
%6 = call i8* @strchr(i8* %5, i8 signext 47)
store i8* %6, i8** %3
br label %7
7: ; preds = %15, %1
%8 = load i8*, i8** %3
%9 = icmp ne i8* %8, null
br i1 %9, label %10, label %19
10: ; preds = %7
%11 = load i8*, i8** %3
store i8 0, i8* %11
%12 = load i8*, i8** %2
%13 = call i32 @mkdir(i8* %12, i32 493)
%14 = load i8*, i8** %3
store i8 47, i8* %14
br label %15
15: ; preds = %10
%16 = load i8*, i8** %3
%17 = getelementptr inbounds i8, i8* %16, i64 1
%18 = call i8* @strchr(i8* %17, i8 signext 47)
store i8* %18, i8** %3
br label %7
19: ; preds = %7
%20 = load i8*, i8** %2
%21 = call i32 @mkdir(i8* %20, i32 493)
ret void
}

LLVM IR (-O2):
define void @mkdirp(i8* %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 1
%3 = tail call i8* @strchr(i8* %2, i8 signext 47)
%4 = icmp eq i8* %3, null
br i1 %4, label %11, label %5
5: ; preds = %1, %5
%6 = phi i8* [ %9, %5 ], [ %3, %1 ]
store i8 0, i8* %6
%7 = tail call i32 @mkdir(i8* %0, i32 493)
store i8 47, i8* %6
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = tail call i8* @strchr(i8* %8, i8 signext 47)
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %5
11: ; preds = %5, %1
%12 = tail call i32 @mkdir(i8* %0, i32 493)
ret void
}
unsigned short SYS_SwapShort(unsigned short x) { return x; }


x86 assembly (clang, -O0):
<SYS_SwapShort>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define zeroext i16 @SYS_SwapShort(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
ret i16 %3
}

LLVM IR (-O2):
define zeroext i16 @SYS_SwapShort(i16 returned zeroext %0) {
ret i16 %0
}
int Characters__is_space_or_tab(int c) {
  if ((c == ' ') || (c == '\t'))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<Characters__is_space_or_tab>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x20,-0x8(%rbp)
je     111b <Characters__is_space_or_tab+0x1b>
cmpl   $0x9,-0x8(%rbp)
jne    1127 <Characters__is_space_or_tab+0x27>
movl   $0x1,-0x4(%rbp)
jmp    112e <Characters__is_space_or_tab+0x2e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Characters__is_space_or_tab>:
cmp    $0x20,%edi
sete   %al
cmp    $0x9,%edi
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @Characters__is_space_or_tab(i32 %0) {
%2 = icmp eq i32 %0, 32
%3 = icmp eq i32 %0, 9
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(unsigned char *, unsigned char const *, int);
void rs_poly_copy(unsigned char *_p, const unsigned char *_q, int _dp1) {
  memcpy(_p, _q, _dp1 * sizeof(*_p));
}


x86 assembly (clang, -O0):
<rs_poly_copy>:
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),%rsi
movslq -0x14(%rbp),%rax
shl    $0x0,%rax
mov    %eax,%edx
call   1030 <memcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rs_poly_copy>:
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
define void @rs_poly_copy(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 = sext i32 %9 to i64
%11 = mul i64 %10, 1
%12 = trunc i64 %11 to i32
%13 = call i32 @memcpy(i8* %7, i8* %8, i32 %12)
ret void
}

LLVM IR (-O2):
define void @rs_poly_copy(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @memcpy(i8* %0, i8* %1, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ usleep(unsigned long);
void mini_sleep(unsigned long int_time) { usleep(int_time); }


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

x86 assembly (clang, -O2):
<mini_sleep>:
jmp    1030 <usleep@plt>

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

LLVM IR (-O2):
define void @mini_sleep(i64 %0) {
%2 = tail call i32 @usleep(i64 %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ wint_t;

/* Variables and functions */
int __istype(int /*<<< orphan*/, int);
int iswrune(wint_t wc) { return (__istype(wc, 0xFFFFFF00L)); }


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

x86 assembly (clang, -O2):
<iswrune>:
mov    $0xffffff00,%esi
jmp    1030 <__istype@plt>

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

LLVM IR (-O2):
define i32 @iswrune(i32 %0) {
%2 = tail call i32 @__istype(i32 %0, i32 -256)
ret i32 %2
}
/* Variables and functions */
int not_exist();
int foo(void) { return not_exist(); }


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

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

LLVM IR (-O0):
define i32 @foo() {
%1 = call i32 (...) @not_exist()
ret i32 %1
}

LLVM IR (-O2):
define i32 @foo() {
%1 = tail call i32 (...) @not_exist()
ret i32 %1
}
int kbhit(void) {
  return ((*(volatile unsigned int *)((0x3FF0000 + 0xD008))) & 0x20);
}


x86 assembly (clang, -O0):
<kbhit>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3ffd008,%eax
mov    (%rax),%eax
and    $0x20,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<kbhit>:
mov    0x3ffd008,%eax
and    $0x20,%eax
ret

LLVM IR (-O0):
define i32 @kbhit() {
%1 = load volatile i32, i32* inttoptr (i64 67096584 to i32*)
%2 = and i32 %1, 32
ret i32 %2
}

LLVM IR (-O2):
define i32 @kbhit() {
%1 = load volatile i32, i32* inttoptr (i64 67096584 to i32*)
%2 = and i32 %1, 32
ret i32 %2
}
int MediaSetBitRate(int streamid, int value) {
  int retVal = -1;
  retVal = 0;
  return retVal;
}


x86 assembly (clang, -O0):
<MediaSetBitRate>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0xffffffff,-0xc(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @MediaSetBitRate(i32 %0, i32 %1) {
ret i32 0
}
/* Variables and functions */
char *my_strchr(char *string_ptr, char find) {
  while (*string_ptr != find) {
    if (*string_ptr == '\0')
      return (NULL);
    ++string_ptr;
  }
  return (string_ptr);
}


x86 assembly (clang, -O0):
<my_strchr>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
movsbl -0x11(%rbp),%ecx
cmp    %ecx,%eax
je     114f <my_strchr+0x4f>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    113e <my_strchr+0x3e>
movq   $0x0,-0x8(%rbp)
jmp    1157 <my_strchr+0x57>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    110e <my_strchr+0xe>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_strchr>:
mov    %rdi,%rax
mov    (%rdi),%cl
cmp    %sil,%cl
je     1121 <my_strchr+0x21>
nopw   0x0(%rax,%rax,1)
test   %cl,%cl
je     1122 <my_strchr+0x22>
movzbl 0x1(%rax),%ecx
add    $0x1,%rax
cmp    %sil,%cl
jne    1110 <my_strchr+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i8* @my_strchr(i8* %0, i8 signext %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, %1
br i1 %4, label %13, label %5
5: ; preds = %2, %9
%6 = phi i8 [ %11, %9 ], [ %3, %2 ]
%7 = phi i8* [ %10, %9 ], [ %0, %2 ]
%8 = icmp eq i8 %6, 0
br i1 %8, label %13, label %9
9: ; preds = %5
%10 = getelementptr inbounds i8, i8* %7, i64 1
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, %1
br i1 %12, label %13, label %5
13: ; preds = %5, %9, %2
%14 = phi i8* [ %0, %2 ], [ %10, %9 ], [ null, %5 ]
ret i8* %14
}
/* Variables and functions */
int max_ii(int, int);
int max_iii(int a, int b, int c) { return max_ii(max_ii(a, b), c); }


x86 assembly (clang, -O0):
<max_iii>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <max_ii@plt>
mov    %eax,%edi
mov    -0xc(%rbp),%esi
call   1030 <max_ii@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<max_iii>:
push   %rbx
mov    %edx,%ebx
call   1030 <max_ii@plt>
mov    %eax,%edi
mov    %ebx,%esi
pop    %rbx
jmp    1030 <max_ii@plt>

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

LLVM IR (-O2):
define i32 @max_iii(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @max_ii(i32 %0, i32 %1)
%5 = tail call i32 @max_ii(i32 %4, i32 %2)
ret i32 %5
}
__attribute__((always_)) void pcie_set_ecrc_checking(struct pci_dev *dev) {
  return;
}


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

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

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

LLVM IR (-O2):
%struct.pci_dev = type opaque
define void @pcie_set_ecrc_checking(%struct.pci_dev* nocapture %0) {
ret void
}
__attribute__((no)) char fn1(int x, const char *y, int z, const char *w,
                             const char *v) {
  asm volatile("" : : "r"(w), "r"(v) : "memory");
  asm volatile("" : "+r"(x) : "r"(y), "r"(z) : "memory");
  return x;
}


x86 assembly (clang, -O0):
<fn1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x28(%rbp),%rcx
mov    -0x4(%rbp),%eax
mov    -0x10(%rbp),%rcx
mov    -0x14(%rbp),%edx
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
movsbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define signext i8 @fn1(i32 %0, i8* %1, i32 %2, i8* %3, i8* %4) {
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i8*
store i32 %0, i32* %6
store i8* %1, i8** %7
store i32 %2, i32* %8
store i8* %3, i8** %9
store i8* %4, i8** %10
%11 = load i8*, i8** %9
%12 = load i8*, i8** %10
%13 = load i32, i32* %6
%14 = load i8*, i8** %7
%15 = load i32, i32* %8
%16 = call i32 asm sideeffect "", "=r,r,r,0,~{memory},~{dirflag},~{fpsr},~{flags}"(i8* %14, i32 %15, i32 %13)
store i32 %16, i32* %6
%17 = load i32, i32* %6
%18 = trunc i32 %17 to i8
ret i8 %18
}

LLVM IR (-O2):
define signext i8 @fn1(i32 %0, i8* %1, i32 %2, i8* %3, i8* %4) {
tail call void asm sideeffect "", "r,r,~{memory},~{dirflag},~{fpsr},~{flags}"(i8* %3, i8* %4)
%6 = tail call i32 asm sideeffect "", "=r,r,r,0,~{memory},~{dirflag},~{fpsr},~{flags}"(i8* %1, i32 %2, i32 %0)
%7 = trunc i32 %6 to i8
ret i8 %7
}