#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ abms_system(char *);
int /*<<< orphan*/ sprintf(char *, char *, char *, char *, char *, char *,
                           char *);
void sqfs_init(void) {
  char lcmd[255];
  sprintf(lcmd, "%s%s %s%s %s -t squashfs -o loop=/dev/loop0",
          "/app/os/sys/bin/", "mount", "/app/os/images/", "abms.sqfs",
          "/app/os/sys/");
  abms_system(lcmd);
  return;
}


x86 assembly (clang, -O0):
<sqfs_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
lea    -0x100(%rbp),%rdi
lea    0xec7(%rip),%rsi
lea    0xeec(%rip),%rdx
lea    0xef6(%rip),%rcx
lea    0xef5(%rip),%r8
lea    0xefe(%rip),%r9
lea    0xf01(%rip),%rax
mov    %rax,(%rsp)
call   1040 <sprintf@plt>
lea    -0x100(%rbp),%rdi
call   1030 <abms_system@plt>
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sqfs_init>:
push   %rbx
sub    $0x110,%rsp
lea    0xf2e(%rip),%rax
mov    %rax,(%rsp)
lea    0xec6(%rip),%rsi
lea    0xeeb(%rip),%rdx
lea    0xef5(%rip),%rcx
lea    0xef4(%rip),%r8
lea    0xefd(%rip),%r9
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <abms_system@plt>
add    $0x110,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [44 x i8] c"%s%s %s%s %s -t squashfs -o loop=/dev/loop0\00"
@.str.1 = [17 x i8] c"/app/os/sys/bin/\00"
@.str.2 = [6 x i8] c"mount\00"
@.str.3 = [16 x i8] c"/app/os/images/\00"
@.str.4 = [10 x i8] c"abms.sqfs\00"
@.str.5 = [13 x i8] c"/app/os/sys/\00"
define void @sqfs_init() {
%1 = alloca [255 x i8]
%2 = getelementptr inbounds [255 x i8], [255 x i8]* %1, i64 0, i64 0
%3 = call i32 @sprintf(i8* %2, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0))
%4 = getelementptr inbounds [255 x i8], [255 x i8]* %1, i64 0, i64 0
%5 = call i32 @abms_system(i8* %4)
ret void
}

LLVM IR (-O2):
@.str = [44 x i8] c"%s%s %s%s %s -t squashfs -o loop=/dev/loop0\00"
@.str.1 = [17 x i8] c"/app/os/sys/bin/\00"
@.str.2 = [6 x i8] c"mount\00"
@.str.3 = [16 x i8] c"/app/os/images/\00"
@.str.4 = [10 x i8] c"abms.sqfs\00"
@.str.5 = [13 x i8] c"/app/os/sys/\00"
define void @sqfs_init() {
%1 = alloca [255 x i8]
%2 = getelementptr inbounds [255 x i8], [255 x i8]* %1, i64 0, i64 0
%3 = call i32 @sprintf(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0))
%4 = call i32 @abms_system(i8* %2)
ret void
}