xunge/DecIR huggingface dataset:
int mdp4_dtv_pipe_commit(int cndx, int wait) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @mdp4_dtv_pipe_commit(i32 %0, i32 %1) {
ret i32 0
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int /*<<< orphan*/ pkey;
};
typedef TYPE_1__ PKCS7_SIGNER_INFO;
typedef int /*<<< orphan*/ ASN1_VALUE;
typedef int /*<<< orphan*/ ASN1_ITEM;

/* Variables and functions */
int ASN1_OP_FREE_POST;
int /*<<< orphan*/ EVP_PKEY_free(int /*<<< orphan*/);
int si_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it, void *exarg) {
  if (operation == ASN1_OP_FREE_POST) {
    PKCS7_SIGNER_INFO *si = (PKCS7_SIGNER_INFO *)*pval;
    EVP_PKEY_free(si->pkey);
  }
  return 1;
}


x86 assembly (clang, -O0):
<si_cb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2ea7(%rip),%rcx
cmp    (%rcx),%eax
jne    114f <si_cb+0x3f>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    (%rax),%edi
call   1030 <EVP_PKEY_free@plt>
mov    $0x1,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<si_cb>:
push   %rax
mov    0x2ec0(%rip),%rax
cmp    %edi,(%rax)
jne    1126 <si_cb+0x16>
mov    (%rsi),%rax
mov    (%rax),%edi
call   1030 <EVP_PKEY_free@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32 }
@ASN1_OP_FREE_POST = global i32 0
define i32 @si_cb(i32 %0, i32** %1, i32* %2, i8* %3) {
%5 = alloca i32
%6 = alloca i32**
%7 = alloca i32*
%8 = alloca i8*
%9 = alloca %struct.TYPE_2__*
store i32 %0, i32* %5
store i32** %1, i32*** %6
store i32* %2, i32** %7
store i8* %3, i8** %8
%10 = load i32, i32* %5
%11 = load i32, i32* @ASN1_OP_FREE_POST
%12 = icmp eq i32 %10, %11
br i1 %12, label %13, label %21
13: ; preds = %4
%14 = load i32**, i32*** %6
%15 = load i32*, i32** %14
%16 = bitcast i32* %15 to %struct.TYPE_2__*
store %struct.TYPE_2__* %16, %struct.TYPE_2__** %9
%17 = load %struct.TYPE_2__*, %struct.TYPE_2__** %9
%18 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %17, i32 0, i32 0
%19 = load i32, i32* %18
%20 = call i32 @EVP_PKEY_free(i32 %19)
br label %21
21: ; preds = %13, %4
ret i32 1
}

LLVM IR (-O2):
%struct.TYPE_2__ = type { i32 }
@ASN1_OP_FREE_POST = global i32 0
define i32 @si_cb(i32 %0, i32** nocapture %1, i32* nocapture readnone %2, i8* nocapture readnone %3) {
%5 = load i32, i32* @ASN1_OP_FREE_POST
%6 = icmp eq i32 %5, %0
br i1 %6, label %7, label %13
7: ; preds = %4
%8 = bitcast i32** %1 to %struct.TYPE_2__**
%9 = load %struct.TYPE_2__*, %struct.TYPE_2__** %8
%10 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %9, i64 0, i32 0
%11 = load i32, i32* %10
%12 = tail call i32 @EVP_PKEY_free(i32 %11)
br label %13
13: ; preds = %7, %4
ret i32 1
}
void EC_GROUP_new_by_curve_name(void) {}


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

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

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

LLVM IR (-O2):
define void @EC_GROUP_new_by_curve_name() {
ret void
}
void msm_iommu_unmap_extra(struct iommu_domain *domain,
                           unsigned long start_iova, unsigned long size,
                           unsigned long page_size) {}


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

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

LLVM IR (-O0):
%struct.iommu_domain = type opaque
define void @msm_iommu_unmap_extra(%struct.iommu_domain* %0, i64 %1, i64 %2, i64 %3) {
%5 = alloca %struct.iommu_domain*
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
store %struct.iommu_domain* %0, %struct.iommu_domain** %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i64 %3, i64* %8
ret void
}

LLVM IR (-O2):
%struct.iommu_domain = type opaque
define void @msm_iommu_unmap_extra(%struct.iommu_domain* nocapture %0, i64 %1, i64 %2, i64 %3) {
ret void
}
int fun532() { return 532; }


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

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

LLVM IR (-O0):
define i32 @fun532() {
ret i32 532
}

LLVM IR (-O2):
define i32 @fun532() {
ret i32 532
}
/* Variables and functions */
int /*<<< orphan*/ asmfunc();
int /*<<< orphan*/ printf(char *);
int main() {
  printf("This is a test.\n");
  asmfunc();
  printf("Now for the second time.\n");
  asmfunc();
  printf("This completes the test.\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <asmfunc@plt>
lea    0xec8(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <asmfunc@plt>
lea    0xecf(%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
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <asmfunc@plt>
lea    0xed5(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <asmfunc@plt>
lea    0xedb(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"This is a test.\0A\00"
@.str.1 = [26 x i8] c"Now for the second time.\0A\00"
@.str.2 = [26 x i8] c"This completes the test.\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @asmfunc()
%4 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 (...) @asmfunc()
%6 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [16 x i8] c"This is a test.\00"
@str.3 = [25 x i8] c"Now for the second time.\00"
@str.4 = [25 x i8] c"This completes the test.\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @asmfunc()
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.3, i64 0, i64 0))
%4 = tail call i32 (...) @asmfunc()
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.4, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ write_byte(int /*<<< orphan*/);
void write_string(char *s) {
  while (*s != 0)
    write_byte(*s++);
}


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

x86 assembly (clang, -O2):
<write_string>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <write_string+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <write_byte@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <write_string+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @write_string(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %10, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = sext i8 %5 to i32
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = tail call i32 @write_byte(i32 %7)
%10 = load i8, i8* %8
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
ret void
}
void ep93xx_ide_release_gpio(struct platform_device *pdev) {}


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

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

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

LLVM IR (-O2):
%struct.platform_device = type opaque
define void @ep93xx_ide_release_gpio(%struct.platform_device* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0x80() {
  Assert_real((isxdigit(128) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isxdigit.c",
              645, ("isxdigit should be 0 for 0x80"));
}


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

x86 assembly (clang, -O2):
<t_isxdigit_0x80>:
push   %rax
mov    $0x80,%edi
call   1030 <isxdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x285,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0x80\00"
define void @t_isxdigit_0x80() {
%1 = call i64 @isxdigit(i32 128)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 645, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0x80\00"
define void @t_isxdigit_0x80() {
%1 = tail call i64 @isxdigit(i32 128)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 645, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
struct timeval {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ assert(struct timeval *);
int /*<<< orphan*/ timeval_millisecond_init(struct timeval *, unsigned int);
int /*<<< orphan*/ timeval_sub(struct timeval *, struct timeval *,
                               struct timeval *);
void timeval_sub_ms(struct timeval *a, unsigned int ms,
                    struct timeval *result) {
  struct timeval b;
  assert(a);
  assert(result);
  timeval_millisecond_init(&b, ms);
  timeval_sub(a, &b, result);
}


x86 assembly (clang, -O0):
<timeval_sub_ms>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <assert@plt>
mov    -0x18(%rbp),%rdi
call   1040 <assert@plt>
mov    -0xc(%rbp),%esi
lea    -0x20(%rbp),%rdi
call   1050 <timeval_millisecond_init@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rdx
lea    -0x20(%rbp),%rsi
call   1030 <timeval_sub@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<timeval_sub_ms>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdx,%rbx
mov    %esi,%r14d
mov    %rdi,%rbp
call   1040 <assert@plt>
mov    %rbx,%rdi
call   1040 <assert@plt>
mov    %rsp,%r15
mov    %r15,%rdi
mov    %r14d,%esi
call   1050 <timeval_millisecond_init@plt>
mov    %rbp,%rdi
mov    %r15,%rsi
mov    %rbx,%rdx
call   1030 <timeval_sub@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.timeval = type { i32 }
define void @timeval_sub_ms(%struct.timeval* %0, i32 %1, %struct.timeval* %2) {
%4 = alloca %struct.timeval*
%5 = alloca i32
%6 = alloca %struct.timeval*
%7 = alloca %struct.timeval
store %struct.timeval* %0, %struct.timeval** %4
store i32 %1, i32* %5
store %struct.timeval* %2, %struct.timeval** %6
%8 = load %struct.timeval*, %struct.timeval** %4
%9 = call i32 @assert(%struct.timeval* %8)
%10 = load %struct.timeval*, %struct.timeval** %6
%11 = call i32 @assert(%struct.timeval* %10)
%12 = load i32, i32* %5
%13 = call i32 @timeval_millisecond_init(%struct.timeval* %7, i32 %12)
%14 = load %struct.timeval*, %struct.timeval** %4
%15 = load %struct.timeval*, %struct.timeval** %6
%16 = call i32 @timeval_sub(%struct.timeval* %14, %struct.timeval* %7, %struct.timeval* %15)
ret void
}

LLVM IR (-O2):
%struct.timeval = type { i32 }
define void @timeval_sub_ms(%struct.timeval* %0, i32 %1, %struct.timeval* %2) {
%4 = alloca %struct.timeval
%5 = bitcast %struct.timeval* %4 to i8*
%6 = tail call i32 @assert(%struct.timeval* %0)
%7 = tail call i32 @assert(%struct.timeval* %2)
%8 = call i32 @timeval_millisecond_init(%struct.timeval* %4, i32 %1)
%9 = call i32 @timeval_sub(%struct.timeval* %0, %struct.timeval* %4, %struct.timeval* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ yank_set(char, char *, int /*<<< orphan*/);
void yank_set_str(char reg, char *s) { yank_set(reg, s, 0); }


x86 assembly (clang, -O0):
<yank_set_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x1(%rbp),%al
mov    -0x10(%rbp),%rsi
xor    %edx,%edx
movsbl %al,%edi
call   1030 <yank_set@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yank_set_str>:
xor    %edx,%edx
jmp    1030 <yank_set@plt>

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

LLVM IR (-O2):
define void @yank_set_str(i8 signext %0, i8* %1) {
%3 = tail call i32 @yank_set(i8 signext %0, i8* %1, i32 0)
ret void
}
void dummyvideo_RomClosed(void) {}


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

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

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

LLVM IR (-O2):
define void @dummyvideo_RomClosed() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ lcd_cmd(int);
int /*<<< orphan*/ wait_ms(int);
void lcd_home() {
  lcd_cmd(0x02);
  wait_ms(2);
}


x86 assembly (clang, -O0):
<lcd_home>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
call   1040 <lcd_cmd@plt>
mov    $0x2,%edi
call   1030 <wait_ms@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<lcd_home>:
push   %rax
mov    $0x2,%edi
call   1040 <lcd_cmd@plt>
mov    $0x2,%edi
pop    %rax
jmp    1030 <wait_ms@plt>

LLVM IR (-O0):
define void @lcd_home() {
%1 = call i32 @lcd_cmd(i32 2)
%2 = call i32 @wait_ms(i32 2)
ret void
}

LLVM IR (-O2):
define void @lcd_home() {
%1 = tail call i32 @lcd_cmd(i32 2)
%2 = tail call i32 @wait_ms(i32 2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ MDrv_Mod_Calibration_Init(unsigned char, char);
void MApi_Mod_Calibration_Setting(unsigned char U8MOD_CALI_TARGET,
                                  signed char S8MOD_CALI_OFFSET) {
  MDrv_Mod_Calibration_Init(U8MOD_CALI_TARGET, S8MOD_CALI_OFFSET);
}


x86 assembly (clang, -O0):
<MApi_Mod_Calibration_Setting>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
mov    -0x1(%rbp),%al
movzbl %al,%edi
movsbl -0x2(%rbp),%esi
call   1030 <MDrv_Mod_Calibration_Init@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MApi_Mod_Calibration_Setting>:
jmp    1030 <MDrv_Mod_Calibration_Init@plt>

LLVM IR (-O0):
define void @MApi_Mod_Calibration_Setting(i8 zeroext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = load i8, i8* %3
%6 = load i8, i8* %4
%7 = call i32 @MDrv_Mod_Calibration_Init(i8 zeroext %5, i8 signext %6)
ret void
}

LLVM IR (-O2):
define void @MApi_Mod_Calibration_Setting(i8 zeroext %0, i8 signext %1) {
%3 = tail call i32 @MDrv_Mod_Calibration_Init(i8 zeroext %0, i8 signext %1)
ret void
}
void rop3_86_0_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = T | S;
  stk1 = *D ^ stk2;
  *D = stk1;
}


x86 assembly (clang, -O0):
<rop3_86_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0x9(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
mov    -0xb(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_86_0_0>:
or     %edx,%esi
xor    %sil,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_86_0_0(i8* %0, i8 zeroext %1, i8 zeroext %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* %6
%10 = zext i8 %9 to i32
%11 = load i8, i8* %5
%12 = zext i8 %11 to i32
%13 = or i32 %10, %12
%14 = trunc i32 %13 to i8
store i8 %14, i8* %8
%15 = load i8*, i8** %4
%16 = load i8, i8* %15
%17 = zext i8 %16 to i32
%18 = load i8, i8* %8
%19 = zext i8 %18 to i32
%20 = xor i32 %17, %19
%21 = trunc i32 %20 to i8
store i8 %21, i8* %7
%22 = load i8, i8* %7
%23 = load i8*, i8** %4
store i8 %22, i8* %23
ret void
}

LLVM IR (-O2):
define void @rop3_86_0_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = or i8 %2, %1
%5 = load i8, i8* %0
%6 = xor i8 %5, %4
store i8 %6, i8* %0
ret void
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int padcon_set_default_parameters(void) {
  int fail, *a, *b;
  double *c;
  fail = _ada_use_c2phc4c(735, a, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<padcon_set_default_parameters>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x2df,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<padcon_set_default_parameters>:
mov    $0x2df,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

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

LLVM IR (-O2):
define i32 @padcon_set_default_parameters() {
%1 = tail call i32 @_ada_use_c2phc4c(i32 735, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
void __outwc_p(unsigned short value, unsigned short port) {
  __asm__ __volatile__("out"
                       "w"
                       " %"
                       "w"
                       "0,%"
                       ""
                       "1"
                       :
                       : "a"(value), "id"(port));
  __asm__ __volatile__("outb %al,$0x80");
}


x86 assembly (clang, -O0):
<__outwc_p>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
mov    -0x2(%rbp),%ax
mov    -0x4(%rbp),%dx
out    %ax,(%dx)
out    %al,$0x80
pop    %rbp
ret

x86 assembly (clang, -O2):
<__outwc_p>:
mov    %esi,%edx
mov    %edi,%eax
out    %ax,(%dx)
out    %al,$0x80
ret

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

LLVM IR (-O2):
define void @__outwc_p(i16 zeroext %0, i16 zeroext %1) {
tail call void asm sideeffect "outw ${0:w},$1", "{ax},i{dx},~{dirflag},~{fpsr},~{flags}"(i16 %0, i16 %1)
tail call void asm sideeffect "outb %al,$$0x80", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
double __attribute__((__always___, __gnu___, __const__, __artificial__))
distance_squared_sf(const double vx, const double vy, const double wx,
                    const double wy) {
  const double a = vx - wx;
  const double b = vy - wy;
  return (a * a + b * b);
}


x86 assembly (clang, -O0):
<distance_squared_sf>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
subsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm0
subsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm2
movsd  -0x30(%rbp),%xmm1
mulsd  -0x30(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<distance_squared_sf>:
subsd  %xmm2,%xmm0
subsd  %xmm3,%xmm1
mulsd  %xmm1,%xmm1
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @distance_squared_sf(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%11 = load double, double* %5
%12 = load double, double* %7
%13 = fsub double %11, %12
store double %13, double* %9
%14 = load double, double* %6
%15 = load double, double* %8
%16 = fsub double %14, %15
store double %16, double* %10
%17 = load double, double* %9
%18 = load double, double* %9
%19 = load double, double* %10
%20 = load double, double* %10
%21 = fmul double %19, %20
%22 = call double @llvm.fmuladd.f64(double %17, double %18, double %21)
ret double %22
}

LLVM IR (-O2):
define double @distance_squared_sf(double %0, double %1, double %2, double %3) {
%5 = fsub double %0, %2
%6 = fsub double %1, %3
%7 = fmul double %6, %6
%8 = tail call double @llvm.fmuladd.f64(double %5, double %5, double %7)
ret double %8
}
/* Variables and functions */
unsigned long *malloc(unsigned long);
int /*<<< orphan*/ pascal_farleft(unsigned long *, unsigned long, int);
int /*<<< orphan*/ print_array(unsigned long *, unsigned long);
int main() {
  unsigned long elements = 1000000;
  int max = 4;
  unsigned long *numray = malloc(elements * sizeof(unsigned long));
  pascal_farleft(numray, elements, max);
  print_array(numray, elements);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0xf4240,-0x10(%rbp)
movl   $0x4,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
shl    $0x3,%rdi
call   1040 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1050 <pascal_farleft@plt>
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <print_array@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x7a1200,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    $0xf4240,%esi
mov    %rax,%rdi
mov    $0x4,%edx
call   1050 <pascal_farleft@plt>
mov    $0xf4240,%esi
mov    %rbx,%rdi
call   1030 <print_array@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i32
%4 = alloca i64*
store i32 0, i32* %1
store i64 1000000, i64* %2
store i32 4, i32* %3
%5 = load i64, i64* %2
%6 = mul i64 %5, 8
%7 = call i64* @malloc(i64 %6)
store i64* %7, i64** %4
%8 = load i64*, i64** %4
%9 = load i64, i64* %2
%10 = load i32, i32* %3
%11 = call i32 @pascal_farleft(i64* %8, i64 %9, i32 %10)
%12 = load i64*, i64** %4
%13 = load i64, i64* %2
%14 = call i32 @print_array(i64* %12, i64 %13)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64* @malloc(i64 8000000)
%2 = tail call i32 @pascal_farleft(i64* %1, i64 1000000, i32 4)
%3 = tail call i32 @print_array(i64* %1, i64 1000000)
ret i32 0
}
void INT_Excep_CMT0_CMI0(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_CMT0_CMI0() {
ret void
}
/* Variables and functions */
unsigned long partial_byte_hash(int /*<<< orphan*/, unsigned long);
unsigned long string_hash(const char *str) {
  unsigned long hash = 0;
  while (*str != '\0')
    hash = partial_byte_hash(*str++, hash);
  return hash;
}


x86 assembly (clang, -O0):
<string_hash>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1158 <string_hash+0x48>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
mov    -0x10(%rbp),%rsi
call   1030 <partial_byte_hash@plt>
mov    %rax,-0x10(%rbp)
jmp    1124 <string_hash+0x14>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_hash>:
push   %rbx
mov    (%rdi),%cl
test   %cl,%cl
je     1138 <string_hash+0x28>
mov    %rdi,%rbx
add    $0x1,%rbx
xor    %eax,%eax
movsbl %cl,%edi
mov    %rax,%rsi
call   1030 <partial_byte_hash@plt>
movzbl (%rbx),%ecx
add    $0x1,%rbx
test   %cl,%cl
jne    1120 <string_hash+0x10>
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i64 @string_hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %11, %4 ], [ %2, %1 ]
%6 = phi i64 [ %10, %4 ], [ 0, %1 ]
%7 = phi i8* [ %9, %4 ], [ %0, %1 ]
%8 = sext i8 %5 to i32
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = tail call i64 @partial_byte_hash(i32 %8, i64 %6)
%11 = load i8, i8* %9
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %4, %1
%14 = phi i64 [ 0, %1 ], [ %10, %4 ]
ret i64 %14
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void _Assert(char *mesg) {
  fputs(mesg, stdout);
  fputs(" -- assertion failed\n", stdout);
  abort();
}


x86 assembly (clang, -O0):
<_Assert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ea9(%rip),%rax
mov    (%rax),%esi
call   1040 <fputs@plt>
mov    0x2e9b(%rip),%rax
mov    (%rax),%esi
lea    0xeb2(%rip),%rdi
call   1040 <fputs@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<_Assert>:
push   %rbx
mov    0x2eb8(%rip),%rbx
mov    (%rbx),%esi
call   1040 <fputs@plt>
mov    (%rbx),%esi
lea    0xec8(%rip),%rdi
call   1040 <fputs@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [22 x i8] c" -- assertion failed\0A\00"
define void @_Assert(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @stdout
%5 = call i32 @fputs(i8* %3, i32 %4)
%6 = load i32, i32* @stdout
%7 = call i32 @fputs(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [22 x i8] c" -- assertion failed\0A\00"
define void @_Assert(i8* %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fputs(i8* %0, i32 %2)
%4 = load i32, i32* @stdout
%5 = tail call i32 @fputs(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = tail call i32 (...) @abort()
unreachable
}
int benchmark_finibatch(void *tsd) { return (0); }


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

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

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

LLVM IR (-O2):
define i32 @benchmark_finibatch(i8* nocapture readnone %0) {
ret i32 0
}
unsigned long long extract_bit_range(unsigned long long u, int s, int e) {
  if (s > 63)
    return 0;
  u &= ~((1ull << (unsigned long long)(s)) - 1ull);
  if (e < 64)
    u &= ((1ull << (unsigned long long)(e)) - 1ull);
  return u;
}


x86 assembly (clang, -O0):
<extract_bit_range>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
cmpl   $0x3f,-0x14(%rbp)
jle    1125 <extract_bit_range+0x25>
movq   $0x0,-0x8(%rbp)
jmp    116b <extract_bit_range+0x6b>
movslq -0x14(%rbp),%rcx
mov    $0x1,%eax
shl    %cl,%rax
sub    $0x1,%rax
xor    $0xffffffffffffffff,%rax
and    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
cmpl   $0x40,-0x18(%rbp)
jge    1163 <extract_bit_range+0x63>
movslq -0x18(%rbp),%rcx
mov    $0x1,%eax
shl    %cl,%rax
sub    $0x1,%rax
and    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<extract_bit_range>:
cmp    $0x3f,%esi
jle    1108 <extract_bit_range+0x8>
xor    %eax,%eax
ret
mov    %esi,%ecx
shr    %cl,%rdi
shl    %cl,%rdi
mov    $0xffffffffffffffff,%rsi
mov    $0xffffffffffffffff,%rax
mov    %edx,%ecx
shl    %cl,%rax
cmp    $0x40,%edx
not    %rax
cmovge %rsi,%rax
and    %rdi,%rax
ret

LLVM IR (-O0):
define i64 @extract_bit_range(i64 %0, i32 %1, i32 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i32
%7 = alloca i32
store i64 %0, i64* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
%8 = load i32, i32* %6
%9 = icmp sgt i32 %8, 63
br i1 %9, label %10, label %11
10: ; preds = %3
store i64 0, i64* %4
br label %30
11: ; preds = %3
%12 = load i32, i32* %6
%13 = sext i32 %12 to i64
%14 = shl i64 1, %13
%15 = sub i64 %14, 1
%16 = xor i64 %15, -1
%17 = load i64, i64* %5
%18 = and i64 %17, %16
store i64 %18, i64* %5
%19 = load i32, i32* %7
%20 = icmp slt i32 %19, 64
br i1 %20, label %21, label %28
21: ; preds = %11
%22 = load i32, i32* %7
%23 = sext i32 %22 to i64
%24 = shl i64 1, %23
%25 = sub i64 %24, 1
%26 = load i64, i64* %5
%27 = and i64 %26, %25
store i64 %27, i64* %5
br label %28
28: ; preds = %21, %11
%29 = load i64, i64* %5
store i64 %29, i64* %4
br label %30
30: ; preds = %28, %10
%31 = load i64, i64* %4
ret i64 %31
}

LLVM IR (-O2):
define i64 @extract_bit_range(i64 %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %1, 63
br i1 %4, label %15, label %5
5: ; preds = %3
%6 = zext i32 %1 to i64
%7 = shl nsw i64 -1, %6
%8 = and i64 %7, %0
%9 = icmp slt i32 %2, 64
%10 = zext i32 %2 to i64
%11 = shl nsw i64 -1, %10
%12 = xor i64 %11, -1
%13 = select i1 %9, i64 %12, i64 -1
%14 = and i64 %8, %13
br label %15
15: ; preds = %3, %5
%16 = phi i64 [ %14, %5 ], [ 0, %3 ]
ret i64 %16
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
int main() {
  char b;
  unsigned char ub;
  short s;
  unsigned short us;
  int i;
  unsigned int ui;
  long long l;
  unsigned long long ul;
  b = 0x7f;
  printf("%d\n", ++b);
  ub = 0xff;
  printf("%d\n", ++b);
  l = 800;
  printf("%d\n", (char)l);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x7f,-0x5(%rbp)
mov    -0x5(%rbp),%al
add    $0x1,%al
mov    %al,-0x5(%rbp)
lea    0xece(%rip),%rdi
movsbl %al,%esi
call   1030 <printf@plt>
movb   $0xff,-0x6(%rbp)
mov    -0x5(%rbp),%al
add    $0x1,%al
mov    %al,-0x5(%rbp)
lea    0xeb3(%rip),%rdi
movsbl %al,%esi
call   1030 <printf@plt>
movq   $0x320,-0x20(%rbp)
mov    -0x20(%rbp),%rax
lea    0xe98(%rip),%rdi
movsbl %al,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
mov    $0xffffff80,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xffffff81,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x20,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i8
%4 = alloca i16
%5 = alloca i16
%6 = alloca i32
%7 = alloca i32
%8 = alloca i64
%9 = alloca i64
store i32 0, i32* %1
store i8 127, i8* %2
%10 = load i8, i8* %2
%11 = add i8 %10, 1
store i8 %11, i8* %2
%12 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext %11)
store i8 -1, i8* %3
%13 = load i8, i8* %2
%14 = add i8 %13, 1
store i8 %14, i8* %2
%15 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext %14)
store i64 800, i64* %8
%16 = load i64, i64* %8
%17 = trunc i64 %16 to i8
%18 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext %17)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext -128)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext -127)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext 32)
ret i32 0
}
/* Variables and functions */
int gkReadFileStream(char *, void **, size_t *);
int gkReadFile(char *filename, void **outDst, size_t *outDstSize) {
  return gkReadFileStream(filename, outDst, outDstSize);
}


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

x86 assembly (clang, -O2):
<gkReadFile>:
jmp    1030 <gkReadFileStream@plt>

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

LLVM IR (-O2):
define i32 @gkReadFile(i8* %0, i8** %1, i64* %2) {
%4 = tail call i32 @gkReadFileStream(i8* %0, i8** %1, i64* %2)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ __v16qi;
typedef scalar_t__ __m128i;

/* Variables and functions */
int /*<<< orphan*/ __builtin_ia32_pminub128(int /*<<< orphan*/,
                                            int /*<<< orphan*/);
__m128i __attribute__((__always___, __nodebug__))
_mm_min_epu8(__m128i a, __m128i b) {
  return (__m128i)__builtin_ia32_pminub128((__v16qi)a, (__v16qi)b);
}


x86 assembly (clang, -O0):
<_mm_min_epu8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,%edi
mov    -0x10(%rbp),%rax
mov    %eax,%esi
call   1030 <__builtin_ia32_pminub128@plt>
cltq
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_mm_min_epu8>:
push   %rax
call   1030 <__builtin_ia32_pminub128@plt>
cltq
pop    %rcx
ret

LLVM IR (-O0):
define i64 @_mm_min_epu8(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 = trunc i64 %5 to i32
%7 = load i64, i64* %4
%8 = trunc i64 %7 to i32
%9 = call i32 @__builtin_ia32_pminub128(i32 %6, i32 %8)
%10 = sext i32 %9 to i64
ret i64 %10
}

LLVM IR (-O2):
define i64 @_mm_min_epu8(i64 %0, i64 %1) {
%3 = trunc i64 %0 to i32
%4 = trunc i64 %1 to i32
%5 = tail call i32 @__builtin_ia32_pminub128(i32 %3, i32 %4)
%6 = sext i32 %5 to i64
ret i64 %6
}
void glutRemoveMenuItem(int item) {}


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

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

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

LLVM IR (-O2):
define void @glutRemoveMenuItem(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf("send - Utility for the push file interface\n\n");
  printf("Usage:\n"
         "\tsend -d <command> -f <command> -t <command>\n\n");
  printf("Options:\n"
         "\t-d <device>        Select the device\n"
         "\t-f <file>          Select the transport file\n"
         "\t-t <target>        Select the target file\n"
         "\t-h, --help         Display help\n"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [45 x i8] c"send - Utility for the push file interface\0A\0A\00"
@.str.1 = [54 x i8] c"Usage:\0A\09send -d <command> -f <command> -t <command>\0A\0A\00"
@.str.2 = [171 x i8] c"Options:\0A\09-d <device> Select the device\0A\09-f <file> Select the transport file\0A\09-t <target> Select the target file\0A\09-h, --help Display help\0A\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([171 x i8], [171 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [44 x i8] c"send - Utility for the push file interface\0A\00"
@str.3 = [53 x i8] c"Usage:\0A\09send -d <command> -f <command> -t <command>\0A\00"
@str.4 = [170 x i8] c"Options:\0A\09-d <device> Select the device\0A\09-f <file> Select the transport file\0A\09-t <target> Select the target file\0A\09-h, --help Display help\0A\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([170 x i8], [170 x i8]* @str.4, i64 0, i64 0))
ret void
}
/* Type definitions */
struct timespec {
  long tv_nsec;
  scalar_t__ tv_sec;
  int /*<<< orphan*/ member_1;
  int /*<<< orphan*/ member_0;
};

/* Variables and functions */
int /*<<< orphan*/ hid_reply(int);
int /*<<< orphan*/ nanosleep(struct timespec *, struct timespec *);
void g500_reply(int fd, const int debug_infos) {
  struct timespec req = {0, 0};
  req.tv_sec = 0;
  req.tv_nsec = 100000000L;
  nanosleep(&req, (struct timespec *)NULL);
  if (debug_infos != 0)
    hid_reply(fd);
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
lea    -0x20(%rbp),%rdi
xor    %esi,%esi
mov    $0x18,%edx
call   1040 <memset@plt>
movq   $0x0,-0x18(%rbp)
movq   $0x5f5e100,-0x20(%rbp)
05
lea    -0x20(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <nanosleep@plt>
cmpl   $0x0,-0x8(%rbp)
je     117d <g500_reply+0x4d>
mov    -0x4(%rbp),%edi
call   1050 <hid_reply@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
push   %rbp
push   %rbx
sub    $0x18,%rsp
mov    %esi,%ebp
mov    %edi,%ebx
xorps  %xmm0,%xmm0
movups %xmm0,0x8(%rsp)
movq   $0x5f5e100,(%rsp)
05
mov    %rsp,%rdi
xor    %esi,%esi
call   1030 <nanosleep@plt>
test   %ebp,%ebp
je     114f <g500_reply+0x2f>
mov    %ebx,%edi
call   1040 <hid_reply@plt>
add    $0x18,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
%struct.timespec = type { i64, i64, i32, i32 }
define void @g500_reply(i32 %0, i32 %1) {
%3 = alloca %struct.timespec
%4 = bitcast %struct.timespec* %3 to i8*
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i64 0, i32 0
%6 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i64 0, i32 1
%7 = bitcast i64* %6 to i8*
store i64 100000000, i64* %5
%8 = call i32 @nanosleep(%struct.timespec* %3, %struct.timespec* null)
%9 = icmp eq i32 %1, 0
br i1 %9, label %12, label %10
10: ; preds = %2
%11 = call i32 @hid_reply(i32 %0)
br label %12
12: ; preds = %10, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ srand(int);
void hmmsetseed(int seed) { srand(seed); }


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

x86 assembly (clang, -O2):
<hmmsetseed>:
jmp    1030 <srand@plt>

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

LLVM IR (-O2):
define void @hmmsetseed(i32 %0) {
%2 = tail call i32 @srand(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ commSendResponseMsg(void *, char *);
void ftpFEAT(void *ep_server, void *comm_obj, char *args) {
  char *feat_rep = "211-Features supported\r\n"
                   " UTF8\r\n"
                   "211 End\r\n";
  commSendResponseMsg(comm_obj, feat_rep);
}


x86 assembly (clang, -O0):
<ftpFEAT>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    0xed5(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1030 <commSendResponseMsg@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [41 x i8] c"211-Features supported\0D\0A UTF8\0D\0A211 End\0D\0A\00"
define void @ftpFEAT(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
store i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8** %7
%8 = load i8*, i8** %5
%9 = load i8*, i8** %7
%10 = call i32 @commSendResponseMsg(i8* %8, i8* %9)
ret void
}

LLVM IR (-O2):
@.str = [41 x i8] c"211-Features supported\0D\0A UTF8\0D\0A211 End\0D\0A\00"
define void @ftpFEAT(i8* nocapture readnone %0, i8* %1, i8* nocapture readnone %2) {
%4 = tail call i32 @commSendResponseMsg(i8* %1, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, ...);
void usage() {
  printf("%s, %s\n\nusage: zonenotify zone slave [slave 2 ... [slave n]] \n",
         "zonenotify 0.01", "Luca Morettoni <luca@morettoni.net>");
  printf("where zone is the domain name to update on slave server ``slave''\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xf0d(%rip),%rsi
lea    0xf16(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf2c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0xf00(%rip),%rsi
lea    0xf09(%rip),%rdx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf1f(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [63 x i8] c"%s, %s\0A\0Ausage: zonenotify zone slave [slave 2 ... [slave n]] \0A\00"
@.str.1 = [16 x i8] c"zonenotify 0.01\00"
@.str.2 = [36 x i8] c"Luca Morettoni <luca@morettoni.net>\00"
@.str.3 = [67 x i8] c"where zone is the domain name to update on slave server ``slave''\0A\00"
define void @usage() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.3, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [63 x i8] c"%s, %s\0A\0Ausage: zonenotify zone slave [slave 2 ... [slave n]] \0A\00"
@.str.1 = [16 x i8] c"zonenotify 0.01\00"
@.str.2 = [36 x i8] c"Luca Morettoni <luca@morettoni.net>\00"
@str = [66 x i8] c"where zone is the domain name to update on slave server ``slave''\00"
define void @usage() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([66 x i8], [66 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
int myFunction(void) { return 0; }


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

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

LLVM IR (-O0):
define i32 @myFunction() {
ret i32 0
}

LLVM IR (-O2):
define i32 @myFunction() {
ret i32 0
}