xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void printError() {
  printf("The line is not in the rectangle window.\n");
  exit(0);
}


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

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

LLVM IR (-O0):
@.str = [42 x i8] c"The line is not in the rectangle window.\0A\00"
define void @printError() {
%1 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [41 x i8] c"The line is not in the rectangle window.\00"
define void @printError() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}
int rightrot(int x, int n) {
  int x1 = ~(~0 << n);
  int x2 = x1 & x;
  int int_size = sizeof(int) * 8;
  int x3 = x2 << (int_size - n);
  int x4 = x >> n;
  int x5 = x1 << (int_size - n);
  int x6 = ~x5 & x4;
  int r = x6 | x3;
  return r;
}


x86 assembly (clang, -O0):
<rightrot>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
xor    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
and    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
movl   $0x20,-0x14(%rbp)
mov    -0x10(%rbp),%eax
mov    -0x14(%rbp),%ecx
sub    -0x8(%rbp),%ecx
shl    %cl,%eax
mov    %eax,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
sar    %cl,%eax
mov    %eax,-0x1c(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x14(%rbp),%ecx
sub    -0x8(%rbp),%ecx
shl    %cl,%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
xor    $0xffffffff,%eax
and    -0x1c(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
or     -0x18(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x28(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rightrot>:
mov    %esi,%r8d
mov    $0xffffffff,%eax
mov    %r8d,%ecx
shl    %cl,%eax
mov    %r8d,%edx
neg    %dl
mov    %edi,%esi
mov    %edx,%ecx
shl    %cl,%esi
mov    %r8d,%ecx
sar    %cl,%edi
not    %eax
mov    %edx,%ecx
shl    %cl,%eax
not    %eax
and    %edi,%eax
or     %esi,%eax
ret

LLVM IR (-O0):
define i32 @rightrot(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%13 = load i32, i32* %4
%14 = shl i32 -1, %13
%15 = xor i32 %14, -1
store i32 %15, i32* %5
%16 = load i32, i32* %5
%17 = load i32, i32* %3
%18 = and i32 %16, %17
store i32 %18, i32* %6
store i32 32, i32* %7
%19 = load i32, i32* %6
%20 = load i32, i32* %7
%21 = load i32, i32* %4
%22 = sub nsw i32 %20, %21
%23 = shl i32 %19, %22
store i32 %23, i32* %8
%24 = load i32, i32* %3
%25 = load i32, i32* %4
%26 = ashr i32 %24, %25
store i32 %26, i32* %9
%27 = load i32, i32* %5
%28 = load i32, i32* %7
%29 = load i32, i32* %4
%30 = sub nsw i32 %28, %29
%31 = shl i32 %27, %30
store i32 %31, i32* %10
%32 = load i32, i32* %10
%33 = xor i32 %32, -1
%34 = load i32, i32* %9
%35 = and i32 %33, %34
store i32 %35, i32* %11
%36 = load i32, i32* %11
%37 = load i32, i32* %8
%38 = or i32 %36, %37
store i32 %38, i32* %12
%39 = load i32, i32* %12
ret i32 %39
}

LLVM IR (-O2):
define i32 @rightrot(i32 %0, i32 %1) {
%3 = shl nsw i32 -1, %1
%4 = xor i32 %3, -1
%5 = sub nsw i32 32, %1
%6 = shl i32 %0, %5
%7 = ashr i32 %0, %1
%8 = shl i32 %4, %5
%9 = xor i32 %8, -1
%10 = and i32 %7, %9
%11 = or i32 %10, %6
ret i32 %11
}
unsigned char DRV_GET_PORT_MODE(char *PsBuffer, unsigned int *Length) {
  return 0;
}


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

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

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

LLVM IR (-O2):
define zeroext i8 @DRV_GET_PORT_MODE(i8* nocapture readnone %0, i32* nocapture readnone %1) {
ret i8 0
}
char *assert_pass() {
  do {
    if (!(0 == 0))
      return "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/marshall/mintest/refs/heads/master/"
             "tests/test_json.c"
             ":"
             "25"
             ": "
             "0 == 0";
  } while (0);
  return 0;
}


x86 assembly (clang, -O0):
<assert_pass>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <assert_pass+0x9>
jmp    110e <assert_pass+0xe>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i8* @assert_pass() {
br label %1
1: ; preds = %0
br label %2
2: ; preds = %1
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @assert_pass() {
ret i8* null
}
int is_leap_year(int year) {
  if ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<is_leap_year>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    112f <is_leap_year+0x2f>
mov    -0x8(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1143 <is_leap_year+0x43>
mov    -0x8(%rbp),%eax
mov    $0x190,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    114f <is_leap_year+0x4f>
movl   $0x1,-0x4(%rbp)
jmp    1156 <is_leap_year+0x56>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_leap_year>:
test   $0x3,%dil
sete   %al
imul   $0xc28f5c29,%edi,%ecx
add    $0x51eb850,%ecx
mov    %ecx,%edx
ror    $0x2,%edx
cmp    $0x28f5c29,%edx
setae  %dl
and    %al,%dl
ror    $0x4,%ecx
cmp    $0xa3d70b,%ecx
setb   %al
or     %dl,%al
movzbl %al,%eax
ret

LLVM IR (-O0):
define i32 @is_leap_year(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = srem i32 %4, 4
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i32, i32* %3
%9 = srem i32 %8, 100
%10 = icmp ne i32 %9, 0
br i1 %10, label %15, label %11
11: ; preds = %7, %1
%12 = load i32, i32* %3
%13 = srem i32 %12, 400
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %11, %7
store i32 1, i32* %2
br label %17
16: ; preds = %11
store i32 0, i32* %2
br label %17
17: ; preds = %16, %15
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @is_leap_year(i32 %0) {
%2 = and i32 %0, 3
%3 = icmp eq i32 %2, 0
%4 = srem i32 %0, 100
%5 = icmp ne i32 %4, 0
%6 = and i1 %3, %5
%7 = srem i32 %0, 400
%8 = icmp eq i32 %7, 0
%9 = or i1 %8, %6
%10 = zext i1 %9 to i32
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ SHUT_RDWR;
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ shutdown(int, int /*<<< orphan*/);
void peer_closesocket(int sfd) {
  shutdown(sfd, SHUT_RDWR);
  close(sfd);
}


x86 assembly (clang, -O0):
<peer_closesocket>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ebb(%rip),%rax
mov    (%rax),%esi
call   1030 <shutdown@plt>
mov    -0x4(%rbp),%edi
call   1040 <close@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<peer_closesocket>:
push   %rbx
mov    %edi,%ebx
mov    0x2ec6(%rip),%rax
mov    (%rax),%esi
call   1030 <shutdown@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <close@plt>

LLVM IR (-O0):
@SHUT_RDWR = global i32 0
define void @peer_closesocket(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @SHUT_RDWR
%5 = call i32 @shutdown(i32 %3, i32 %4)
%6 = load i32, i32* %2
%7 = call i32 @close(i32 %6)
ret void
}

LLVM IR (-O2):
@SHUT_RDWR = global i32 0
define void @peer_closesocket(i32 %0) {
%2 = load i32, i32* @SHUT_RDWR
%3 = tail call i32 @shutdown(i32 %0, i32 %2)
%4 = tail call i32 @close(i32 %0)
ret void
}
int numDigits(int number) {
  int digits = 0;
  if (number < 0) {
    digits = 1;
  }
  do {
    number /= 10;
    digits++;
  } while (number != 0);
  return digits;
}


x86 assembly (clang, -O0):
<numDigits>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    111f <numDigits+0x1f>
movl   $0x1,-0x8(%rbp)
jmp    1124 <numDigits+0x24>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1124 <numDigits+0x24>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<numDigits>:
mov    %edi,%eax
shr    $0x1f,%eax
cs nopw 0x0(%rax,%rax,1)
nop
movslq %edi,%rcx
imul   $0x66666667,%rcx,%rdi
mov    %rdi,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rdi
add    %edx,%edi
add    $0x1,%eax
add    $0x9,%ecx
cmp    $0x12,%ecx
ja     1110 <numDigits+0x10>
ret

LLVM IR (-O0):
define i32 @numDigits(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 1, i32* %3
br label %7
7: ; preds = %6, %1
br label %8
8: ; preds = %13, %7
%9 = load i32, i32* %2
%10 = sdiv i32 %9, 10
store i32 %10, i32* %2
%11 = load i32, i32* %3
%12 = add nsw i32 %11, 1
store i32 %12, i32* %3
br label %13
13: ; preds = %8
%14 = load i32, i32* %2
%15 = icmp ne i32 %14, 0
br i1 %15, label %8, label %16
16: ; preds = %13
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
define i32 @numDigits(i32 %0) {
%2 = lshr i32 %0, 31
br label %3
3: ; preds = %3, %1
%4 = phi i32 [ %0, %1 ], [ %6, %3 ]
%5 = phi i32 [ %2, %1 ], [ %7, %3 ]
%6 = sdiv i32 %4, 10
%7 = add nuw nsw i32 %5, 1
%8 = add i32 %4, 9
%9 = icmp ult i32 %8, 19
br i1 %9, label %10, label %3
10: ; preds = %3
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ display_version_and_quit();
void got_version_flag(const char *arg, void *context) {
  display_version_and_quit();
}


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

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

LLVM IR (-O0):
define void @got_version_flag(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = call i32 (...) @display_version_and_quit()
ret void
}

LLVM IR (-O2):
define void @got_version_flag(i8* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = tail call i32 (...) @display_version_and_quit()
ret void
}
/* Type definitions */
struct flashctx {
  int dummy;
};

/* Variables and functions */
int printlock_w39_fwh(struct flashctx *);
int printlock_w39v080a(struct flashctx *);
int printlock_w39v080fa(struct flashctx *flash) {
  int ret = 0;
  ret = printlock_w39v080a(flash);
  ret |= printlock_w39_fwh(flash);
  return ret;
}


x86 assembly (clang, -O0):
<printlock_w39v080fa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <printlock_w39v080a@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <printlock_w39_fwh@plt>
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printlock_w39v080fa>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1040 <printlock_w39v080a@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <printlock_w39_fwh@plt>
or     %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.flashctx = type { i32 }
define i32 @printlock_w39v080fa(%struct.flashctx* %0) {
%2 = alloca %struct.flashctx*
%3 = alloca i32
store %struct.flashctx* %0, %struct.flashctx** %2
store i32 0, i32* %3
%4 = load %struct.flashctx*, %struct.flashctx** %2
%5 = call i32 @printlock_w39v080a(%struct.flashctx* %4)
store i32 %5, i32* %3
%6 = load %struct.flashctx*, %struct.flashctx** %2
%7 = call i32 @printlock_w39_fwh(%struct.flashctx* %6)
%8 = load i32, i32* %3
%9 = or i32 %8, %7
store i32 %9, i32* %3
%10 = load i32, i32* %3
ret i32 %10
}

LLVM IR (-O2):
%struct.flashctx = type { i32 }
define i32 @printlock_w39v080fa(%struct.flashctx* %0) {
%2 = tail call i32 @printlock_w39v080a(%struct.flashctx* %0)
%3 = tail call i32 @printlock_w39_fwh(%struct.flashctx* %0)
%4 = or i32 %3, %2
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ stic_simple_test_result(int, char *, char const *,
                                           unsigned int);
void stic_assert_failure(int test, const char function[], unsigned int line) {
  stic_simple_test_result(test != 0, "Should have been failure (non-zero)",
                          function, line);
}


x86 assembly (clang, -O0):
<stic_assert_failure>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
cmpl   $0x0,-0x4(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
lea    0xec4(%rip),%rsi
call   1030 <stic_simple_test_result@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stic_assert_failure>:
mov    %edx,%ecx
mov    %rsi,%rdx
xor    %eax,%eax
test   %edi,%edi
setne  %al
lea    0xedd(%rip),%rsi
mov    %eax,%edi
jmp    1030 <stic_simple_test_result@plt>

LLVM IR (-O0):
@.str = [36 x i8] c"Should have been failure (non-zero)\00"
define void @stic_assert_failure(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = icmp ne i32 %7, 0
%9 = zext i1 %8 to i32
%10 = load i8*, i8** %5
%11 = load i32, i32* %6
%12 = call i32 @stic_simple_test_result(i32 %9, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8* %10, i32 %11)
ret void
}

LLVM IR (-O2):
@.str = [36 x i8] c"Should have been failure (non-zero)\00"
define void @stic_assert_failure(i32 %0, i8* %1, i32 %2) {
%4 = icmp ne i32 %0, 0
%5 = zext i1 %4 to i32
%6 = tail call i32 @stic_simple_test_result(i32 %5, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8* %1, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pci_read_config_dword(int /*<<< orphan*/, unsigned char,
                                         unsigned char, int, unsigned int *);
int /*<<< orphan*/ pci_write_config_dword(int /*<<< orphan*/, unsigned char,
                                          unsigned char, int, unsigned int);
void pci_master_enable(unsigned char bus, unsigned char slot,
                       unsigned char function) {
  unsigned int data;
  pci_read_config_dword(0, slot, function, 0x04, &data);
  pci_write_config_dword(0, slot, function, 0x04, data | 0x4);
}


x86 assembly (clang, -O0):
<pci_master_enable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dl,%al
mov    %sil,%cl
mov    %dil,%dl
mov    %dl,-0x1(%rbp)
mov    %cl,-0x2(%rbp)
mov    %al,-0x3(%rbp)
mov    -0x2(%rbp),%al
xor    %edi,%edi
mov    $0x4,%ecx
lea    -0x8(%rbp),%r8
movzbl %al,%esi
movzbl -0x3(%rbp),%edx
call   1030 <pci_read_config_dword@plt>
mov    -0x2(%rbp),%dl
mov    -0x3(%rbp),%al
mov    -0x8(%rbp),%r8d
or     $0x4,%r8d
xor    %edi,%edi
mov    $0x4,%ecx
movzbl %dl,%esi
movzbl %al,%edx
call   1040 <pci_write_config_dword@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pci_master_enable>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %esi,%ebp
lea    0x4(%rsp),%r8
xor    %edi,%edi
mov    $0x4,%ecx
call   1030 <pci_read_config_dword@plt>
mov    0x4(%rsp),%r8d
or     $0x4,%r8d
xor    %edi,%edi
mov    %ebp,%esi
mov    %ebx,%edx
mov    $0x4,%ecx
call   1040 <pci_write_config_dword@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @pci_master_enable(i8 zeroext %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8
%5 = alloca i8
%6 = alloca i8
%7 = alloca i32
store i8 %0, i8* %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%8 = load i8, i8* %5
%9 = load i8, i8* %6
%10 = call i32 @pci_read_config_dword(i32 0, i8 zeroext %8, i8 zeroext %9, i32 4, i32* %7)
%11 = load i8, i8* %5
%12 = load i8, i8* %6
%13 = load i32, i32* %7
%14 = or i32 %13, 4
%15 = call i32 @pci_write_config_dword(i32 0, i8 zeroext %11, i8 zeroext %12, i32 4, i32 %14)
ret void
}

LLVM IR (-O2):
define void @pci_master_enable(i8 zeroext %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i32
%5 = bitcast i32* %4 to i8*
%6 = call i32 @pci_read_config_dword(i32 0, i8 zeroext %1, i8 zeroext %2, i32 4, i32* %4)
%7 = load i32, i32* %4
%8 = or i32 %7, 4
%9 = call i32 @pci_write_config_dword(i32 0, i8 zeroext %1, i8 zeroext %2, i32 4, i32 %8)
ret void
}
void PDMR3UsbHasHub(void) {}


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

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

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

LLVM IR (-O2):
define void @PDMR3UsbHasHub() {
ret void
}
const char *getdns_get_version(void) { return "0.3.2rc1"; }


x86 assembly (clang, -O0):
<getdns_get_version>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getdns_get_version>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [9 x i8] c"0.3.2rc1\00"
define i8* @getdns_get_version() {
ret i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [9 x i8] c"0.3.2rc1\00"
define i8* @getdns_get_version() {
ret i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ write(int, int *, int);
void _writei(int fd, int i) { write(fd, &i, sizeof(int)); }


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

x86 assembly (clang, -O2):
<_writei>:
push   %rax
mov    %esi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x4,%edx
call   1030 <write@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @_writei(i32 %0, i32 %1) {
%3 = alloca i32
store i32 %1, i32* %3
%4 = call i32 @write(i32 %0, i32* %3, i32 4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print(int *, int);
int /*<<< orphan*/ printf(char *, int, int);
int search(int *, int, int);
int main(int argc, char **argv) {
  int a[] = {4, 5, 6, 7, 8, 1, 2, 3};
  print(a, 8);
  printf("%d:%d\n", 8, search(a, 8, 8));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xeb3(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xeb0(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xead(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xeaa(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    -0x30(%rbp),%rdi
mov    $0x8,%esi
call   1050 <print@plt>
lea    -0x30(%rbp),%rdi
mov    $0x8,%edx
mov    %edx,%esi
call   1040 <search@plt>
mov    %eax,%edx
lea    0xe87(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
movaps 0xed4(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xeb8(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x8,%esi
call   1050 <print@plt>
mov    %rbx,%rdi
mov    $0x8,%esi
mov    $0x8,%edx
call   1040 <search@plt>
lea    0xeab(%rip),%rdi
mov    $0x8,%esi
mov    %eax,%edx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.a = [8 x i32] [i32 4, i32 5, i32 6, i32 7, i32 8, i32 1, i32 2, i32 3]
@.str = [7 x i8] c"%d:%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [8 x i32]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = bitcast [8 x i32]* %6 to i8*
%8 = getelementptr inbounds [8 x i32], [8 x i32]* %6, i64 0, i64 0
%9 = call i32 @print(i32* %8, i32 8)
%10 = getelementptr inbounds [8 x i32], [8 x i32]* %6, i64 0, i64 0
%11 = call i32 @search(i32* %10, i32 8, i32 8)
%12 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 8, i32 %11)
ret i32 0
}

LLVM IR (-O2):
@__const.main.a = [8 x i32] [i32 4, i32 5, i32 6, i32 7, i32 8, i32 1, i32 2, i32 3]
@.str = [7 x i8] c"%d:%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [8 x i32]
%4 = bitcast [8 x i32]* %3 to i8*
%5 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 0
%6 = call i32 @print(i32* %5, i32 8)
%7 = call i32 @search(i32* %5, i32 8, i32 8)
%8 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 8, i32 %7)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ Ttl_TPM_ContinueSelfTest();
uint32_t TtlContinueSelfTest(void) { return Ttl_TPM_ContinueSelfTest(); }


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

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

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

LLVM IR (-O2):
define i32 @TtlContinueSelfTest() {
%1 = tail call i32 (...) @Ttl_TPM_ContinueSelfTest()
ret i32 %1
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char const *, char *);
int FileExists(const char *fn) {
  FILE *F = NULL;
  if ((F = fopen(fn, "r")) != NULL) {
    fclose(F);
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<FileExists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xec1(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
je     1167 <FileExists+0x47>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
movl   $0x1,-0x4(%rbp)
jmp    116e <FileExists+0x4e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FileExists>:
push   %rax
lea    0xed8(%rip),%rsi
call   1040 <fopen@plt>
test   %rax,%rax
je     1141 <FileExists+0x21>
mov    %rax,%rdi
call   1030 <fclose@plt>
mov    $0x1,%eax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
define i32 @FileExists(i8* nocapture %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @fclose(i32* %2)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ 1, %4 ], [ 0, %1 ]
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ errstr(char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ exit(int);
void usage(void) {
  errstr("-I  : Use disk graphics.", NULL);
  errstr("-L  : Attempt to interpret as a 'later' type Quill file.", NULL);
  errstr("-Q : Quiet (no beeping)", NULL);
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <errstr@plt>
lea    0xede(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <errstr@plt>
lea    0xf07(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <errstr@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %esi,%esi
call   1030 <errstr@plt>
lea    0xee3(%rip),%rdi
xor    %esi,%esi
call   1030 <errstr@plt>
lea    0xf0e(%rip),%rdi
xor    %esi,%esi
call   1030 <errstr@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"-I : Use disk graphics.\00"
@.str.1 = [57 x i8] c"-L : Attempt to interpret as a 'later' type Quill file.\00"
@.str.2 = [24 x i8] c"-Q : Quiet (no beeping)\00"
define void @usage() {
%1 = call i32 @errstr(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32* null)
%2 = call i32 @errstr(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.1, i64 0, i64 0), i32* null)
%3 = call i32 @errstr(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i32* null)
%4 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [25 x i8] c"-I : Use disk graphics.\00"
@.str.1 = [57 x i8] c"-L : Attempt to interpret as a 'later' type Quill file.\00"
@.str.2 = [24 x i8] c"-Q : Quiet (no beeping)\00"
define void @usage() {
%1 = tail call i32 @errstr(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32* null)
%2 = tail call i32 @errstr(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.1, i64 0, i64 0), i32* null)
%3 = tail call i32 @errstr(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i32* null)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ do_epoll(int);
int /*<<< orphan*/ listen(int, int);
int /*<<< orphan*/ printf(char *, char *, int);
int socket_bind(char *, int);
int main(int argc, char *argv[]) {
  int listenfd;
  listenfd = socket_bind("127.0.0.1", 60002);
  listen(listenfd, 5);
  printf("Listening %s:%d", "127.0.0.1", 60002);
  do_epoll(listenfd);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xea3(%rip),%rdi
mov    $0xea62,%esi
call   1040 <socket_bind@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
mov    $0x5,%esi
call   1060 <listen@plt>
lea    0xe8c(%rip),%rdi
lea    0xe7b(%rip),%rsi
mov    $0xea62,%edx
call   1050 <printf@plt>
mov    -0x14(%rbp),%edi
call   1030 <do_epoll@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
lea    0xeb6(%rip),%rbx
mov    %rbx,%rdi
mov    $0xea62,%esi
call   1040 <socket_bind@plt>
mov    %eax,%ebp
mov    %eax,%edi
mov    $0x5,%esi
call   1060 <listen@plt>
lea    0xe9e(%rip),%rdi
mov    %rbx,%rsi
mov    $0xea62,%edx
call   1050 <printf@plt>
mov    %ebp,%edi
call   1030 <do_epoll@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [10 x i8] c"127.0.0.1\00"
@.str.1 = [16 x i8] c"Listening %s:%d\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 @socket_bind(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 60002)
store i32 %7, i32* %6
%8 = load i32, i32* %6
%9 = call i32 @listen(i32 %8, i32 5)
%10 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 60002)
%11 = load i32, i32* %6
%12 = call i32 @do_epoll(i32 %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"127.0.0.1\00"
@.str.1 = [16 x i8] c"Listening %s:%d\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @socket_bind(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 60002)
%4 = tail call i32 @listen(i32 %3, i32 5)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 60002)
%6 = tail call i32 @do_epoll(i32 %3)
ret i32 0
}
char fmt_tohex(char c) { return c >= 10 ? c - 10 + 'a' : c + '0'; }


x86 assembly (clang, -O0):
<fmt_tohex>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0xa,%eax
jl     1129 <fmt_tohex+0x29>
movsbl -0x1(%rbp),%eax
sub    $0xa,%eax
add    $0x61,%eax
mov    %eax,-0x8(%rbp)
jmp    1133 <fmt_tohex+0x33>
movsbl -0x1(%rbp),%eax
add    $0x30,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fmt_tohex>:
cmp    $0xa,%dil
mov    $0x57,%ecx
mov    $0x30,%eax
cmovge %ecx,%eax
add    %dil,%al
ret

LLVM IR (-O0):
define signext i8 @fmt_tohex(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sge i32 %4, 10
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = sub nsw i32 %8, 10
%10 = add nsw i32 %9, 97
br label %15
11: ; preds = %1
%12 = load i8, i8* %2
%13 = sext i8 %12 to i32
%14 = add nsw i32 %13, 48
br label %15
15: ; preds = %11, %6
%16 = phi i32 [ %10, %6 ], [ %14, %11 ]
%17 = trunc i32 %16 to i8
ret i8 %17
}

LLVM IR (-O2):
define signext i8 @fmt_tohex(i8 signext %0) {
%2 = icmp sgt i8 %0, 9
%3 = select i1 %2, i8 87, i8 48
%4 = add i8 %3, %0
ret i8 %4
}
/* Variables and functions */
int serveur_tcp();
int main(int argc, char *argv[]) { return (serveur_tcp()); }


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)
mov    $0x0,%al
call   1030 <serveur_tcp@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @serveur_tcp()
ret i32 %3
}
float Lerp(float start, float end, float amount) {
  return start + amount * (end - start);
}


x86 assembly (clang, -O0):
<Lerp>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm1
movss  -0xc(%rbp),%xmm0
movss  -0x8(%rbp),%xmm2
subss  -0x4(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<Lerp>:
subss  %xmm0,%xmm1
mulss  %xmm2,%xmm1
addss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @Lerp(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %4
%8 = load float, float* %6
%9 = load float, float* %5
%10 = load float, float* %4
%11 = fsub float %9, %10
%12 = call float @llvm.fmuladd.f32(float %8, float %11, float %7)
ret float %12
}

LLVM IR (-O2):
define float @Lerp(float %0, float %1, float %2) {
%4 = fsub float %1, %0
%5 = tail call float @llvm.fmuladd.f32(float %2, float %4, float %0)
ret float %5
}
/* Variables and functions */
int /*<<< orphan*/ lgen(char *, char *, int);
void cgincsb(int a) { lgen("%s\t%c%d", "incb", a); }


x86 assembly (clang, -O0):
<cgincsb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
lea    0xedb(%rip),%rdi
lea    0xedc(%rip),%rsi
call   1030 <lgen@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cgincsb>:
mov    %edi,%edx
lea    0xee7(%rip),%rdi
lea    0xee8(%rip),%rsi
jmp    1030 <lgen@plt>

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

LLVM IR (-O2):
@.str = [8 x i8] c"%s\09%c%d\00"
@.str.1 = [5 x i8] c"incb\00"
define void @cgincsb(i32 %0) {
%2 = tail call i32 @lgen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %0)
ret void
}
char *XGetOCValues() {}


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

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

LLVM IR (-O0):
define i8* @XGetOCValues() {
%1 = alloca i8*
%2 = load i8*, i8** %1
ret i8* %2
}

LLVM IR (-O2):
define noalias i8* @XGetOCValues() {
ret i8* undef
}
/* Variables and functions */
double sinus(double, int /*<<< orphan*/);
double sin(double arg) { return (sinus(arg, 0)); }


x86 assembly (clang, -O0):
<sin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
xor    %edi,%edi
call   1030 <sinus@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define double @sin(double %0) {
%2 = tail call double @sinus(double %0, i32 0)
ret double %2
}
/* Variables and functions */
void *malloc(int);
int /*<<< orphan*/ printf(char *);
void *alloc_buffer(int size) {
  printf("C: mallocing bytes...\n");
  return malloc(size);
}


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

x86 assembly (clang, -O2):
<alloc_buffer>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
call   1030 <puts@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <malloc@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"C: mallocing bytes...\0A\00"
define i8* @alloc_buffer(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* %2
%5 = call i8* @malloc(i32 %4)
ret i8* %5
}

LLVM IR (-O2):
@str = [22 x i8] c"C: mallocing bytes...\00"
define noalias i8* @alloc_buffer(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
%3 = tail call i8* @malloc(i32 %0)
ret i8* %3
}
int emac2_etherstatspkts128to255octets_set(
    unsigned int dev_id, union emac2_etherstatspkts128to255octets_u *value) {
  return 1;
}


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

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

LLVM IR (-O0):
%union.emac2_etherstatspkts128to255octets_u = type opaque
define i32 @emac2_etherstatspkts128to255octets_set(i32 %0, %union.emac2_etherstatspkts128to255octets_u* %1) {
%3 = alloca i32
%4 = alloca %union.emac2_etherstatspkts128to255octets_u*
store i32 %0, i32* %3
store %union.emac2_etherstatspkts128to255octets_u* %1, %union.emac2_etherstatspkts128to255octets_u** %4
ret i32 1
}

LLVM IR (-O2):
%union.emac2_etherstatspkts128to255octets_u = type opaque
define i32 @emac2_etherstatspkts128to255octets_set(i32 %0, %union.emac2_etherstatspkts128to255octets_u* nocapture readnone %1) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void test_log(const char *text) { printf("[debug] %s\n", text); }


x86 assembly (clang, -O0):
<test_log>:
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):
<test_log>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [12 x i8] c"[debug] %s\0A\00"
define void @test_log(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void for_loop_no_brackets() {
  int j = 0;
  for (int i = 0; i < 1; i++)
    j;
}


x86 assembly (clang, -O0):
<for_loop_no_brackets>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jge    112a <for_loop_no_brackets+0x2a>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1112 <for_loop_no_brackets+0x12>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @for_loop_no_brackets() {
ret void
}
/* Type definitions */
struct linger {
  int /*<<< orphan*/ member_1;
  int /*<<< orphan*/ member_0;
};

/* Variables and functions */
int /*<<< orphan*/ SOL_SOCKET;
int /*<<< orphan*/ SO_LINGER;
int /*<<< orphan*/ setsockopt(int, int /*<<< orphan*/, int /*<<< orphan*/,
                              void *, int);
void nolinger(int sock) {
  static struct linger linger = {0, 0};
  int lsize = sizeof(struct linger);
  setsockopt(sock, SOL_SOCKET, SO_LINGER, (void *)&linger, lsize);
}


x86 assembly (clang, -O0):
<nolinger>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x8,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ebc(%rip),%rax
mov    (%rax),%esi
mov    0x2eab(%rip),%rax
mov    (%rax),%edx
mov    -0x8(%rbp),%r8d
lea    0x2eea(%rip),%rcx
call   1030 <setsockopt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nolinger>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%esi
mov    0x2ec0(%rip),%rax
mov    (%rax),%edx
lea    0x2f03(%rip),%rcx
mov    $0x8,%r8d
jmp    1030 <setsockopt@plt>

LLVM IR (-O0):
%struct.linger = type { i32, i32 }
@nolinger.linger = internal global %struct.linger zeroinitializer
@SOL_SOCKET = global i32 0
@SO_LINGER = global i32 0
define void @nolinger(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 8, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* @SOL_SOCKET
%6 = load i32, i32* @SO_LINGER
%7 = load i32, i32* %3
%8 = call i32 @setsockopt(i32 %4, i32 %5, i32 %6, i8* bitcast (%struct.linger* @nolinger.linger to i8*), i32 %7)
ret void
}

LLVM IR (-O2):
%struct.linger = type { i32, i32 }
@nolinger.linger = internal global %struct.linger zeroinitializer
@SOL_SOCKET = global i32 0
@SO_LINGER = global i32 0
define void @nolinger(i32 %0) {
%2 = load i32, i32* @SOL_SOCKET
%3 = load i32, i32* @SO_LINGER
%4 = tail call i32 @setsockopt(i32 %0, i32 %2, i32 %3, i8* bitcast (%struct.linger* @nolinger.linger to i8*), i32 8)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int const);
int main() {
  const int x;
  printf("%f\n", x);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    -0x8(%rbp),%esi
lea    0xed7(%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 = [4 x i8] c"%f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%f\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 undef)
ret i32 0
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned long colormap;
};
typedef TYPE_1__ XColormapEvent;

/* Variables and functions */
void set_XColormapEvent_colormap(void *_p, unsigned long _v) {
  ((XColormapEvent *)_p)->colormap = (unsigned long)_v;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define void @set_XColormapEvent_colormap(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i64 %5, i64* %8
ret void
}

LLVM IR (-O2):
define void @set_XColormapEvent_colormap(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
int ushort2sbuf(unsigned short, char *, int);
char *ushort2str(unsigned short u) {
  static char buf[(5 + 1)];
  int len;
  len = ushort2sbuf(u, buf, sizeof(buf) - 1);
  buf[len] = 0;
  return buf;
}


x86 assembly (clang, -O0):
<ushort2str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
lea    0x2f03(%rip),%rsi
mov    $0x5,%edx
movzwl -0x2(%rbp),%edi
call   1030 <ushort2sbuf@plt>
mov    %eax,-0x8(%rbp)
movslq -0x8(%rbp),%rcx
lea    0x2ee7(%rip),%rax
movb   $0x0,(%rax,%rcx,1)
lea    0x2edc(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ushort2str>:
push   %rbx
lea    0x2f11(%rip),%rbx
mov    %rbx,%rsi
mov    $0x5,%edx
call   1030 <ushort2sbuf@plt>
cltq
movb   $0x0,(%rax,%rbx,1)
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@ushort2str.buf = internal global [6 x i8] zeroinitializer
define i8* @ushort2str(i16 zeroext %0) {
%2 = alloca i16
%3 = alloca i32
store i16 %0, i16* %2
%4 = load i16, i16* %2
%5 = call i32 @ushort2sbuf(i16 zeroext %4, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @ushort2str.buf, i64 0, i64 0), i32 5)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds [6 x i8], [6 x i8]* @ushort2str.buf, i64 0, i64 %7
store i8 0, i8* %8
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @ushort2str.buf, i64 0, i64 0)
}

LLVM IR (-O2):
@ushort2str.buf = internal global [6 x i8] zeroinitializer
define i8* @ushort2str(i16 zeroext %0) {
%2 = tail call i32 @ushort2sbuf(i16 zeroext %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @ushort2str.buf, i64 0, i64 0), i32 5)
%3 = sext i32 %2 to i64
%4 = getelementptr inbounds [6 x i8], [6 x i8]* @ushort2str.buf, i64 0, i64 %3
store i8 0, i8* %4
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @ushort2str.buf, i64 0, i64 0)
}
void test_five(int x, int y, int z) {
#pragma omp target
#pragma omp teams distribute parallel for collapse(2)
  for (int i = 0; i < x; i++)
    for (int i = 0; i < y; i++)
      for (int i = 0; i < z; i++)
        ;
}


x86 assembly (clang, -O0):
<test_five>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    117f <test_five+0x7f>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    116c <test_five+0x6c>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1159 <test_five+0x59>
jmp    114b <test_five+0x4b>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    113a <test_five+0x3a>
jmp    115e <test_five+0x5e>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1127 <test_five+0x27>
jmp    1171 <test_five+0x71>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1114 <test_five+0x14>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @test_five(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
store i32 0, i32* %7
br label %10
10: ; preds = %33, %3
%11 = load i32, i32* %7
%12 = load i32, i32* %4
%13 = icmp slt i32 %11, %12
br i1 %13, label %14, label %36
14: ; preds = %10
store i32 0, i32* %8
br label %15
15: ; preds = %29, %14
%16 = load i32, i32* %8
%17 = load i32, i32* %5
%18 = icmp slt i32 %16, %17
br i1 %18, label %19, label %32
19: ; preds = %15
store i32 0, i32* %9
br label %20
20: ; preds = %25, %19
%21 = load i32, i32* %9
%22 = load i32, i32* %6
%23 = icmp slt i32 %21, %22
br i1 %23, label %24, label %28
24: ; preds = %20
br label %25
25: ; preds = %24
%26 = load i32, i32* %9
%27 = add nsw i32 %26, 1
store i32 %27, i32* %9
br label %20
28: ; preds = %20
br label %29
29: ; preds = %28
%30 = load i32, i32* %8
%31 = add nsw i32 %30, 1
store i32 %31, i32* %8
br label %15
32: ; preds = %15
br label %33
33: ; preds = %32
%34 = load i32, i32* %7
%35 = add nsw i32 %34, 1
store i32 %35, i32* %7
br label %10
36: ; preds = %10
ret void
}

LLVM IR (-O2):
define void @test_five(i32 %0, i32 %1, i32 %2) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ putchar(int);
void nguraTTYPutChar(char c) {
  putchar(c);
  if (c == 8) {
    putchar(32);
    putchar(8);
  }
}


x86 assembly (clang, -O0):
<nguraTTYPutChar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <putchar@plt>
movsbl -0x1(%rbp),%eax
cmp    $0x8,%eax
jne    1148 <nguraTTYPutChar+0x38>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x8,%edi
call   1030 <putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nguraTTYPutChar>:
push   %rbx
mov    %edi,%ebx
call   1030 <putchar@plt>
cmp    $0x8,%bl
jne    1132 <nguraTTYPutChar+0x22>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x8,%edi
pop    %rbx
jmp    1030 <putchar@plt>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @nguraTTYPutChar(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = tail call i32 @putchar(i32 %2)
%4 = icmp eq i8 %0, 8
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = tail call i32 @putchar(i32 32)
%7 = tail call i32 @putchar(i32 8)
br label %8
8: ; preds = %5, %1
ret void
}
void UARTDisableLIN(unsigned long ulBase) {
  ;
  (*((volatile unsigned long *)(ulBase + 0x00000010))) &= ~(0x00004000);
}


x86 assembly (clang, -O0):
<UARTDisableLIN>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%rcx
and    $0xffffffffffffbfff,%rcx
mov    %rcx,0x10(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<UARTDisableLIN>:
andq   $0xffffffffffffbfff,0x10(%rdi)
ff
ret

LLVM IR (-O0):
define void @UARTDisableLIN(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add i64 %3, 16
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
%7 = and i64 %6, -16385
store volatile i64 %7, i64* %5
ret void
}

LLVM IR (-O2):
define void @UARTDisableLIN(i64 %0) {
%2 = add i64 %0, 16
%3 = inttoptr i64 %2 to i64*
%4 = load volatile i64, i64* %3
%5 = and i64 %4, -16385
store volatile i64 %5, i64* %3
ret void
}