#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*/ STDERR_FILENO;
int my_strlen(char const *);
int /*<<< orphan*/ xwrite(int /*<<< orphan*/, char const *, int);
void print_error_double_msg(const char *msg, const char *msg2) {
  xwrite(STDERR_FILENO, "minishell: ", 11);
  xwrite(STDERR_FILENO, msg, my_strlen(msg));
  xwrite(STDERR_FILENO, ": ", 2);
  xwrite(STDERR_FILENO, msg2, my_strlen(msg2));
  xwrite(STDERR_FILENO, "\n", 1);
}


x86 assembly (clang, -O0):
<print_error_double_msg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
lea    0xec0(%rip),%rsi
mov    $0xb,%edx
call   1040 <xwrite@plt>
mov    0x2e8f(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <my_strlen@plt>
mov    -0x2c(%rbp),%edi
mov    -0x28(%rbp),%rsi
mov    %eax,%edx
call   1040 <xwrite@plt>
mov    0x2e64(%rip),%rax
mov    (%rax),%edi
lea    0xe84(%rip),%rsi
mov    $0x2,%edx
call   1040 <xwrite@plt>
mov    0x2e4a(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <my_strlen@plt>
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1040 <xwrite@plt>
mov    0x2e1f(%rip),%rax
mov    (%rax),%edi
lea    0xe42(%rip),%rsi
mov    $0x1,%edx
call   1040 <xwrite@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_error_double_msg>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    0x2eac(%rip),%r15
mov    (%r15),%edi
lea    0xec2(%rip),%rsi
mov    $0xb,%edx
call   1040 <xwrite@plt>
mov    (%r15),%ebp
mov    %rbx,%rdi
call   1030 <my_strlen@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1040 <xwrite@plt>
mov    (%r15),%edi
lea    0xea0(%rip),%rsi
mov    $0x2,%edx
call   1040 <xwrite@plt>
mov    (%r15),%ebx
mov    %r14,%rdi
call   1030 <my_strlen@plt>
mov    %ebx,%edi
mov    %r14,%rsi
mov    %eax,%edx
call   1040 <xwrite@plt>
mov    (%r15),%edi
lea    0xe78(%rip),%rsi
mov    $0x1,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <xwrite@plt>

LLVM IR (-O0):
@STDERR_FILENO = global i32 0
@.str = [12 x i8] c"minishell: \00"
@.str.1 = [3 x i8] c": \00"
@.str.2 = [2 x i8] c"\0A\00"
define void @print_error_double_msg(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i32, i32* @STDERR_FILENO
%6 = call i32 @xwrite(i32 %5, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 11)
%7 = load i32, i32* @STDERR_FILENO
%8 = load i8*, i8** %3
%9 = load i8*, i8** %3
%10 = call i32 @my_strlen(i8* %9)
%11 = call i32 @xwrite(i32 %7, i8* %8, i32 %10)
%12 = load i32, i32* @STDERR_FILENO
%13 = call i32 @xwrite(i32 %12, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 2)
%14 = load i32, i32* @STDERR_FILENO
%15 = load i8*, i8** %4
%16 = load i8*, i8** %4
%17 = call i32 @my_strlen(i8* %16)
%18 = call i32 @xwrite(i32 %14, i8* %15, i32 %17)
%19 = load i32, i32* @STDERR_FILENO
%20 = call i32 @xwrite(i32 %19, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i32 1)
ret void
}

LLVM IR (-O2):
@STDERR_FILENO = global i32 0
@.str = [12 x i8] c"minishell: \00"
@.str.1 = [3 x i8] c": \00"
@.str.2 = [2 x i8] c"\0A\00"
define void @print_error_double_msg(i8* %0, i8* %1) {
%3 = load i32, i32* @STDERR_FILENO
%4 = tail call i32 @xwrite(i32 %3, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 11)
%5 = load i32, i32* @STDERR_FILENO
%6 = tail call i32 @my_strlen(i8* %0)
%7 = tail call i32 @xwrite(i32 %5, i8* %0, i32 %6)
%8 = load i32, i32* @STDERR_FILENO
%9 = tail call i32 @xwrite(i32 %8, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 2)
%10 = load i32, i32* @STDERR_FILENO
%11 = tail call i32 @my_strlen(i8* %1)
%12 = tail call i32 @xwrite(i32 %10, i8* %1, i32 %11)
%13 = load i32, i32* @STDERR_FILENO
%14 = tail call i32 @xwrite(i32 %13, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i32 1)
ret void
}