xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ DEBUG_ASSERT(int /*<<< orphan*/);
int /*<<< orphan*/ SSIBaseValid(unsigned long);
void SSIDMAEnable(unsigned long ulBase, unsigned long ulDMAFlags) {
  DEBUG_ASSERT(SSIBaseValid(ulBase));
  (*((volatile unsigned long *)(ulBase + 0x00000024))) |= ulDMAFlags;
}


x86 assembly (clang, -O0):
<SSIDMAEnable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <SSIBaseValid@plt>
mov    %eax,%edi
call   1030 <DEBUG_ASSERT@plt>
mov    -0x10(%rbp),%rdx
mov    -0x8(%rbp),%rax
mov    0x24(%rax),%rcx
or     %rdx,%rcx
mov    %rcx,0x24(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SSIDMAEnable>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <SSIBaseValid@plt>
mov    %eax,%edi
call   1030 <DEBUG_ASSERT@plt>
or     %r14,0x24(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @SSIDMAEnable(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 = call i32 @SSIBaseValid(i64 %5)
%7 = call i32 @DEBUG_ASSERT(i32 %6)
%8 = load i64, i64* %4
%9 = load i64, i64* %3
%10 = add i64 %9, 36
%11 = inttoptr i64 %10 to i64*
%12 = load volatile i64, i64* %11
%13 = or i64 %12, %8
store volatile i64 %13, i64* %11
ret void
}

LLVM IR (-O2):
define void @SSIDMAEnable(i64 %0, i64 %1) {
%3 = tail call i32 @SSIBaseValid(i64 %0)
%4 = tail call i32 @DEBUG_ASSERT(i32 %3)
%5 = add i64 %0, 36
%6 = inttoptr i64 %5 to i64*
%7 = load volatile i64, i64* %6
%8 = or i64 %7, %1
store volatile i64 %8, i64* %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("No OpenSSL support.\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [20 x i8] c"No OpenSSL support.\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void lgtd_lifx_gateway_handle_ambient_light(
    struct lgtd_lifx_gateway *gw, const struct lgtd_lifx_packet_header *hdr,
    const struct lgtd_lifx_packet_ambient_light *pkt) {
  (void)gw;
  (void)hdr;
  (void)pkt;
}


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

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

LLVM IR (-O0):
%struct.lgtd_lifx_gateway = type opaque
%struct.lgtd_lifx_packet_header = type opaque
%struct.lgtd_lifx_packet_ambient_light = type opaque
define void @lgtd_lifx_gateway_handle_ambient_light(%struct.lgtd_lifx_gateway* %0, %struct.lgtd_lifx_packet_header* %1, %struct.lgtd_lifx_packet_ambient_light* %2) {
%4 = alloca %struct.lgtd_lifx_gateway*
%5 = alloca %struct.lgtd_lifx_packet_header*
%6 = alloca %struct.lgtd_lifx_packet_ambient_light*
store %struct.lgtd_lifx_gateway* %0, %struct.lgtd_lifx_gateway** %4
store %struct.lgtd_lifx_packet_header* %1, %struct.lgtd_lifx_packet_header** %5
store %struct.lgtd_lifx_packet_ambient_light* %2, %struct.lgtd_lifx_packet_ambient_light** %6
%7 = load %struct.lgtd_lifx_gateway*, %struct.lgtd_lifx_gateway** %4
%8 = load %struct.lgtd_lifx_packet_header*, %struct.lgtd_lifx_packet_header** %5
%9 = load %struct.lgtd_lifx_packet_ambient_light*, %struct.lgtd_lifx_packet_ambient_light** %6
ret void
}

LLVM IR (-O2):
%struct.lgtd_lifx_gateway = type opaque
%struct.lgtd_lifx_packet_header = type opaque
%struct.lgtd_lifx_packet_ambient_light = type opaque
define void @lgtd_lifx_gateway_handle_ambient_light(%struct.lgtd_lifx_gateway* nocapture %0, %struct.lgtd_lifx_packet_header* nocapture %1, %struct.lgtd_lifx_packet_ambient_light* nocapture %2) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ RegReadA(int, unsigned char *);
int /*<<< orphan*/ WitTim(int);
void AccWit(unsigned char UcTrgDat) {
  unsigned char UcFlgVal;
  unsigned char UcCnt;
  for (UcCnt = 0; UcCnt < 60; UcCnt++) {
    RegReadA(0x0282, &UcFlgVal);
    UcFlgVal &= UcTrgDat;
    if (UcFlgVal == 0)
      break;
    WitTim(10);
  }
}


x86 assembly (clang, -O0):
<AccWit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movb   $0x0,-0x3(%rbp)
movzbl -0x3(%rbp),%eax
cmp    $0x3c,%eax
jge    1183 <AccWit+0x63>
mov    $0x282,%edi
lea    -0x2(%rbp),%rsi
call   1040 <RegReadA@plt>
movzbl -0x1(%rbp),%ecx
movzbl -0x2(%rbp),%eax
and    %ecx,%eax
mov    %al,-0x2(%rbp)
movzbl -0x2(%rbp),%eax
cmp    $0x0,%eax
jne    116c <AccWit+0x4c>
jmp    1183 <AccWit+0x63>
mov    $0xa,%edi
call   1030 <WitTim@plt>
mov    -0x3(%rbp),%al
add    $0x1,%al
mov    %al,-0x3(%rbp)
jmp    1132 <AccWit+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<AccWit>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebp
mov    $0x3c,%bl
lea    0xf(%rsp),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x282,%edi
mov    %r14,%rsi
call   1040 <RegReadA@plt>
and    %bpl,0xf(%rsp)
je     1163 <AccWit+0x43>
mov    $0xa,%edi
call   1030 <WitTim@plt>
add    $0xff,%bl
jne    1140 <AccWit+0x20>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @AccWit(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %2
store i8 0, i8* %4
br label %5
5: ; preds = %23, %1
%6 = load i8, i8* %4
%7 = zext i8 %6 to i32
%8 = icmp slt i32 %7, 60
br i1 %8, label %9, label %26
9: ; preds = %5
%10 = call i32 @RegReadA(i32 642, i8* %3)
%11 = load i8, i8* %2
%12 = zext i8 %11 to i32
%13 = load i8, i8* %3
%14 = zext i8 %13 to i32
%15 = and i32 %14, %12
%16 = trunc i32 %15 to i8
store i8 %16, i8* %3
%17 = load i8, i8* %3
%18 = zext i8 %17 to i32
%19 = icmp eq i32 %18, 0
br i1 %19, label %20, label %21
20: ; preds = %9
br label %26
21: ; preds = %9
%22 = call i32 @WitTim(i32 10)
br label %23
23: ; preds = %21
%24 = load i8, i8* %4
%25 = add i8 %24, 1
store i8 %25, i8* %4
br label %5
26: ; preds = %20, %5
ret void
}

LLVM IR (-O2):
define void @AccWit(i8 zeroext %0) {
%2 = alloca i8
br label %3
3: ; preds = %1, %9
%4 = phi i8 [ 0, %1 ], [ %11, %9 ]
%5 = call i32 @RegReadA(i32 642, i8* %2)
%6 = load i8, i8* %2
%7 = and i8 %6, %0
store i8 %7, i8* %2
%8 = icmp eq i8 %7, 0
br i1 %8, label %13, label %9
9: ; preds = %3
%10 = call i32 @WitTim(i32 10)
%11 = add nuw nsw i8 %4, 1
%12 = icmp eq i8 %11, 60
br i1 %12, label %13, label %3
13: ; preds = %3, %9
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int a;
  scanf("%d", &a);
  if (a % 2 != 0) {
    printf("%d\n", a);
  } else {
    printf("%d\n", a - 1);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     1167 <main+0x47>
mov    -0x8(%rbp),%esi
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
jmp    1179 <main+0x59>
mov    -0x8(%rbp),%esi
sub    $0x1,%esi
lea    0xe8f(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
mov    %eax,%ecx
and    $0x1,%ecx
lea    (%rcx,%rax,1),%esi
add    $0xffffffff,%esi
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = and i32 %4, 1
%6 = add nsw i32 %5, -1
%7 = add nsw i32 %4, %6
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %7)
ret i32 0
}
unsigned stm32_gpio_to_pin(unsigned gpio) { return gpio % 16; }


x86 assembly (clang, -O0):
<stm32_gpio_to_pin>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xf,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<stm32_gpio_to_pin>:
mov    %edi,%eax
and    $0xf,%eax
ret

LLVM IR (-O0):
define i32 @stm32_gpio_to_pin(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = urem i32 %3, 16
ret i32 %4
}

LLVM IR (-O2):
define i32 @stm32_gpio_to_pin(i32 %0) {
%2 = and i32 %0, 15
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ Xfree(char *);
void XVncExtFreeParamList(char **list) {
  if (list) {
    Xfree(list[0] - 1);
    Xfree((char *)list);
  }
}


x86 assembly (clang, -O0):
<XVncExtFreeParamList>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1140 <XVncExtFreeParamList+0x30>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
add    $0xffffffffffffffff,%rdi
call   1030 <Xfree@plt>
mov    -0x8(%rbp),%rdi
call   1030 <Xfree@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<XVncExtFreeParamList>:
test   %rdi,%rdi
je     112e <XVncExtFreeParamList+0x1e>
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
add    $0xffffffffffffffff,%rdi
call   1030 <Xfree@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <Xfree@plt>
ret

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

LLVM IR (-O2):
define void @XVncExtFreeParamList(i8** %0) {
%2 = icmp eq i8** %0, null
br i1 %2, label %9, label %3
3: ; preds = %1
%4 = load i8*, i8** %0
%5 = getelementptr inbounds i8, i8* %4, i64 -1
%6 = tail call i32 @Xfree(i8* %5)
%7 = bitcast i8** %0 to i8*
%8 = tail call i32 @Xfree(i8* %7)
br label %9
9: ; preds = %3, %1
ret void
}
int main(void) {
  int a = 1;
  int b;
  switch (a) {
  case 1:
    b = 2;
  case 2:
    b = 1;
  case 3:
    b = -6;
  case 4:
    b = -7;
  default:
    b = 1024;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0x3,%eax
ja     1157 <main+0x57>
mov    -0x18(%rbp),%rax
lea    0xece(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x2,-0xc(%rbp)
movl   $0x1,-0xc(%rbp)
movl   $0xfffffffa,-0xc(%rbp)
movl   $0xfffffff9,-0xc(%rbp)
movl   $0x400,-0xc(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
%4 = load i32, i32* %2
switch i32 %4, label %9 [
i32 1, label %5
i32 2, label %6
i32 3, label %7
i32 4, label %8
]
5: ; preds = %0
store i32 2, i32* %3
br label %6
6: ; preds = %0, %5
store i32 1, i32* %3
br label %7
7: ; preds = %0, %6
store i32 -6, i32* %3
br label %8
8: ; preds = %0, %7
store i32 -7, i32* %3
br label %9
9: ; preds = %0, %8
store i32 1024, i32* %3
br label %10
10: ; preds = %9
%11 = load i32, i32* %1
ret i32 %11
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
int GetPointerTypeSize(void) { return sizeof(void *); }


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

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

LLVM IR (-O0):
define i32 @GetPointerTypeSize() {
ret i32 8
}

LLVM IR (-O2):
define i32 @GetPointerTypeSize() {
ret i32 8
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int main() {
  while (1)
    assert(0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %edi,%edi
call   1030 <assert@plt>
jmp    111f <main+0xf>

x86 assembly (clang, -O2):
<main>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %edi,%edi
call   1030 <assert@plt>
jmp    1120 <main+0x10>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %0, %2
%3 = call i32 @assert(i32 0)
br label %2
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = tail call i32 @assert(i32 0)
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("재미있는 C언어 프로그래밍!");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [38 x i8] c"\EC\9E\AC\EB\AF\B8\EC\9E\88\EB\8A\94 C\EC\96\B8\EC\96\B4 \ED\94\84\EB\A1\9C\EA\B7\B8\EB\9E\98\EB\B0\8D!\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [38 x i8] c"\EC\9E\AC\EB\AF\B8\EC\9E\88\EB\8A\94 C\EC\96\B8\EC\96\B4 \ED\94\84\EB\A1\9C\EA\B7\B8\EB\9E\98\EB\B0\8D!\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int sub(int, int);
int main(void) {
  if (sub(8, 5) != 3)
    abort();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x8,%edi
mov    $0x5,%esi
call   1050 <sub@plt>
cmp    $0x3,%eax
je     115e <main+0x2e>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x8,%edi
mov    $0x5,%esi
call   1050 <sub@plt>
cmp    $0x3,%eax
jne    114c <main+0x1c>
xor    %edi,%edi
call   1040 <exit@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @sub(i32 8, i32 5)
%3 = icmp ne i32 %2, 3
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @abort()
unreachable
6: ; preds = %0
%7 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @sub(i32 8, i32 5)
%2 = icmp eq i32 %1, 3
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = tail call i32 @exit(i32 0)
unreachable
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int led_get();
int /*<<< orphan*/ led_set(int);
void led_on(uint32_t led_id) { led_set(led_get() | (1 << (led_id << 4))); }


x86 assembly (clang, -O0):
<led_on>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <led_get@plt>
mov    %eax,%edi
mov    -0x4(%rbp),%ecx
shl    $0x4,%ecx
mov    $0x1,%eax
shl    %cl,%eax
or     %eax,%edi
call   1040 <led_set@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<led_on>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <led_get@plt>
shl    $0x4,%ebx
bts    %ebx,%eax
mov    %eax,%edi
pop    %rbx
jmp    1040 <led_set@plt>

LLVM IR (-O0):
define void @led_on(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @led_get()
%4 = load i32, i32* %2
%5 = shl i32 %4, 4
%6 = shl i32 1, %5
%7 = or i32 %3, %6
%8 = call i32 @led_set(i32 %7)
ret void
}

LLVM IR (-O2):
define void @led_on(i32 %0) {
%2 = tail call i32 (...) @led_get()
%3 = shl i32 %0, 4
%4 = shl nuw i32 1, %3
%5 = or i32 %2, %4
%6 = tail call i32 @led_set(i32 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ swap(int *, int *);
int main() {
  int x = 1;
  int y = 123;
  printf("Before swapping: x = %d y = %d\n", x, y);
  swap(&x, &y);
  printf("After swapping: x = %d y = %d\n", x, y);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x4(%rbp)
movl   $0x7b,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
lea    -0x4(%rbp),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <swap@plt>
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x1,0x4(%rsp)
movl   $0x7b,(%rsp)
lea    0xec9(%rip),%rdi
mov    $0x1,%esi
mov    $0x7b,%edx
call   1030 <printf@plt>
lea    0x4(%rsp),%rdi
mov    %rsp,%rsi
call   1040 <swap@plt>
mov    0x4(%rsp),%esi
mov    (%rsp),%edx
lea    0xebf(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [32 x i8] c"Before swapping: x = %d y = %d\0A\00"
@.str.1 = [31 x i8] c"After swapping: x = %d y = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 1, i32* %1
store i32 123, i32* %2
%3 = load i32, i32* %1
%4 = load i32, i32* %2
%5 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %4)
%6 = call i32 @swap(i32* %1, i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i32 %7, i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [32 x i8] c"Before swapping: x = %d y = %d\0A\00"
@.str.1 = [31 x i8] c"After swapping: x = %d y = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
store i32 1, i32* %1
%4 = bitcast i32* %2 to i8*
store i32 123, i32* %2
%5 = tail call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 1, i32 123)
%6 = call i32 @swap(i32* %1, i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i32 %7, i32 %8)
ret i32 0
}
/* Variables and functions */
scalar_t__ _any_except(char const, char *, int);
char const *_is_nospcrlfcl(char const *peek) {
  return _any_except(*peek, "\0\r\n :", 5) ? peek + 1 : NULL;
}


x86 assembly (clang, -O0):
<_is_nospcrlfcl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
lea    0xed9(%rip),%rsi
mov    $0x5,%edx
movsbl (%rax),%edi
call   1030 <_any_except@plt>
cmp    $0x0,%rax
je     114f <_is_nospcrlfcl+0x3f>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    115a <_is_nospcrlfcl+0x4a>
xor    %eax,%eax
mov    %rax,-0x10(%rbp)
jmp    115a <_is_nospcrlfcl+0x4a>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_is_nospcrlfcl>:
push   %rbx
mov    %rdi,%rbx
movsbl (%rdi),%edi
lea    0xee2(%rip),%rsi
mov    $0x5,%edx
call   1030 <_any_except@plt>
add    $0x1,%rbx
test   %rax,%rax
cmovne %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"\00\0D\0A :\00"
define i8* @_is_nospcrlfcl(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = call i64 @_any_except(i8 signext %4, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 5)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = getelementptr inbounds i8, i8* %8, i64 1
br label %11
10: ; preds = %1
br label %11
11: ; preds = %10, %7
%12 = phi i8* [ %9, %7 ], [ null, %10 ]
ret i8* %12
}

LLVM IR (-O2):
@.str = [6 x i8] c"\00\0D\0A :\00"
define i8* @_is_nospcrlfcl(i8* %0) {
%2 = load i8, i8* %0
%3 = tail call i64 @_any_except(i8 signext %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 5)
%4 = icmp eq i64 %3, 0
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = select i1 %4, i8* null, i8* %5
ret i8* %6
}
/* Variables and functions */
int /*<<< orphan*/ code(char *);
int /*<<< orphan*/ codeln(char *);
void includeSystem(char *headerFile) {
  code("#include <");
  code(headerFile);
  codeln(">");
}


x86 assembly (clang, -O0):
<includeSystem>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
call   1040 <code@plt>
mov    -0x8(%rbp),%rdi
call   1040 <code@plt>
lea    0xec3(%rip),%rdi
call   1030 <codeln@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<includeSystem>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
call   1040 <code@plt>
mov    %rbx,%rdi
call   1040 <code@plt>
lea    0xecc(%rip),%rdi
pop    %rbx
jmp    1030 <codeln@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"#include <\00"
@.str.1 = [2 x i8] c">\00"
define void @includeSystem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @code(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 @code(i8* %4)
%6 = call i32 @codeln(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"#include <\00"
@.str.1 = [2 x i8] c">\00"
define void @includeSystem(i8* %0) {
%2 = tail call i32 @code(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @code(i8* %0)
%4 = tail call i32 @codeln(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}
double area_rectangle(double length, double width) { return length * width; }


x86 assembly (clang, -O0):
<area_rectangle>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<area_rectangle>:
mulsd  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define double @area_rectangle(double %0, double %1) {
%3 = fmul double %0, %1
ret double %3
}
void PEM_def_callback(void) {}


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

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

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

LLVM IR (-O2):
define void @PEM_def_callback() {
ret void
}
int test_imm_B8int8_reg(signed char val) {
  return ((val) & (0xB8 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_B8int8_reg(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = and i32 %4, 184
%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_B8int8_reg(i8 signext %0) {
%2 = and i8 %0, -72
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ assume(int);
int main() {
  int i;
  assume(i < 10 && i > -10);
  while (i * i < 100) {
    i = i + 1;
  }
  assert(i == 10);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0xa,-0x8(%rbp)
mov    %al,-0x9(%rbp)
jge    1148 <main+0x28>
cmpl   $0xfffffff6,-0x8(%rbp)
setg   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assume@plt>
mov    -0x8(%rbp),%eax
imul   -0x8(%rbp),%eax
cmp    $0x64,%eax
jge    1173 <main+0x53>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1155 <main+0x35>
cmpl   $0xa,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 10
br i1 %4, label %5, label %8
5: ; preds = %0
%6 = load i32, i32* %2
%7 = icmp sgt i32 %6, -10
br label %8
8: ; preds = %5, %0
%9 = phi i1 [ false, %0 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
%11 = call i32 @assume(i32 %10)
br label %12
12: ; preds = %17, %8
%13 = load i32, i32* %2
%14 = load i32, i32* %2
%15 = mul nsw i32 %13, %14
%16 = icmp slt i32 %15, 100
br i1 %16, label %17, label %20
17: ; preds = %12
%18 = load i32, i32* %2
%19 = add nsw i32 %18, 1
store i32 %19, i32* %2
br label %12
20: ; preds = %12
%21 = load i32, i32* %2
%22 = icmp eq i32 %21, 10
%23 = zext i1 %22 to i32
%24 = call i32 @assert(i32 %23)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assume(i32 0)
%2 = tail call i32 @assert(i32 0)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ _bytecode_write(int /*<<< orphan*/, int /*<<< orphan*/,
                                   int /*<<< orphan*/, int /*<<< orphan*/,
                                   int /*<<< orphan*/, int /*<<< orphan*/);
uint32_t bytecode_iconst(int32_t value) {
  return _bytecode_write(0, *((uint32_t *)&value), 0, 0, 0, 0);
}


x86 assembly (clang, -O0):
<bytecode_iconst>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
xor    %r9d,%r9d
mov    %r9d,%edi
mov    %r9d,%edx
mov    %r9d,%ecx
mov    %r9d,%r8d
call   1030 <_bytecode_write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bytecode_iconst>:
mov    %edi,%esi
xor    %edi,%edi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
jmp    1030 <_bytecode_write@plt>

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

LLVM IR (-O2):
define i32 @bytecode_iconst(i32 %0) {
%2 = tail call i32 @_bytecode_write(i32 0, i32 %0, i32 0, i32 0, i32 0, i32 0)
ret i32 %2
}
/* Type definitions */
typedef unsigned long uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
void I2CSlaveAddressSet(uint32_t ui32Base, uint8_t ui8SlaveAddr) {
  ;
  ;
  (*((volatile unsigned long *)(0x40002000 + 0x00000000))) = ui8SlaveAddr;
}


x86 assembly (clang, -O0):
<I2CSlaveAddressSet>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
mov    $0x40002000,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<I2CSlaveAddressSet>:
mov    %rsi,0x40002000
40
ret

LLVM IR (-O0):
define void @I2CSlaveAddressSet(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
store i32 %0, i32* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
store volatile i64 %5, i64* inttoptr (i64 1073750016 to i64*)
ret void
}

LLVM IR (-O2):
define void @I2CSlaveAddressSet(i32 %0, i64 %1) {
store volatile i64 %1, i64* inttoptr (i64 1073750016 to i64*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void usage(char *argv0) {
  printf("usage: %s [-l] file.dat [-o output]\n", argv0);
}


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

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

LLVM IR (-O0):
@.str = [37 x i8] c"usage: %s [-l] file.dat [-o output]\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [37 x i8] c"usage: %s [-l] file.dat [-o output]\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *sr_build_path(char const *, char const *, int /*<<< orphan*/ *);
char *sr_file_to_string(char *, char **);
char *file_contents(const char *directory, const char *file,
                    char **error_message) {
  char *path = sr_build_path(directory, file, NULL);
  char *contents = sr_file_to_string(path, error_message);
  free(path);
  return contents;
}


x86 assembly (clang, -O0):
<file_contents>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1050 <sr_build_path@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <sr_file_to_string@plt>
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
mov    -0x28(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<file_contents>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
xor    %edx,%edx
call   1050 <sr_build_path@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1040 <sr_file_to_string@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @file_contents(i8* %0, i8* %1, i8** %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8**
%7 = alloca i8*
%8 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8** %2, i8*** %6
%9 = load i8*, i8** %4
%10 = load i8*, i8** %5
%11 = call i8* @sr_build_path(i8* %9, i8* %10, i32* null)
store i8* %11, i8** %7
%12 = load i8*, i8** %7
%13 = load i8**, i8*** %6
%14 = call i8* @sr_file_to_string(i8* %12, i8** %13)
store i8* %14, i8** %8
%15 = load i8*, i8** %7
%16 = call i32 @free(i8* %15)
%17 = load i8*, i8** %8
ret i8* %17
}

LLVM IR (-O2):
define i8* @file_contents(i8* %0, i8* %1, i8** %2) {
%4 = tail call i8* @sr_build_path(i8* %0, i8* %1, i32* null)
%5 = tail call i8* @sr_file_to_string(i8* %4, i8** %2)
%6 = tail call i32 @free(i8* %4)
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ Free(void **);
void free_f(char *str) { Free((void **)&str); }


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

x86 assembly (clang, -O2):
<free_f>:
push   %rax
mov    %rdi,(%rsp)
mov    %rsp,%rdi
call   1030 <Free@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @free_f(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @Free(i8** %2)
ret void
}

LLVM IR (-O2):
define void @free_f(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @Free(i8** %2)
ret void
}
void xmplayer_code_lock_start(void) {}


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

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

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

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

/* Variables and functions */
int mutex_lock(int /*<<< orphan*/ *);
int pthread_mutex_lock(pthread_mutex_t *mutex) { return mutex_lock(mutex); }


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

x86 assembly (clang, -O2):
<pthread_mutex_lock>:
jmp    1030 <mutex_lock@plt>

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

LLVM IR (-O2):
define i32 @pthread_mutex_lock(i32* %0) {
%2 = tail call i32 @mutex_lock(i32* %0)
ret i32 %2
}
int is_Master_cpu(void) {
  unsigned int *c0dmar0;
  c0dmar0 = (unsigned int *)((0xB8001700) + 0x04);
  if (*c0dmar0 != (unsigned int)0x0)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<is_Master_cpu>:
push   %rbp
mov    %rsp,%rbp
mov    $0xb8001704,%eax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpl   $0x0,(%rax)
je     1126 <is_Master_cpu+0x26>
movl   $0x1,-0x4(%rbp)
jmp    112d <is_Master_cpu+0x2d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_Master_cpu>:
mov    $0xb8001704,%ecx
xor    %eax,%eax
cmpl   $0x0,(%rcx)
setne  %al
ret

LLVM IR (-O0):
define i32 @is_Master_cpu() {
%1 = alloca i32
%2 = alloca i32*
store i32* inttoptr (i64 3087013636 to i32*), i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %0
store i32 1, i32* %1
br label %8
7: ; preds = %0
store i32 0, i32* %1
br label %8
8: ; preds = %7, %6
%9 = load i32, i32* %1
ret i32 %9
}

LLVM IR (-O2):
define i32 @is_Master_cpu() {
%1 = load i32, i32* inttoptr (i64 3087013636 to i32*)
%2 = icmp ne i32 %1, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
char *strchr(const char *s, int c) {
  while (*s) {
    if (*s == c) {
      return (char *)s;
    }
    s++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<strchr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1146 <strchr+0x46>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    -0x14(%rbp),%eax
jne    1135 <strchr+0x35>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    114e <strchr+0x4e>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    110b <strchr+0xb>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strchr>:
mov    (%rdi),%cl
test   %cl,%cl
je     1123 <strchr+0x23>
mov    %rdi,%rax
nopl   0x0(%rax)
movsbl %cl,%ecx
cmp    %esi,%ecx
je     1125 <strchr+0x25>
movzbl 0x1(%rax),%ecx
add    $0x1,%rax
test   %cl,%cl
jne    1110 <strchr+0x10>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i8* @strchr(i8* %0, i32 %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %14, label %5
5: ; preds = %2, %10
%6 = phi i8 [ %12, %10 ], [ %3, %2 ]
%7 = phi i8* [ %11, %10 ], [ %0, %2 ]
%8 = sext i8 %6 to i32
%9 = icmp eq i32 %8, %1
br i1 %9, label %14, label %10
10: ; preds = %5
%11 = getelementptr inbounds i8, i8* %7, i64 1
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %5
14: ; preds = %5, %10, %2
%15 = phi i8* [ null, %2 ], [ null, %10 ], [ %7, %5 ]
ret i8* %15
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, ...);
void usage(char *argv0, char *text) {
  printf("%s\n", text);
  printf("\n\nUsage:\n\n%s S1 S2 S3 S4 ... Sn\n\n", argv0);
  printf("calculates n random shapes. Si can be C for circle, S for square or "
         "T for triangle, respectively\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xec5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xeb7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1030 <puts@plt>
lea    0xebd(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xece(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [34 x i8] c"\0A\0AUsage:\0A\0A%s S1 S2 S3 S4 ... Sn\0A\0A\00"
@.str.2 = [98 x i8] c"calculates n random shapes. Si can be C for circle, S for square or T for triangle, respectively\0A\00"
define void @usage(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = load i8*, i8** %3
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), i8* %7)
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([98 x i8], [98 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str.1 = [34 x i8] c"\0A\0AUsage:\0A\0A%s S1 S2 S3 S4 ... Sn\0A\0A\00"
@str = [97 x i8] c"calculates n random shapes. Si can be C for circle, S for square or T for triangle, respectively\00"
define void @usage(i8* %0, i8* nocapture %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) %1)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([97 x i8], [97 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 @exit(i32 1)
unreachable
}
void outl(unsigned int b, unsigned long int port) {
  *((volatile unsigned long *)((0x7c000000 + ((port) << 0)))) = b;
}


x86 assembly (clang, -O0):
<outl>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
shl    $0x0,%rax
add    $0x7c000000,%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<outl>:
mov    %edi,%eax
mov    %rax,0x7c000000(%rsi)
ret

LLVM IR (-O0):
define void @outl(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
store i32 %0, i32* %3
store i64 %1, i64* %4
%5 = load i32, i32* %3
%6 = zext i32 %5 to i64
%7 = load i64, i64* %4
%8 = shl i64 %7, 0
%9 = add i64 2080374784, %8
%10 = inttoptr i64 %9 to i64*
store volatile i64 %6, i64* %10
ret void
}

LLVM IR (-O2):
define void @outl(i32 %0, i64 %1) {
%3 = zext i32 %0 to i64
%4 = add i64 %1, 2080374784
%5 = inttoptr i64 %4 to i64*
store volatile i64 %3, i64* %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void exit_with_error(char *message, int exit_code) {
  fprintf(stderr, "ERROR: %s\n", message);
  exit(exit_code);
}


x86 assembly (clang, -O0):
<exit_with_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xebd(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0xc(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<exit_with_error>:
push   %rbx
mov    %esi,%ebx
mov    %rdi,%rdx
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
lea    0xeca(%rip),%rsi
call   1030 <fprintf@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [11 x i8] c"ERROR: %s\0A\00"
define void @exit_with_error(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %3
%7 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = load i32, i32* %4
%9 = call i32 @exit(i32 %8)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [11 x i8] c"ERROR: %s\0A\00"
define void @exit_with_error(i8* %0, i32 %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = tail call i32 @exit(i32 %1)
unreachable
}
int test_imm_D1int8_mem(signed char *val) {
  return ((*val) & (-0xD1 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_D1int8_mem>:
movsbl (%rdi),%eax
test   $0xffffff2f,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_D1int8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = sext i8 %2 to i32
%4 = and i32 %3, -209
%5 = icmp eq i32 %4, 0
%6 = select i1 %5, i32 -40, i32 -20
ret i32 %6
}
/* Variables and functions */
void *mxRealloc(void *, size_t);
void *def_realloc_func(void *opaque, void *address, size_t items, size_t size) {
  (void)opaque, (void)address, (void)items, (void)size;
  return mxRealloc(address, items * size);
}


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

x86 assembly (clang, -O2):
<def_realloc_func>:
mov    %rsi,%rdi
imul   %rcx,%rdx
mov    %rdx,%rsi
jmp    1030 <mxRealloc@plt>

LLVM IR (-O0):
define i8* @def_realloc_func(i8* %0, i8* %1, i64 %2, i64 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i64
store i8* %0, i8** %5
store i8* %1, i8** %6
store i64 %2, i64* %7
store i64 %3, i64* %8
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = load i64, i64* %7
%12 = load i64, i64* %8
%13 = load i8*, i8** %6
%14 = load i64, i64* %7
%15 = load i64, i64* %8
%16 = mul i64 %14, %15
%17 = call i8* @mxRealloc(i8* %13, i64 %16)
ret i8* %17
}

LLVM IR (-O2):
define i8* @def_realloc_func(i8* nocapture readnone %0, i8* %1, i64 %2, i64 %3) {
%5 = mul i64 %3, %2
%6 = tail call i8* @mxRealloc(i8* %1, i64 %5)
ret i8* %6
}
/* Variables and functions */
int /*<<< orphan*/ caller1();
void par_caller1() { caller1(); }


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

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

LLVM IR (-O0):
define void @par_caller1() {
%1 = call i32 (...) @caller1()
ret void
}

LLVM IR (-O2):
define void @par_caller1() {
%1 = tail call i32 (...) @caller1()
ret void
}
/* Variables and functions */
int f487(int *);
int f488(int *p) { return f487(p); }


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

x86 assembly (clang, -O2):
<f488>:
jmp    1030 <f487@plt>

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

LLVM IR (-O2):
define i32 @f488(i32* %0) {
%2 = tail call i32 @f487(i32* %0)
ret i32 %2
}
int test_imm_8Eint64_highword_reg(long long val) {
  return ((val >> 32) & (0x8E << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_8Eint64_highword_reg>:
movabs $0x8e00000000,%rax
test   %rax,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_8Eint64_highword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = ashr i64 %3, 32
%5 = and i64 %4, 142
%6 = icmp ne i64 %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_8Eint64_highword_reg(i64 %0) {
%2 = and i64 %0, 609885356032
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}